The options array may contain the following parameters.
Name | Type | Description | Possible Values |
---|
uid | INT | The new user ID for the media item. | INT |
title | STRING | The new title for the media item. | N/A |
message | STRING | The new message for the media item. | N/A |
hidden | STRING | The hidden status of the media item. | HIDDEN or SHOWN |
tags | STRING | Updated tags for the media item. This will overwrite the existing tags with the newly specified tags. | N/A |
moderationstatus | INT | The new moderation status of the media item.
Media Moderation Notifications: Media Moderation notification emails can be sent when media is approved or denied. To send these emails, set the `Approved Moderation Email` and `Denied Moderation Email` templates in the channeldetail page of the channel that the media are in. | 0,1,2,3,-1 (Check the word possibilities unmoderated, accepted, denied, deleted, notdenied, moderated, all) |
channel | INT | The channel ID of the updated channel the media item will be a member of. | INT |
parentid | INT | The new parent ID for the media item. This can be used to assign a media item as a comment along with updating the media context as well or switching a comment from one parent media item to another. | INT |
metadata | ARRAY | The new or updated additional values for the media item. | 'metadata': {'user': {'keyvalue': 'test update'}} |
language | STRING | The 2-letter ISO code that will be used to updated the media's language value. | STRING |
date | YYYY-MM-DD HH:MM:SS | The new date that will be stored for reference to the creation date of the media item. | YYYY-MM-DD HH:MM:SS |
startdate | YYYY-MM-DD HH:MM:SS | The starting date that will be stored for reference for the availability of the media item. | YYYY-MM-DD HH:MM:SS |
enddate | YYYY-MM-DD HH:MM:SS | The ending date that will be stored for reference for the end of availability of the media item. | YYYY-MM-DD HH:MM:SS |
offensive | INT | The number of times that this media has been reported as offensive. | INT |
geo_latitude | FLOAT | The geographic latitude of the file in degrees latitude, specified as a float up to 14 decimals. | 50.00000000000001 |
geo_longitude | FLOAT | The geographic longitude of the file in degrees latitude, specified as a float up to 14 decimals. | -70.00000000000001 |
externalids | ARRAY | 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: - 0 - other: any provider other than the 7 mentioned below. You can store any reference using this provider.
i.e. 'http://www.arbitrarysite.com/image=123' - 1 - Brightcove
- 2 - Youtube
- 3 - Instagram
- 4 - Twitter
- 5 - Widen
- 6 - Apple
- 7 - Ooyala
NOTE 1 Each recordset in the array is an array itself that contains the following: - external_id (string)
- external_id_provider (integer)
- created (the date the externalid record created/updated)
- vhost
- primary_external_id (Integer. States whether this is the media's primary external id: possible values: 1 or 0.)
.
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.
| Format
array ( < ext. id provider 1 > => '< external id a >', < ext. id provider 2 > => '< external id b >' )
Example 1: Updates media's external ids for Brightcove and Instagram.
array( 1 => '545433_57632' 3 => '545433_57633' )
Example 2: Sets the `primary external id` the media yo 2. NOTEYou can not set the `primary external id` to an externali id that does not exist for the media.
array( 1 => '545433_57632' 3 => '545433_57633' ) |
The response returned on success and failure of media update.