v1

latestOpenAPI 3.1.02026-07-24251250397.8 KB
media

List media

List media

get/v2/sites/{site_id}/media/

Path parameters

site_idstring required

Unique identifier for a resource

Example:Ny05CEfj

Unique alphanumeric ID of the site

Query parameters

pageinteger

Sets the page number for pagination. First page is 1.

page_lengthinteger

Sets the page length (number of items you get in the response) for pagination

If page_length is not specified, the default value will be set.

Default: 10

qstring

Allows for querying results

Example: title:+a title

Media can be queried by the following attributes:

  • author
  • category
  • created
  • custom_params
  • description
  • drm
    • Options are true or false
    • Example title:+a title AND drm:true
  • duration
  • error_message
  • external_id
  • hosting_type
  • id
  • last_modified
  • media_type
  • permalink
  • protection_rule_key
  • publish_end_date
  • publish_start_date
  • source_format
  • source_url
  • status
  • tags
  • title
  • trim_in_point
  • trim_out_point

Querying for a specific custom_params requires a match using the AND logical operator:

custom_params: ( name: "abc" AND value: "123" )

sortstring

Allows for sorting results

Example: sort=created:dsc

Sort order can be one of asc, dsc

Media can be sorted by the following attributes:

  • created
  • duration
  • last_modified
  • publish_end_date
  • publish_start_date
  • status
  • title

Response

Resources successfully retrieved

pageinteger

Offset for returned resources

page_lengthinteger

Maximum number of resources to return

totalinteger

Number of resources available before pagination

Example response

{
  "page": 1,
  "page_length": 10,
  "total": 1,
  "media": [
    {
      "schema": "https://schema.jwplayer.com/types/thumbnail.json",
      "id": "Ny05CEfj",
      "created": "2019-09-25T15:29:11.042095+00:00",
      "last_modified": "2019-09-25T15:29:11.042095+00:00",
      "relationships": {
        "protection_rule": {
          "id": "Ny05CEfj"
        }
      },
      "metadata": {
        "title": "My Media Title",
        "description": "My media description",
        "author": "Jane Doe",
        "permalink": "http://www.mysite.com",
        "category": "Automotive",
        "publish_start_date": "2018-10-03T21:19:36.602019+00:00",
        "publish_end_date": "2018-10-03T21:19:36.602019+00:00",
        "tags": [
          "test1",
          "happy1",
          "one",
          "two",
          "four"
        ],
        "custom_params": {
          "param1": "value1"
        }
      },
      "status": "ready",
      "media_type": "video",
      "hosting_type": "hosted",
      "error_message": "Something went wrong!",
      "external_id": "myvideo123",
      "duration": 437,
      "trim_in_point": "00:00:01",
      "trim_out_point": "00:01:00.123"
    }
  ]
}