Overview
Content metadata can be added using the REST API located at /content_api
Request URL
/content_api/new?program_code=[program_code]&program=[program]&episode_code=[episode_code]&episode=[episode]&description=[description]&expected_duration=[expected_duration]&expected_filename=[expected_filename]&location=[location]&contributor=[contributor]&import_datetime=[XXXX-MM-DD]&delete_datetime=[XXXX-MM-DD]&categories[]=[category]&custom_metadata[key]=[value]&api_key=[api key]
Ex. http://myserver/content_api/new?program_code=01&program=a1test&episode_code=009&episode=e1&description=mydescription&expected_duration=30&expected_filename=AAx&location=here&contributor=mycontrib&import_datetime=2011-04-20&delete_datetime=2012-04-20&categories[]=Community& categories[]=Dance&custom_metadata[foo]=bar&api_key=f1815f1f2011e32b6309
Parameters
Parameter | Type | Required | Max Length | Description |
---|---|---|---|---|
program_code |
String |
64 | The content file’s program code. If this is an unattached content file (no physical file yet) that is part of a sequence then either program or program_code is required depending on the “Use program and episode codes” configuration setting. The same applies to episode or episode code | |
program |
String |
254 | The content file’s program code. If this is an unattached content file (no physical file yet) that is part of a sequence then either program or program_code is required depending on the “Use program and episode codes” configuration setting | |
episode_code |
String |
64 | The content file’s episode code. If this is an unattached content file (no physical file yet) that is part of a sequence then either episode or episode_code is required depending on the “Use program and episode codes” configuration setting | |
episode |
String |
254 | The content file’s episode. If this is an unattached content file (no physical file yet) that is part of a sequence then either episode or episode_code is required depending on the “Use program and episode codes” configuration setting | |
description |
String |
The content file’s description. Can be any valid block of text | ||
expected_duration |
Integer |
If this is an unattached content file, must be greater than 0 | ||
expected_filename |
String |
255 | If this is an unattached content file, must be specified | |
location |
String |
32 | If this is an unattached content file, must be specified if the system is configured to require location for unattached content | |
contributor |
String |
64 | ||
import_datetime |
Date/Time |
Must be a valid ISO date/time | ||
delete_datetime |
Date/Time |
Must be a valid ISO date/time | ||
api_key | String |
![]() |
Must be a valid api key | |
categories |
Array |
A list of categories to add this content to. They must already exist on the system. | ||
custom metadata | Hash |
A hash of custom metadata keys and values to update for this content file. They must already exist on the system. |
Code Examples
See URL example above.
Return
The success status of the operation will be output onto the screen. ‘true’ for success and ‘false’ for an error or invalid data.