1. Home
  2. Developers
  3. SAPI Reference Guide
  4. /sapi/cliplist (or /sapi/playlist)

/sapi/cliplist (or /sapi/playlist)


Use the /sapi/cliplist or /sapi/playlist endpoint to manage static sets of clips (static playlists) as well as filtersets that dynamically retrieve a set of matching mediaclips (smart playlists).

Base URL: https://yourcompanyname.bbvms.com/sapi/cliplist

All requests must be authenticated. See SAPI Authentication for details. All request bodies must use Content-Type: application/json.

1.0 | Playlist Object

1.1 | Example Playlist Object

Example playlist object
{
   "id": "1649942816310652",
   "type": "MediaClipList",
   "mediatype": "video",
   "listtype": "dynamic",
   "usetype": "editorial",
   "sourcetype": null,
   "title": "Blue Billy Travels",
   "description": null,
   "deeplink": null,
   "copyright": null,
   "author": null,
   "status": "published",
   "filters": {
      "0": {
         "filters": [
            {
               "id": "xbt4nerryjk",
               "type": "search",
               "field": "cat",
               "operator": "containsAnyOf",
               "value": ["travel"]
            }
         ]
      },
      "sort": "published_date asc"
   },
   "date": {
      "created": "Thu, 14 Apr 2022 15:26:56 +0200",
      "updated": "Thu, 14 Apr 2022 15:26:56 +0200",
      "published": "Thu, 14 Apr 2022 15:26:56 +0200"
   },
   "createdBy": "support@bluebillywig.com",
   "updatedBy": "support@bluebillywig.com",
   "thumbnails": [
      {
         "src": "/yourcompanyname/media/2021/09/06/4354721-1630938744645394/4354721-1630938744645394_14.jpg",
         "width": "1920",
         "height": "1080",
         "main": "true"
      },
      {
         "src": "/yourcompanyname/media/2022/11/14/4736217-1668414087178326/4736217-1668414087178326_3.jpg",
         "width": "2796",
         "height": "1572",
         "main": "true"
      },
      {
         "src": "/yourcompanyname/media/2022/04/14/1649941639516649/cf81554ed0aefeaff4fa282dfc8775ef.jpg",
         "width": "1920",
         "height": "1079",
         "main": "true"
      }
   ],
   "items": [
      // array of clip items
   ]
}

1.2 | Attributes

Read/write fields

PropertyTypeDescription
titlestringPlaylist title.
descriptionstringPlaylist description text.
statusstringdraft or published. A published playlist is publicly available.
filtersobjectThe applied filtersets. A filterset contains one or more filter containers. Filtersets are combined with a logical AND; filters within a filterset use logical OR. See 1.3 Supported Filter Operators below.

Read-only fields

PropertyTypeDescription
idstringUnique identifier of the playlist.
typestringFixed value: MediaClipList.
listtypestringdynamic, static, or collection.
createddatestringISO 8601 date and time the playlist was created.
updateddatestringISO 8601 date and time the playlist was last updated.
publisheddatestringISO 8601 date and time the playlist was last published.
createdBystringUsername or email address of the user who created the playlist.
updatedBystringUsername or email address of the user who last updated the playlist.
thumbnailsarrayA list of thumbnail images. Each thumbnail has: src (file URI), main ("true" for the selected thumbnail), width and height (in pixels).
itemsarrayList of mediaclip items included in the playlist.

1.3 | Supported Filter Operators

OperatorDescription
is(string) Value exactly matches the specified value.
isAnyOf(list) Value matches any member in the list.
isNot(string) Value does not exactly match the specified value.
isNotAnyOf(list) Value does not match any member in the list.
IsBefore(date) Value is before the specified date/time.
IsAfter(date) Value is after the specified date/time.
IsInTheLast(date) Value falls within the specified time expression (e.g. 7DAYS, 1HOUR, 1YEAR).
IsNotInTheLast(date) Value does not fall within the specified time expression (e.g. 7DAYS, 1HOUR, 1YEAR).
contains(string) Value contains the specified substring.
containsAllOf(list) All values in the list occur within the field.
containsAnyOf(list) Any value in the list occurs within the field.
doesNotContain(string) Value does not contain the specified substring.
doesNotContainAnyOf(list) None of the values in the list occur within the field.

View a filterset example below:

Example filterset
{
   "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 or /sapi/playlist

Create a new playlist by omitting the id property. Include a payload similar to the example in section 1.1.

PUT /sapi/cliplist/{id} or /sapi/playlist/{id}

Update an existing playlist by including the playlist id property.

3.0 | Retrieve List

GET /sapi/cliplist or /sapi/playlist

Retrieves a list of playlists. By default, the 50 most recently created playlists are returned.

3.1 | Parameters

ParameterTypeDescriptionExample
qstringA query to filter results.?q=title:"New Playlist"
sortstringSort field and direction. Default: id desc.?sort=title asc
limitintegerNumber of playlists to return.?limit=100
offsetintegerNumber of results to skip, for pagination.?offset=100

4.0 | Retrieve

GET /sapi/cliplist/{id} or /sapi/playlist/{id}

Retrieves a single playlist object.

5.0 | Delete

DELETE /sapi/cliplist/{id} or /sapi/playlist/{id}

Deletes a playlist object.

Was this article helpful?

Related Articles

Contact Support
Can't find the answer you're looking for?
Contact Support