Will include a response with all information about the requested file. If streaming support is enabled for this vhost then the streaming server name and stream name for this media item will be returned. If you are not authenticated using the API KEY, you will only be able to retrieve information on moderated media. There is no requirement for any permission to be able to retrieve information about a private media item.
array media.getFileByExternalID ( mixed externalId, mixed vhost, int uid = NULL, bool returnComments = false, array options = array() )
Name | Type | Required | Default value | Description |
---|---|---|---|---|
externalId | mixed | Required | none | |
vhost | mixed | Required | none | |
uid | int | Optional | NULL | If a user ID is supplied we will return 'uservote' item. Uservote contains the vote value the user made on the file we are requesting. |
returnComments | bool | Optional | false | This specifies if comments will be returned along with the media information. Values can be set to true or false. |
options | array | Optional | array() | The options array specifies if there a list of group ID's and / or event ID's will be returned that the media item is a member of. |
The options array may contain the following parameters.
Name | Type | Description | Default Values |
---|---|---|---|
includeGroups | boolean | This may be either 0 or 1 (1 = true or 0 = false). When set to 1, the returned data will include all groups in which the media is present. This option requires the groups.getGroups permission. | 0 |
includeEvents | boolean | This may be either 0 or 1 (1 = true or 0 = false). When set to 1, the returned data will include all events in which the media is present. This option requires the events.getEvents permission. | 0 |
includeAssignments | boolean | This may be either 0 or 1 (1 = true or 0 = false). When set to 1, the returned data will include all assignments in which the media is present. This option requires the groups.getGroups permission. | 0 |
The responses returned by the getFileByExternalID service call. Below is a list of all the information returned for a piece of media using the media.getFileByExternalID service call.
Name | Description | Possible Values |
---|---|---|
externalI | The external ID of the requested media. | STRING |
status | The upload status of the media ID requested. | 0,1,2,3 |
contenttype | The mimetype of the file, for example: audio/mp3. | MIMETYPE |
filetype | The filetype of the requested media item. | 0,1,2,3,4 |
context | The context of the media item. This will be if it is a note, comment, entry etc. | 0,1,2,3 |
filename | The original file name of the uploaded media item. | string/empty |
injector | A user-defined string, allows tracking where a file was inserted from. | videomixer, feedImporter2, httpupload, MediaFactory.com |
hits | The number of views the media received. | INT |
message | The message of the media item. | STRING |
date | The date and time for when the file started to be uploaded into MediaFactory. | YYYY-MM-DD HH:MM:SS |
title | The title of the media item. | STRING |
tags | All the tags associated with the piece of media. Each tag is separated by a space. | STRING |
extension | The original file extension of the uploaded media item. An example would be png. | STRING |
sender | The email address, populated by the email injector. | STRING |
author | DEPRECATED | empty |
metadata | An ARRAY for any additional information that is to be stored with the media item. It is stored as an associated array in this field. The metadata can be set by the user (in the media detail page) or by the developer (via the API). This data is accessible via metadata['<key>']: for example: metadata['synopsis'] or metadata['pin'] | metadata['synopsis'] = 'string1' or metadata['pin'] = 'string2' |
uid | The ID of the user who uploaded the media into the system. | INT |
filesize | The size of the file, in bytes. | INT |
ofilesize | The original filesize of the media in KB. | INT |
upload | The upload date of the when the file was first uploaded into MediaFactory. | YYYY-MM-DD HH:MM:SS |
location | The server location of the uploaded media item. | STRING (s3, fmlocal, fmdevs3) |
originallocation | The location of where the original file is stored. | s3, fmlocal, fmdevs3 |
privacy | DEPRECATED | DEPRECATED |
moderationstatus | The current moderation status of the file. | 0,1,2,3,-1 |
width | The original width of the file in pixels. | INT |
height | The original height of the file in pixels. | INT |
length | The duration of the file in as a floating point number in seconds. (example: 187.33, for 3 minutes, 7 seconds) | NUMBER |
conversiontime | The time it took to convert the file. | INT(seconds) |
converttime | The date and time the transcoding of the file was completed. | YYYY-MM-DD HH:MM:SS |
lastupdatetime | The date and time of the last update which was made to the file. | YYYY-MM-DD HH:MM:SS |
offensive | DEPRECATED | DEPRECATED |
rating | The rating of the file. | INT |
votecount | The vote count of the file. | INT |
externalids | This is an array of the third party IDs for the file; it is available only if the file is hosted by one of our partners, such as Twitter, Instagram, Youtube, Brightcove, Widen and Ooyala. The external id provider values are stored as an integer, and are below:
NOTE 1 Each recordset in the array is an array itself that contains the following:
NOTE 2Only one record can be the primary external id for each media. NOTE 3The record that is noted as the primary external id is stored in the externalid with the reference to the external id provider stated before the external id. | Example array( Array (   'external_id_provider'=>3, 'external_id'=>'6136_1186', 'created'=>'2014-03-19 17:43:11', 'vhost' => 218, 'primary_external_id' => 1 ), Array (   'external_id_provider'=>2, 'external_id'=>'6136_1186', 'created' => '2014-03-23 07:52:54', 'vhost' => 218, 'primary_external_id' => 0 ) ) |
externalid | This is the third party ID of the file; it is available only if the file is hosted by one of our partners, such as Twitter, Instagram, Youtube, Brightcove, Widen and Ooyala. NOTE 1 The external id does not always state the external id provider. NOTE 2 It is equal to the primary media externalids reference, with the provider being stated in the reference, while in the externalids the provider is stored in the array as `external_id_provider`. Example: instagram_image:678386240811661326_1187731501ments ( Brightcove ). This does not state the external id provider. | STRING |
parentid | The parent ID of the media item. This would be specified if the media item was a comment. This would be the ID of the media which the commented was made on. | INT |
originalLocation | The location of where the original file is stored. | s3, fmlocal, fmdevs3 |
user_name | The user name of the submitter. | STRING |
user_email | The email of the submitter. | STRING |
user_country | The 2-letter country code of the submitter. | STRING |
user_city | The city of the submitter. | empty,STRING |
user_state | The 2-letter state or province code of submitter. | STRING |
user_nickname | The submitter's nickname. | STRING |
user_firstname | The submitter's firstname. | empty,STRING |
user_lastname | The last name of the user who uploaded the file. | STRING |
url | The URL that could be associated with a media item. | STRING |
vhost | The ID of the vhost which the file belongs to. | INT |
language | The 2-character ISO language code. | STRING |
channel | The channel ID the file is a member of. | INT |
channel_shortname | The given short name the file is a member of. | STRING (sample_shortname) |
channel_name | The channel name the file belongs to. | STRING |
channelleft | The position INT of the channel relative to walking a left channel tree. | INT |
geo_latitude | The latitude of the file. This is added via dropping the pin on the map upon upload. | NUMBER (62.86) |
geo_longitude | The longitude of the file. This is added via dropping the pin on the map upon upload. | NUMBER (-52.44) |
hidden | The visibility of the file. | HIDDEN, SHOWN, or ALL |
commentcount | The total number of comments made on the file. | INT |
approvedcomments | The total number of approved comments made on the file. | INT |
notdeniedcomments | The total number of not denied comments made on the file. | INT |
publicUrl | The publicly accessible url of the media item. This url will log a hit on the piece of media. | STRING |
thumbUrl | the publicly accessible url used only as a thumbnail for the piece of media. Using the thumb url will NOT log a hit on the media item. | STRING |
moderationdeniedid | The moderation reason for being denied. | Possible values for denied reasons are 0-14. Exact reasons are available in our glossary. |
conversions | An array file conversions which has been executed on the original uploaded file. | |
isLive | Returns if the media was uploaded and is live. | true, false |
shares | The number of times the media was shared. | INT |