/sapi/cliplist is the endpoint for managing static and smart playlists.
1.0 | Object structure
“Cliplist” is the entity for storing static sets of clips (Static Playlists) or filtersets (Smart Playlists) that dynamically retrieves a set of matching media clips.
{ "title": "no limit", "id": "1533557346280433", "type": "MediaClipList", "listtype": "static", "usetype": "editorial", "status": "published", "limit": 10, "sort": "publisheddate desc", "createddate": "2018-08-06T12:09:06Z", "createdBy": "support@bluebillywig.com", "updateddate": "2018-08-06T12:09:42Z", "updatedBy": "support@bluebillywig.com", "items": [ { "id": "1082435", "parentid": "0", "title": "imgs_by_source_sdu_poc", "gendeeplink": "", "status": "published", "publication": ["1"], "publicationid": 1, "parentpublicationid": "0", "mediatype": "video", "usetype": "editorial", "sourcetype": "on_demand", "type": "MediaClip", "originalfilename": "Karwei Unboxing_Tessel_r01.mp4", "updateddate": "2018-08-01T10:40:29Z", "createddate": "2018-08-01T10:23:53Z", "sourceid": "" } ] }
The base cliplist object consists of a set standard properties (all lowercase):
- title : playlist title
- id : The id of the playlist (read-only);
- type : (fixed) MediaClipList (read-only);
- listtype : either static (for a static playlist) or dynamic (for a smart playlist)
- status : draft or published. If a playlist has a “published” status, its metadata will be publicly available.
- filters: the applied filtersets. A filterset contains one or more filters containers (filter sets). Filtersets are combined (logical AND). Filters within filtersets use the logical OR operator.Supported operators:
Operators Value is Value is exactly “value” isAnyOf Value is any of the members in a list isNot Value does not exactly match “value” isNotAnyOf Value does not exactly occur in a list of values IsBefore (date comparator) value is before date time IsAfter (date comparator) value is after date time IsInTheLast (date comparator) value specifies a time expression: e.g. 7DAYS 1HOUR 1YEAR that should match IsNotInTheLast (date comparator) value specifies a time expression: e.g. 7DAYS 1HOUR 1YEAR that should not match contains value contains substring containsAllOf list of values all occur within a list containsAnyOf any of values all occur within a list doesNotContain value does not occur within a list of values doesNotContainAnyOf list of values does not contain any of a list of values View the filterset example below:
"filters": [ { "filters": [ { "type": "mediaclip", "field": "mediatype", "operator": "is", "value": "video" } ] }, { "filters": [ { "type": "mediaclip", "field": "status", "operator": "is", "value": "published" } ] }, { "filters": [ { "type": "mediaclip", "field": "transcodingFinished", "operator": "is", "value": "true" } ] } ]
2.0 | Create/Update
PUT /sapi/cliplist
The payload should consist of a cliplist as described in “Object structure”. If the id property is left out the above example JSON will register a new empty mediaclip with sourceid “my-unique-sourceid”. If the id property is left in an update of the clip with id “1234” is attempted. The response will contain the entire created or updated mediaclip object.
The easiest way to add a video to this newly created mediaclip object is to upload a file to the AWS S3 source bucket (s3://mm..bbvms.com/upload//SOURCEID.extension). For this an ingest pattern and “assumed user id” must be set up. Contact support to get this set up for you. After uploading a file it will automatically be attached to your new mediaclip.
3.0 | Retrieve
GET /sapi/cliplist
Retrieves a list of cliplists By default a list of the 15 most recently created cliplists will be returned.
Params
Parameter | Description | Example |
q | (string) specify a query to select a subset | ?q=title:”my fantastic new title” |
sort | (string fieldname string direction) determine sorting field en direction (default is id desc) | ?sort=title asc |
limit | (integer) determine the number of mediaclips to return | ?limit=100 |
offset | (integer) determine an offset to start the list | ?offset=100 |
3.1 | Result
An items container containing the requested cliplist objects.
GET /sapi/cliplist/ID
Retrieves a complete mediacliplist object containing all references and metadata properties.
4.0 | Delete
DELETE /sapi/cliplist/ID
Will cause a cliplist to be permanently deleted.