Back to top

Skylark API

Traditional broadcast content consisted of airing live and scheduled media direct to a single device: Television.

In recent years, the ways in which consumers view and have access to video content has changed dramatically; as such, trends have started to steer away from traditional viewing towards Video on Demand.

Video on Demand, or VoD, content allows users to select and stream from entire back catalogues of television episodes and feature films at the point of time they want to watch it. It is imperative for broadcasters to be able to connect with as many consumers as possible, whilst adhering to budgets and keeping maintenance of technical components as simple as possible.

Generally for VoD providers, each component input required has its own API. For example, there would be an API for the CMS, one to integrate payments, one for social media etc.

To make matters more complicated, each component would also need separate APIs for each type of device a consumer could access content from. I.e. The CMS would need one API for responsive web, one for iOS, one for Android etc.

With such a complex technical structure, broadcasters need to devote significant time and budget in order to maintain their products.

In order to simplify the process, Skylark integrates with a wide range of services through a RESTful API and allows for custom integrations from third parties. By managing a single API, it is technically and operationally efficient for broadcasters and will allow them to save both resource and budget in product maintenance.

API Conventions

The Skylark API uses a RESTful approach, performing operations over stateless HTTP calls and using URLs as identifiers for objects and relationships.

Data format

Requests and responses to Skylark API are made in JSON format.

Dates and datetimes are specified in RFC 3339/ISO 8601 format.

Response codes

Skylark commonly uses these standard HTTP response codes.

Code Description
200 OK The request was successful and a response has been provided
201 Created The request was successful and a new object was created.
204 No Content The request was successful, but there is no response body. This the typical response for DELETE calls.
400 Bad Request The parameters, data format, or content of the request was incorrect. The response body contains more detail (see Error Reporting, below)
401 Unauthorized The request was made anonymously but requires an authenticated user, or the given authentication details were invalid or expired.
403 Forbidden The authenticated user does not have the permissions required to perform the API call
404 Not Found The request does not exist, or no object with the given unique identifier exists
410 Gone The object requested has been deleted and is no longer available from the API
500 Internal Server Error An internal problem has caused no response to be generated. Please contact support.

Error Reporting

When an 400 Bad Request error occurs, a JSON response is returned such as this:

{
    "form_validation_errors": null,
    "error": null,
    "skylark_error_code": "NO_VIEWING_RECORD_PROVIDED"
}
  • error: a plain-text description of the error

  • skylark_error_code: standardised skylark error codes are shown here. Possible values are documented for each API.

  • form_validation_errors: if there are any validation errors with incoming data, they are detailed here. The error code is set to "FORM_VALIDATION_ERRORS"

Authentication

APIs require an authenticated user in the following cases:

  • They are user management or content entitlement APIs, and require a user to operate on

  • They are administrative APIs, and require a user with the correct permissions for the request

Authentication details are provided in the standard HTTP Authorization header. There are two authentication mechanisms available:

JSON Web Token

JSON web tokens (JWTs) are the primary authentication mechanism for Skylark.

A token for a user can be obtained from the authenticate, social authenticate or TV authenticate APIs. It should then be included in the Authorization header of subsequent API calls:

Authorization: JWT token

JSON Web tokens can be decoded client side to retrieve the user email address and token expiration time. They can only be verified as authentic by the Skylark server, for example, by making a request to /api/customers/me/.

Digest

Skylark can also accept standard HTTP Digest Authentication.

Authorisation

Editability

Objects including content, sets and all other versioned objects make use of an editability field. This field defines the editability of the objects. If no editability is defined when creating objects the default value of ‘normal’ will be used.

Only users with editablity permission are authorised to change editability or create objects with read-only or undeletable editability.

Editability options:

  • normal: anyone can create, edit, delete and view

  • read-only: anyone can view, no one can edit

  • undeletable: anyone can create, edit, and view this object, no one can delete it

To delete an object that is set to ‘undeletable’ the object editability must be changed to ‘normal’ first. To edit an object that is set to ‘read-only’ the object editability must be changed to ‘normal’ first.

User-specific endpoints

Many Skylark API endpoints – especially in the User, Personalisation and Box Office sections – operate by default on the currently authenticated user.

Administrative users can be granted permissions to operate over all users.

Filtering works differently depending on the kind of the requested endpoint.

Detail and delete endpoints

Normal users can only retrieve or delete objects they own.

Accessing or deleting any other object, or an object that does not exist, will result in a 403 Forbidden response.

Users with read or delete permission for the resource can read or delete objects for all users, respectively.

List endpoints

All users are returned a list of their own objects by default.

The following filters are available only to user with read permission for the resource:

  • user=all to return the objects belonging to all users

  • user={uid} to return the objects of the user identified by the uid

These can be combined with field filtering.

Users without the required permissions are returned a 403 Forbidden response if they attempt to use these filters.

Create endpoints

Normal users can only create objects that belong to them.

User with “create” permission on the endpoint can add ?user={uid} to the request to create an object belonging to the user identified by the given uid.

Users without the required permission are returned a 403 Forbidden response if they attempt to create an object for another user.

reCAPTCHA

Some Skylark deployments can require reCAPTCHA authorisation on certain endpoints. To supply reCAPTCHA information, acquire a token using the regular reCAPTCHA flow and send the token in the Recaptcha-Token HTTP header.

Languages

API calls for entities that can be translated into multiple natural languages respect the Accept-Language header.

For requests to read data, all languages in the header will be tried, with the first available supported language being returned. If the wildcard * is specified in the Accept-Language header, any available language will be returned, with the site default language being preferred.

The language of the response will be given in the Content-Language header.

If the resource exists but has no translation in any of the languages specified in the Accept-Language header, a 406 Not Acceptable response will be returned. If fallback behaviour is not desired, specify only a single language in the Accept-Language header.

For requests to write data, only the highest priority language in the Accept-Language header will be considered. If no Accept-Language is given, the site default language will be assumed. If the given language is not enabled in the Skylark configuration or is a wildcard, a 406 Not Acceptable response will be returned.

Endpoint conventions

Most Skylark API endpoints follow the pattern below.

All API endpoints require a trailing slash. They support field restriction and expansion to control the amount of data returned.

List endpoint

Get list
GET/{base_url}/

Return a list of all objects of this type. List APIs usually implement field filtering and schedule filtering to restrict the objects returned. Lists also support paging and sorting parameters.

Example URI

GET /api/sets/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
Response  200
HideShow
Headers
Content-Type: application/json

Create new object
POST/{base_url}/

Making a POST request to the list endpoint will create a new object. A new UID will be generated for the object and returned in the response.

Example URI

POST /api/sets/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
Response  201
HideShow
Headers
Content-Type: application/json

Count endpoint

Get count
GET/count/

Return the number of matching objects. The count endpoint takes the same filters as the List but returns only a number of total matches.

Example URI

GET /count/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1
}

Detail endpoint

Get a single object by identifier
GET/{base_url}/{uid}/

Retrieve the given object using its unique Skylark identifier.

Example URI

GET /api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
uid
string (required) Example: coll_d5d8943ce8f24b8da41405b7b7212d20
Response  200
HideShow
Headers
Content-Type: application/json

Update an object
PUT/{base_url}/{uid}/

Update the object with the given unique Skylark identifier, using the given body as the new representation. If no object with the given UID exists, it will be created.

Example URI

PUT /api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
uid
string (required) Example: coll_d5d8943ce8f24b8da41405b7b7212d20
Response  200
HideShow
Headers
Content-Type: application/json

Partially update an object
PATCH/{base_url}/{uid}/

Update the object with the given unique Skylark identifier, changing only the values of the given fields.

Example URI

PATCH /api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
uid
string (required) Example: coll_d5d8943ce8f24b8da41405b7b7212d20
Response  200
HideShow
Headers
Content-Type: application/json

Delete an object
DELETE/{base_url}/{uid}/

Delete the object with the given identifier. It will be removed from the system and further GET requests for the object will return 410 Gone

Example URI

DELETE /api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
uid
string (required) Example: coll_d5d8943ce8f24b8da41405b7b7212d20
Response  204

Users, Entitlements and Playback

What is it?

Skylark deployments are usually concerned with managing users and the content that they can purchase and view. This section provides an overview of the relevant Skylark API calls needed for a complete user journey from registration to playback on a typical Skylark installation.

Use cases

  • Manage user accounts directly or via a third-party identity provider

  • Use a free, ad-supported, transactional, subscription or TV Everywhere commercial model

Technical Description

Registration and Authentication

New users can be created with a POST to the Customers API, providing an email address and password. Skylark will validate the email address format and that passwords match.

If Skylark is configured to validate email addresses, the new user will then have to confirm their address by clicking a link in an email. Emails should be configured to direct the user to a page that causes a POST to the Activate API. If not, the new user account is active immediately.

Once the user is created and activated, they can authenticate by providing an email address and password to the Authenticate API. This provides a JSON Web Token.

Alternatively, users may authenticate through a third party identity provider. This may be a social login through a service such as Google or Facebook, or federated login through a television service provider. In this case, authentication is handled through the Social Authenticate API, which takes an access token from the specified provider. Exact details of the login flow vary by provider.

A successful authentication call will create or retrieve a local Skylark user, update their details from the identity provider, and return a JSON Web Token.

Skylark users are usually identified by email address. Where multiple identity providers are in use, it’s possible for a user to attempt to sign in using a different identity provider than the one they originally used. To ensure the privacy of account details in this case, Skylark will return a 409 Conflict response in this case, along with details of the original identity provider used. Completing authentication with the original provider will successfully link the accounts and authenticate the user. User accounts with email addresses can always be recovered with a call to the Password Reset API

However users are authenticated, all subsequent API calls (while the user is considered logged into the application) should include the JWT provided. The APIs described below all default to operating on the currently authenticated user. See Authentication for more detail.

Subscriptions and Entitlements

Available products on a Skylark installation are represented as Plan objects, while purchases of these products are represented as Subscriptions.

For a transactional rental or download-to-own commercial model, the Subscription is non-recurring and ends with the availability window of the content. For a commerical subscription model, the subscription is recurring and the configured integration with a payment provider will rebill the customer at a defined interval for continued access. Each payment made is available (read-only) from the Transactions API.

To purchase a new Subscription, the Plan desired is POSTed to the Subscriptions API, along with a reference to a payment method such as a card token or existing card id. New payment methods can be added by POSTing to the Cards API. Details of this flow may vary depending on the configured payment provider integration.

Skylark deployments supporting a TV Everywhere model are configured so that logging in with a specific identity provider automatically creates and maintains Subscriptions corresponding to the user’s rights or purchases in a third-party system. Available subscriptions can be retrieved through the Subscriptions API as normal.

An active subscription will provide access to one or more pieces of content. The available content may change over time as catalogue changes or made, or new Episodes are added to a Season. An Entitlement is the Skylark object that grants access to a specific piece of content. To check for an entitlement, a POST is made to the Entitlements API specifying the content desired. If the authenticated user alreay has an Entitlement for the content it will be returned, and if they have an active Subscription that includes the content, a new Entitlement will be granted. This call should generally be made just prior to playback: for example, the result may be used to display either a play or purchase call to action.

Playback and Authorizing Viewing

Viewings are a record and authorization of a single content playback or download. They are typically issued when a play or download button is pressed. To request a viewing, the desired asset should be POSTed to the Viewings API

Entitlements will be checked automatically by Skylark when requesting a viewing – the existing entitlement does not need to be provided to the API.

Restrictions on content to specific time periods or to specific geographies is handled by the Scheduling system rather than the Entitlement system. Skylark will recheck the schedules for the content before issuing a viewing: if the content is no longer available, the viewing will be refused.

Depending on the content protection mechanisms configured to be in use, Skylark may at this point provide a tokenised stream URL, cryptographically sign an authorization, or make API calls to a video provider to authorize the playback, and will provide any needed details required by the player at this time. These details are available when the viewing is created only: subsequent read calls to the Viewings API provide only a record of content watched and can not be used to initialise a player.

For content with entitlements that specify that viewing must be completed within a viewing window, creation of the viewing begin the available time period.

The objects involved at each stage of the flow are shown below:

Free or ad-supported viewing

Free or ad-supported content does not require a Subscription or Entitlement to be created in Skylark before playback: the playback flow can proceed straight to requesting a Viewing. This is indicated by the attributes on the Asset specifying that the asset is not rights-managed.

Requesting a viewing for free content will still check schedules and issue tokens or licences as required by the Online Video Platform (OVP) integration.

Free viewings can be requested without an authenticated user, in which case the viewing will be recorded as anonymous.

The playback flow is substantially simplified for free playback:

Typical Sequence

Putting this together, a typical sequence of calls from registration to playback may look like this:

Plan setup and configuration

The Subscriptions available for purchase are defined by Plan objects. The available content can either be directly associated with the plan – typically an Episode or Season would be purchased – or the Plan can be associated with a Set to allow access to multiple pieces of content, such as a bundled offer or a subscription package.

As well as the available content, the Plan has relationships to some other objects that control the resulting subscription.

The related Price Point determines the amount (and currency) that the Plan is available for, allowing for easy mass adjustments.

The related Plan Entitlement specifies the parameters of the Entitlements that should be granted to users that subscribe to the Plan. This includes the purchase window (amount of time from purchase to completing viewing), viewing window (amount of time from start of viewing to completing viewing), and any Asset Type restrictions that apply.

As with many Skylark objects, Plans can be scheduled to control their availability, such as only during specific periods or in certain locales, independently of the availability of the underlying content.

OVP setup and configuration

The technical playback attributes of an Asset are stored in the ovps attribute, and modified using the Asset API. Each key-value pair is associated with with an Account.

The required OVP attributes will depend on the configured OVP and content protection in use, and may include base stream URL, content identifiers, or the locations of encrypted assets. This information is used to generate the required authorization when Viewings are created.

The requirement for Entitlements is determined at Account level. If the account has the rights_managed flag set, a valid Entitlement (and thus Subscription) is required before a Viewing will be generated. If rights_managed is not set, Viewings will be issued without an entitlement check, including to anonymous users, but only when schedules make the content available.

Each asset may have data for multiple accounts: for example, if a stream is available on multiple CDNs or is available as both a stream and download. If Skylark is configured to use a CDN recommendation service, then the information provided at Viewing creation time will be in preference order.

Scheduling

What is it?

Skylark’s Scheduling feature decides on content availability. It can be used both to manage rights and to target specific users.

“Schedules”, objects that decide on the availability of objects associated with them, can either be created by editors or ingested.

Availability is decided on each request, with attributes of the request and of the requester factoring in, namely:

  • Time of the request

  • Language of the requester

  • Locale (typically country) where the request originated

  • Region to which the request’s origin belongs

  • Device type from which the request was made (Android app, iOS app on iPhone, iOS app on iPad, web browser, Playstation 4 app …)

  • Affiliate through which the requester logged in or is associated

  • Type of the customer, which can be several or none at all, usable for arbitrary grouping of users

Schedules

The values that these attribute can take are fully customizable and modifiable at any time.

In this diagram are:

  • An article visible only on Android devices for English speakers from Dec 25th

  • A season visible both on Android devices for English speakers from Dec 25th and also visible in France to anyone at anytime

  • A set visible in France by anyone at anytime

Additionally, Schedules can be associated to objects as part of its membership of a set. The availability of an object as member of a set is therefore decided both by these schedules and those associated with the object itself.

In this image:

  • A Brand only available in South Korea

  • A Set containing the Brand, returning it only when queried by Korean speakers

Use cases

  • Make a TV Show only available to mobile devices

  • Make movies available only to Sky subscribers. Make another batch of movies intersecting with the previous one available only to BBC subscribers. The intersection will be visible by both groups of clients.

  • Target minority languages speakers: Display a film only in the Basque version of your website

  • Easily manage complex distribution rights:

    • Make two schedules managing rights agreed on with distributors:
      • Available in France, Great Britain, Portugal for people speaking French and English, visiting on an Android device that connect via Sky, Canal + or MEO from March, 1st 2017 to June, 5th 2017
      • Available in the United States and Japan, for people speaking French, English and Japanese, visiting on iPhone in 2018
    • Assign them to brands and let Skylark clarify to whom they are available
  • Personalize your homepage: only show content available and relevant to the demographic of the current user

    • Add a Schedule managing rights to Christmas movies: Active worldwide
    • Create a Schedule targeting users for Christmas: Active in the western world from December 1st to December 31st
    • Add the Christmas movies to the set managing your homepage, linked as members of the set to the Christmas Schedule
    • During the month of December, the homepage of the mobile app of users in the western world shows these Christmas movies
  • A/B testing by divinding the userbase into groups and providing them with different content

Technical Description

The Schedule object

Schedules are a descriptor of availability. They can be linked with a wide range of objects in Skylark. This is called “scheduling an object”, and objects that can be scheduled are called “schedulable”. An object can be scheduled with one or several Schedules. They describe its availability.

Schedules describe availability over multiple dimensions which contain all the possible states in which a client can be differentiated:

The availability is described as a subset of those dimensions:

As you can see in the figure above, two types of dimension are available in Skylark:

  • Time, where values are ordered and continuous and can be targeted in ranges

  • Discrete dimensions, where values have no relation to each other and must be targeted one by one

Here are the discrete dimensions on which Schedules are defined in Skylark.

  • Language: languages that users speak

  • Locale: countries (or other geographic areas) where the content is available

  • Region: region where the content is available (such asEMEA, North America, Cheshire…)

  • Device type: type of devices on which the content can be viewed

  • Affiliate: affiliate through which users can connect

  • Customer type: arbitrary set of groups that a customer can be part of

Notes about Schedules:

  • The discrete dimensions are fully customizable: they contain values customised to the needs of the product. This means, for instance, that a Skylark instance can start by supporting only English speaking visitors, and roll out other languages over time.

  • Schedules which have been ingested (called rights schedules) will have their rights attribute set to true, while the ones created in the CMS (called editorial schedules) will have their rights attribute set to false.

  • If no end date is specified on the timespan of a Schedule, it is valid from its start date indefinitely.

Filtering scheduled content

Skylark filters lists of scheduled content wherever they are included in API responses: the response of a list endpoint and also lists of related objects.

In this section, the method to specify the schedule filter context of a request is presented. Then, the process of filtering based on this context is explained. A method to ask Skylark to bypass filtering is finally given.

Specifying the context of a request

As seen above, Schedules are subsets of dimensions representing the time of a request and other variables. The context of a request is also a subset of the same dimensions. When filtering, Skylark finds Schedules that match with the request’s context.

Specifying context is done by adding arguments to GET requests. For instance the request represented in the diagram above is done by adding the following arguments:

?locales=fr,us&device_types=android&at=2000-03-12

Specifying subsets for the discrete dimensions is simple. All the values desired must be specified, separated by commas. Some Skylark installations will automatically infer some dimensions from the HTTP request, for example, by geolocating requests by IP.

?locales=fr,us&device_types=android

Specifying time filters is explained in a later section.

How Skylark filters a list of scheduled components

Objects are examined one by one. When examining an object, its schedules are checked for a match against the context individually. An object needs at least one matching schedule to be included in the filtered list.

In the above diagram, the second object is included in the filtered list because it is linked to one matching schedule. Note that it is also linked to a non-matching one.

For a schedule to match against a request context, the schedule must must match the context on a per dimension basis. There is always a match on a dimension when at least one of those two objects has no values specified. An object with no values specified on a dimension is considered as having no restrictions, and so matches the whole dimension.

The rules determining match of subsets on a dimension vary depending on the type of the dimension. For discrete dimensions, subsets match when they have at least one common value.

When matching time, the default behavior is to match schedules that include the current time. Other schedules do not match.

Filtering is done on any list that is returned by Skylark, including Sets. However, the filtering process is slightly different for Set contents.

Sets contain other objects, sometime schedulable objects. But it is also possible to schedule their membership of the Set.

This is made possible by adding an intermediary object between the Set and the contained object: the ScheduledItem. The Set contains ScheduledItems and ScheduledItems refer to a single object.

As indicated by their name, ScheduledItems can be Scheduled. Items of a Set are returned if both their ScheduledItem containers and themselves match the request’s context.

Advanced Filtering: Filtering by time

Filtering by time isn’t available to general users. It is an administrative function that requires permissions to be granted to the user from their role.

First, let’s see how to specify a subset of the time dimension. It is possible to specify a timespan or a single date. This is done in two steps:

  1. Specify a date with the keyword at on the request. If this step is ignored, at is set to the current time.

  2. Two choices:

    1. Specify a second date with the until keyword. This specifies a range between at and until
    2. Specify when the desired content is scheduled relative to at with the keywords expired, current and future (their meaning is explained in the section below). They can be combined.

Then let’s see how the subsets on time dimensions are matched. It depends on how the context is defined. If the context is defined using current, expired and/or future, the dimensions matching are explained by the following diagram:

If the context is defined using until, schedules starting after at and ending before until will be matched.

Bypassing filtering

Here are three keywords arguments for GET request bypassing the normal filtering process. Again, these are only available to users with appropriate permissions.

Definition Description
all Returns all Objects
unscheduled Returns all Objects not linked to any Schedule
schedule_url Returns all Objects linked to the given Schedule(s)

Components

Added to Schedulable objects

The following fields are added to the JSON representation of Schedulable objects:

  • schedule_urls: list the URL of all the schedules associated with the object

  • schedule_statuses: list the schedules associated with the object and whether they match the request context

Added to all endpoints

It is possible to add these filters to all requests to Skylark. They take effect only when making requests for Schedulable objects. Please refer to the Technical Description for more information

Definition Description
at Indicate the base date for the matching the time dimension. Defaults to the current time. ISO 8601 Timestamp
until Establish a range between at and until for range-matching time. Default unset, to match a point in time.
current Objects currently Scheduled are returned. Default to True
expired Objects scheduled in the past are returned. Default to False. Boolean
future Objects scheduled currently or in the future are returned. Default to False. Boolean
languages Slugs of the language dimensions to match
locales Slugs of the locales to match
regions Slugs of the regions to match
device_types Slugs of the device types to match
affiliates Slugs of the affiliates to match
customer_types Slugs of the customer types to match

For example,

/api/images/?affiliates=bbc,cnn

will filter a list of Images whose schedules are valid for the Affilliates bbc or cnn.

/api/episodes/?current=true&future=true

will return all Episodes that have a Schedule that has started but not ended, as well as any episodes that have a Schedule that will end in the future.

/api/sets/?expired=true&future=true

will return all Sets that have a Schedule which has ended and all Objects which have a schedule that ends in the future.

The at keyword can be used together with the expired, current and future keywords, for example:

/api/seasons/?at=2000-01-01T00:00:00¤t=true
/api/seasons/?at=2000-01-01T00:00:00

Both of the above calls return the same data, all the Seasons that have a current Schedule on 1st January 2000.

/api/seasons/?at=2000-01-01T00:00:00&future=true

This will return all the Seasons which have Schedules ending after the 1st January, 2000

Versioned Objects

What is it?

An object that has versioning capabilities in Skylark is called a “versioned object”. Like all Skylark objects, versioned objects have fields that contain values. But, compared to standard objects, versioning provides additional features:

  1. They retain all the values that their fields took over time.

  2. They can translations in multiple languages of the values of their fields.

  3. When deleted, objects are made inaccessible from the API but are not removed from the database. The value of a deleted object can be retrieved by Ostmodern support.

  4. They can be ingested en masse from an upstream data source (such as a media asset management, cataglogue, or scheduling tool). An object modified after being ingested can be reverted to its upstream version.

Use cases

Versioned objects in Skylark help solve the following problems:

  • Serve content in several languages, with the ability to provide translation to any kind of data.

    • For instance, provide a different translation of a banner or a video depending on the language of the user.
  • Easily revert objects to their previous versions

  • Recover any kind of data, from deleted objects to older versions of objects

  • During a campaign, give the description of your content a more friendly tone on your Skylark instance, while keeping the more formal original description in your database. At the end of the campaign, simply revert the content’s original description.

Technical Description

When queried from the API, a versioned object is returned as a single flat object queried from the datastore. In reality to implement the features discussed above, versioned objects are stored in a slightly more complex way.

Stored as multiple objects

These are represented below.

The MetaFieldset contains information about the object itself. The RelationFieldset contains links from this object to others. The TranslatableFieldset and NonTranslatableFieldset contain all other information, depending on whether they are natural language fields requiring translation.

For instance, a Season object is described as such:

  • Linked to one Brand and several schedules in the RelationFieldset

  • Has an release date and a number of scenes (non-translatable) in the NonTranslatableFieldset

  • Also have a description and a title (translatable) TranslatableFieldset

The following classes would be created to implement Season

Creating a versioned object

When creating or updating an object, a JSON representation is passed to Skylark from which it creates an object. Four fieldsets will be created as part of the process, one for each of the objects defined above.

First, the MetadataFieldset. If the object does not yet exist, a MetadataFieldset is created. The object’s uid is generated if it was not provided, then set on the MetadataFieldset. Otherwise, if the object does exist, the MetadataFieldset for the existing object is retrieved from the datastore.

Next, the three other fieldsets are always created from the input JSON by distributing the values from the input appropriately. The language of the submitted details also stored in the TranslatableFieldset.

These fieldsets are not always saved to the datastore, as described in the next section.

Storing a versioned object

The way these fieldsets are stored in the datastore is represented by the diagram below.

There are three stores where the objects goes:

  • The Local store

  • The Upstream store

  • The Non-versioned store

Throughout the rest of this section, the most recent fieldset that has the same class and language than one that is about to be put in the datastore will be referred to as its predecessor. For instance, the latest MetaFieldset is the predecessor of the MetaFieldset that is about to be put in the datastore.

Deciding on the store for a Fieldset

When a versioned object is saved, both its RelationFieldset and its MetaFieldset are placed in the non-versioned store (this means that relationships to other objects are not versioned).

Its NonTranslatableFieldset and TranslatableFieldset are placed in the Local store if it was created using the regular create or update APIs. If they were created using the data-source APIs (generally during an ingest process), the copies are placed in the Upstream store. The Local store may also be updated, as explained later.

Deciding if predecessor versions are kept

When saving a fieldset to the Upstream store or the Non-versioned source, the predecessor version is replaced and no history is stored.

However, when saving a fieldset in the Local store, it is saved in addition to its predecessor, becoming the new current version if changes have been made. If no changes have been made, no new version is saved.

Versioning fields

The following fields are available on the TranslatableFieldset and NonTranslatableFieldset and will be returned to authorized users on Skylark environments configured for write access.

Field Description
publish_on, modified the date and time at which the fieldset was created in the datastore
ends_on the date and time at which the fieldset ceased to be current. Effectively, its successor’s publish_on, or this version is the current version, null.
modified_by the user that posted this version
version_number the version number as an integer. Effectively its predecessor’s version_number+ 1

Returning a complete versioned object

The multiple fieldsets that make up a versioned object are flattened into a list of fields before returning it. This process is guided by two parameters: uid and language.

The first step is to retrieve the matching fieldsets. The correct MetaFieldset and RelationFieldset for the object are retrieved from the datastore. Additionally, the current NonTranslatableFieldset and the current TranslatableFieldset in the desired language are retrieved.

Their data is then merged into a single JSON object the complete flattened object is returned.

The data as ingested from upstream (stored in the upstream source) is used instead of the local version if the data-source APIs are used.

Deleting a versioned object

When an object is deleted using the API, its MetaFieldset’s deleted attribute is changed to true. It is then no longer available through the API, and requests for it by UID will return a 410 Gone status.

As well as common the common API endpoints, all versioned objects support the following endpoints:

Non Translated Version History

Getting non-translated version history
GET/{base_url}/{uid}/versions/

Returns the history of the local NonTranslatableFieldset of the object with the given uid

Example URI

GET /api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/versions/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
uid
string (required) Example: coll_d5d8943ce8f24b8da41405b7b7212d20
Response  200
HideShow
Headers
Content-Type: application/json

Non Translated Past Version

Getting a previous non-translated version
GET/{base_url}/{uid}/versions/{version_number}/

Returns the object using the local NonTranslatableFieldset with the given version_number and uid.

Example URI

GET /api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/versions/3/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
uid
string (required) Example: coll_d5d8943ce8f24b8da41405b7b7212d20
version_number
integer (required) Example: 3
Response  200
HideShow
Headers
Content-Type: application/json

Revert Non-Translated Fields to Past Version

Reverting to a previous non-translated version
POST/{base_url}/{uid}/versions/{version_number}/revert/

Find the local NonTranslatableFieldset with the given version_number and belonging to the object with the given uid. With its data, create a new current local NonTranslatableFieldset. Returns the complete object in its new state.

Example URI

POST /api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/versions/3/revert/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
uid
string (required) Example: coll_d5d8943ce8f24b8da41405b7b7212d20
version_number
integer (required) Example: 3
Response  200
HideShow
Headers
Content-Type: application/json

Available languages

Getting available languages
GET/{base_url}/{uid}/languages/

Returns the avaiable local languages of theTranslatableFieldsets of the object identified by its uid.

Example URI

GET /api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/languages/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
uid
string (required) Example: coll_d5d8943ce8f24b8da41405b7b7212d20
Response  200
HideShow
Headers
Content-Type: application/json

Translated Version History

Getting translated version history
GET/{base_url}/{uid}/language-versions/

Returns the history of the local TranslatableFieldset of the object with the given uid

Example URI

GET /api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/language-versions/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
uid
string (required) Example: coll_d5d8943ce8f24b8da41405b7b7212d20
Response  200
HideShow
Headers
Content-Type: application/json

Translated Past Version

Getting a previous translated version
GET/{base_url}/{uid}/language-versions/{version_number}/

Returns the object using the local TranslatableFieldset with the given version_number and uid.

Example URI

GET /api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/language-versions/3/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
uid
string (required) Example: coll_d5d8943ce8f24b8da41405b7b7212d20
version_number
integer (required) Example: 3
Response  200
HideShow
Headers
Content-Type: application/json

Revert Translated Fields to Past Version

Reverting to a previous translated version
POST/{base_url}/{uid}/;anguage-versions/{version_number}/revert/

Find the local TranslatableFieldset with the given version_number and belonging to the object with the given uid. With its data, create a new current local TranslatableFieldset. Returns the complete object in its new state.

Example URI

POST /api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/;anguage-versions/3/revert/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
uid
string (required) Example: coll_d5d8943ce8f24b8da41405b7b7212d20
version_number
integer (required) Example: 3
Response  200
HideShow
Headers
Content-Type: application/json

Current versions of all available languages

Getting the current version in all available languages
GET/{base_url}/{uid}/all-language-versions/

Returns all available languages along with the current version of each.

Example URI

GET /api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/all-language-versions/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
uid
string (required) Example: coll_d5d8943ce8f24b8da41405b7b7212d20
Response  200
HideShow
Headers
Content-Type: application/json

Data Ingest

What is it?

Any object that has versioning capabilities also supports data ingest. Skylark allows these objects to be referred to by their identifiers from external third-party systems, and can keep fieldsets in sync with changes there.

Use cases

Data Ingest functionality in Skylark helps solve the following problems:

  • Use data in a media asset management or scheduling system to populate Skylark content or video playback data

  • Import content from multiple databases to a single instance of Skylark

  • Import editorial data from a third-party CMS

Technical Description

Data Ingest functionality in Skylark is closely related to its versioning capability

As well as a history of changes for each language and for non-translatable data, Skylark can maintain a version of each object that represents its state in an upstream system. No historical versions are stored for upstream data.

Skylark also provides APIs to work directly with data source versions. Customised Skylark installations may include additional functionality to interface with third-party systems that make use of these APIs.

Unique identifier

Skylark uids are not used to interact with data source versions. Instead, data_source_ids are used. These are provided by the upstream system and can be a string of up to 255 characters, which must be unique within each Skylark entity type.

Creating or updating Skylark entities

When a PUT request is made to the a data ingest version URL, a Skylark object may be created or an existing object updated.

If an object with the given data_source_id does not exist, one is created, using the given data to construct the initial fieldsets. The initial versioned fieldsets in the local source are created at the same time, using the same data.

If an object with the given data source id already exists in Skylark, then the existing fieldsets in the upstream data store are updated. If a language has been specified in the request, and no translatable fieldset for the object exists yet in the local source, the new language will be stored in both the local and upstream stores.

Skylark never stores an upstream fieldset with no equivalent local fieldset.

Syncing the data source and local versions

Fields in the local store (or a subset of fields) can be synced automatically with their upstream equivalent to keep the current local version (returned by the standard APIs) of the object up to date with changes made in the external data source.

The list of fields to be kept synchronised is stored in the the MetaFieldset of an object as a list of field names in data_source_fields.

Whenever the object is updated using the data source APIs, such as during an ingest, the fields on the the TranslatableFieldset and NonTranslatableFieldset that are listed in data_source_fields are also updated in the latest version of the object.

If a field name is added to the data_source_fields list during an update, the current value of that field is replaced with the value in the equivalent upstream fieldset. data_source_fields can be updated during a normal object update using either the regular or data ingest APIs. Fields that are not listed in data_source_fields can be modified to contain a different value, and will not be overwritten when the upstream version of the object is updated.

The last_data_ingest field in the MetaFieldset of the object is maintained automatically when the data source APIs are used.

When changing the data_source_id of an object, the values for data_source_fields will be sourced from the existing object before the data_source_id is changed.

Data sources for non-versioned objects

A number of Skylark objects do not support full versioning functionality but may still originate in an external third-party system, such a Schedules or Customers. These objects have data_source_id and last_data_ingest fields but do not have versioning or data source APIs. These fields can, however, be used with normal filters to coordinate a data ingest process.

Data Ingest

Creating a data source version
PUT/{base_url}/versions/data-source/{data_source_id}/

Create or update the object identified by its data_source_id using the upstream source and the non-versioned source, and (if creating) associate the new object with the given data source id.

For example, creating data source versions of Brands the following URL would be used:

/api/brands/versions/data-source/{data_source_id}/

Example URI

PUT /api/sets/versions/data-source/999/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
data_source_id
string (required) Example: 999
Response  200
HideShow
Headers
Content-Type: application/json

Accessing a data source version
GET/{base_url}/versions/data-source/{data_source_id}/

Returns the object identified by its data_source_id using data from the upstream source and the non-versioned source.

Reading the data source version for an object requires authentication as an administrative user with create or update permission for the underlying resource. Read permissions are not sufficient.

Example URI

GET /api/sets/versions/data-source/999/
URI Parameters
HideShow
base_url
string (required) Example: api/sets
data_source_id
string (required) Example: 999
Response  200
HideShow
Headers
Content-Type: application/json

Controlling Responses

What is it?

Skylark allows responses returned to be both reduced or expanded so that constructing a view in a client application can be done with a minimal number of API calls and with the minimum required data transferred. The API also provides paging functionality.

Use cases

  • Remove unneeded fields from a response to save on data transfer

  • Expand relationships to minimise API calls

  • Provide paged search results

Returning only matching results

Filtering by Schedule

Lists are filtered by schedule according to the request context. This is explained in more detail in the Scheduling section.

Filtering objects using field values

Skylark API can return results using queries on fields and values. This allows client applications to get specific search results. These filters can also be used to automatically generate Set contents using Computed Scheduled Items.

The Skylark API can filter in several different ways:

Filter Example Result
Specific value /api/episodes/?slug=titanic Returns the Episodes with the slug ‘titanic’
Not a specific value /api/episodes/?-slug=titanic Returns Episodes that don’t have the slug ‘titanic’
One of a list of values /api/episodes/?slug__in=titanic,groundhogday,primer Returns Episodes that have any one of the included slugs
String contains a substring /api/episodes/?slug__contains=festival Returns episodes with slugs containing the specified string (case-sensitive)
String contains a substring /api/episodes/?slug__icontains=festival Returns episodes with slugs containing the specified string (case-insensitive)
Specified timestamp /api/episodes/​?created__gte=2016-03-31T12:34:56 Created at of after the given timestamp. Dates and times are specified in ISO8601 format
Relative timestamp /api/episodes​?created__gt=-10 day Created within the last 10 days. Relative dates are calculated with respect to the current time.
Relationships /api/images/​?image_type_url=/api/image-types/imag_97107d1bcf0b4d88914450b4524bf111/ Images with the image_type_url field equal to the type at the given URL
Blank /api/sets/?description__blank=true Return all Sets with a blank description
Null /api/sets/?sponsor__isnull=true Return all Sets without a sponsor
Set Contents /api/episodes/​?in_sets=/api/sets/coll_e8400ca3aebb4f70baf74a81aefd5a78/,​/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/ Episodes that have been scheduled into either of the given Sets
Field on relationship /api/episodes/?ratings__slug=rating-test Returns Episodes with the given rating slug.
Multiple relationship URLs /api/episodes/​?tags__tag_url=/api/tags/tag__61799528abc7463abf8147bde3ddb8d3/,​/api/tags/tag__3628192ece49448586eb4a5251153f6a/ Returns Episodes that have either of the given tag URLs.

Timestamp queries can use the following field suffixes:

Suffix Definition
__gte Greater than or equal to the timestamp
__gt Greater than the timestamp
__lte Less than or equal to the timestamp
__lt Less than the timestamp

For more specific results, multiple filters can be chained together:

/?slug=titanic&publish_on__gte=

This example would return any Object with a slug ‘titanic’ that was published on or after the specified date

Errors

If any filter field does not match the Object queried, a 400 Bad Request error is returned showing which field can not be found.

As well as structured filtering, many Skylark objects also support filtering using free-text search by adding the lucene_query parameter to the request containing a search query in Lucene syntax. The fields covered by the search index are dependent on the Skylark configuration.

/?lucene_query=titanic
/?lucene_query=(title:titanic OR synopsis:titanic)

If the complexity of a lucene query is not required, comma-separated search terms can be used with the query parameter e.g.

/?query=title:foo,genre:bar`

If a field does not exist or is not indexed this will just return an empty result list. The fields covered by this feature are dependent on the Skylark configuration.

Free text search can be combined with other filters, though care needs to be taken with performance. End-user facing search features should prefer the Multi-search API, which can search over multiple resource types, track popular searches, and provide spelling corrections.

Paging, Limiting and Ordering

Limiting and ordering parameters can be applied to most API endpoints using the URL parameters start, limit and order

By default all items returned are ordered by internal id. Sort order is ascending by default. It can be reversed by prefixing - (minus sign) for descending.

For example:

Parameters Effect
limit=5 Return the first five items
start=10&limit=5 Returns the 10th to the 15th item ordered by id
start-10&limit=5&order=slug Returns the 10th to the 15th item ordered alphabetically by slug
order=-created&limit=1 Returns the most recently created item

You can sort results by fields of related objects using the order parameter and a double underscore (__).

For example:

Parameters Definition
/api/episodes/?order=schedules__starts Order Episodes by their schedule start date
/api/sets/?order=set_type__slug Order Sets by the slug of their Set Type
/api/schedules/?order=affiliates__slug Order Schedules by the slug of the Affiliate

Where relationships are returned as a list of URLs, the list can be ordered using the order_related_object_fields parameter and the __ (double underscore) to browse objects and fields.

For an episode with several schedules related to it, we can sort the URLs of the schedules according to the schedules’ starts field when we provide the order_related_object_fields parameter:

/api/episodes/?order_related_object_fields=schedule_urls__starts

Other examples:

Parameters Definition
/api/sets/?order_related_object_fields=image_urls__title Order the images URLs on the set according to the title of the images
/api/episodes/?order_related_object_fields=rating_urls__rating_position Order the rating URLs according to the rating_position field
/api/schedules/?order=affiliates__slug Order Schedules by the slug of the Affiliate
/api/brands/?order_related_object_fields=sponsor_urls__name Order the Sponsor URLs according to the sponsors’ name field
/api/episodes/?order_related_object_fields=talent__talent_url__last_name Order the Talent according to their last_name
/api/sets/?order_related_object_fields=tags__tag_url__name Order the tags according to the name of the tag_url related objects

Specifying returned fields

On most endpoints, it is possible to select which fields the API returns by adding the fields parameter to the request URL. Set fields to a comma separated list of field names to return only the named fields in the API response.

/api/sets/?fields=uid,slug

Generally, Skylark will represent relationships between objects as a URL pointing at the related object.

If you set the parameter fields_to_expand to a comma separated list of field names, the URL they contain will be replaced by the full object you would get requesting these URLs.

/api/article/?fields_to_expand=author_url,attribute_url

Field limitation and field expansion can be used at the same time:

/api/article/?fields=author_url&fields_to_expand=author_url

You can limit fields in expanded fields by using two underscores. For example:

/api/article/?fields=author_url,author_url__uid&fields_to_expand=author_url

You can expand and limit fields inside other fields, by using two underscores:

/api/sets/coll_e8400ca3aebb4f70baf74a81aefd5a78/?fields_to_expand=items__content_url&fields=slug,items,items__content_url,items__content_url__slug

If a provided field does not match an object field, a 400 Bad Request error is returned showing which field is wrong.

Articles

These endpoints handle storing and retrieving text articles on your Skylark installation.

The available types of elements you can use to compose your articles depend on your Skylark installation. Each of these elements can have one or more optional triggers, which allow you to attach arbitrary content from your Skylark installation to them. You can also include (escaped) JSON metadata with each trigger to store more details about the relationship (eg. the position of a triggered image).

Article versions all have a separated status. The list of status depends on your installation. Only two are provided by default and must always be available to Skylark :

  • “blank”

  • “published”

All endpoints in this group support returning only a subset of fields.

The article endpoints have a number of fields which are only returned to authenticated users on the CMS:

  • all_languages

  • expired

  • language_ends_on

  • language_is_data_source

  • language_modified

  • language_modified_by

  • language_published

  • language_published_by

  • language_version_number

  • language_version_url

  • modified

  • modified_by

Articles

GET/api/articles/

Example URI

GET /api/articles/
Response  200
HideShow
Body
{
    "objects": [
        {
            "all_languages": ["en"],
            "article_type_url": "/api/article-types/arti_97c7dc09bc66411380b9cf37ffbdc7eb/",
            "created": "2017-05-08T09:39:58.012720+00:00",
            "data_source_fields": [],
            "data_source_id": None,
            "editability": "normal",
            "expired": False,
            "image_urls": [],
            "items": [
                {
                    "content": "No, no, no, no, I never said that...",
                    "content_type": "paragraph",
                    "media": null,
                    "triggers": [
                        {
                            "metadata": "{\"position\": \"left\"}",
                            "url": "/api/episodes/epis_2e33887ad3b24be9ab82918efafdf181/"}
                        }
                    ]
                }
            ],
            "language": "en",
            "language_ends_on": None,
            "language_is_data_source": False,
            "language_modified": "2017-05-08T09:39:58.332075+00:00",
            "language_modified_by": "test@example.com",
            "language_publish_on": "2017-05-08T09:39:58.332075+00:00",
            "language_version_number": 1,
            "language_version_url": "/api/articles/arti_c985c563f6f64c95840e64a902658e44/language-versions/1/",
            "last_data_ingest": None,
            "modified": "2017-05-08T09:39:58.332075+00:00",
            "modified_by": "test@example.com",
            "original_url": None,
            "schedule_statuses": [
                {
                    "self": "/api/schedules/sche_a471a29cdbc24daba076d56c89507023/",
                    "status": "current"
                },
                {
                    "self": "/api/schedules/sche_a78d8973e32543bb8ec86ae46aeda90a/",
                    "status": "current"
                }
            ],
            "schedule_urls": [
                "/api/schedules/sche_a471a29cdbc24daba076d56c89507023/",
                "/api/schedules/sche_a78d8973e32543bb8ec86ae46aeda90a/"
            ],
            "self": "/api/articles/arti_c985c563f6f64c95840e64a902658e44/",
            "slug": "it-had-to-be-yo",
            "status_url": "/api/article-status/arti_23456789abcdef123456789abcdef123/",
            "title": "When Harry meet Sally",
            "uid": "arti_c985c563f6f64c95840e64a902658e44"
        }
    ]
}

POST/api/articles/

Create a new article.

Example URI

POST /api/articles/
Request
HideShow
Body
{
    "article_type_url": "/api/article-types/arti_97c7dc09bc66411380b9cf37ffbdc7eb/",
    "items": [
        {
            "content": "No, no, no, no, I never said that...",
            "content_type": "paragraph",
            "media": null,
            "triggers": [
                {
                    "metadata": "{\"position\": \"left\"}",
                    "url": "/api/episodes/epis_2e33887ad3b24be9ab82918efafdf181/"}
                }
            ]
        }
    ],
    "schedule_urls": [
        "/api/schedules/sche_a471a29cdbc24daba076d56c89507023/",
        "/api/schedules/sche_a78d8973e32543bb8ec86ae46aeda90a/"
    ],
    "self": "/api/articles/arti_c985c563f6f64c95840e64a902658e44/",
    "slug": "it-had-to-be-yo",
    "status_url": "/api/article-status/arti_23456789abcdef123456789abcdef123/",
    "title": "When Harry meet Sally"
}
Response  201
HideShow
Body
{
    "all_languages": ["en"],
    "article_type_url": "/api/article-types/arti_97c7dc09bc66411380b9cf37ffbdc7eb/",
    "created": "2017-05-08T09:39:58.012720+00:00",
    "data_source_fields": [],
    "data_source_id": None,
    "editability": "normal",
    "expired": False,
    "image_urls": [],
    "items": [
        {
            "content": "No, no, no, no, I never said that...",
            "content_type": "paragraph",
            "media": null,
            "triggers": [
                {
                    "metadata": "{\"position\": \"left\"}",
                    "url": "/api/episodes/epis_2e33887ad3b24be9ab82918efafdf181/"}
                }
            ]
        }
    ],
    "language": "en",
    "language_ends_on": None,
    "language_is_data_source": False,
    "language_modified": "2017-05-08T09:39:58.332075+00:00",
    "language_modified_by": "test@example.com",
    "language_publish_on": "2017-05-08T09:39:58.332075+00:00",
    "language_version_number": 1,
    "language_version_url": "/api/articles/arti_c985c563f6f64c95840e64a902658e44/language-versions/1/",
    "last_data_ingest": None,
    "modified": "2017-05-08T09:39:58.332075+00:00",
    "modified_by": "test@example.com",
    "original_url": None,
    "schedule_statuses": [
        {
            "self": "/api/schedules/sche_a471a29cdbc24daba076d56c89507023/",
            "status": "current"
        },
        {
            "self": "/api/schedules/sche_a78d8973e32543bb8ec86ae46aeda90a/",
            "status": "current"
        }
    ],
    "schedule_urls": [
        "/api/schedules/sche_a471a29cdbc24daba076d56c89507023/",
        "/api/schedules/sche_a78d8973e32543bb8ec86ae46aeda90a/"
    ],
    "self": "/api/articles/arti_c985c563f6f64c95840e64a902658e44/",
    "slug": "it-had-to-be-yo",
    "status_url": "/api/article-status/arti_23456789abcdef123456789abcdef123/",
    "title": "When Harry meet Sally",
    "uid": "arti_c985c563f6f64c95840e64a902658e44"
}

Articles:uid

GET/api/articles/{uid}/

Example URI

GET /api/articles/arti_1b21e35c536348c1a374a2fb654446e4/
URI Parameters
HideShow
uid
string (required) Example: arti_1b21e35c536348c1a374a2fb654446e4
Response  200
HideShow
Body
{
    "all_languages": ["en"],
    "article_type_url": "/api/article-types/arti_97c7dc09bc66411380b9cf37ffbdc7eb/",
    "created": "2017-05-08T09:39:58.012720+00:00",
    "data_source_fields": [],
    "data_source_id": None,
    "editability": "normal",
    "expired": False,
    "image_urls": [],
    "items": [
        {
            "content": "No, no, no, no, I never said that...",
            "content_type": "paragraph",
            "media": null,
            "triggers": [
                {
                    "metadata": "{\"position\": \"left\"}",
                    "url": "/api/episodes/epis_2e33887ad3b24be9ab82918efafdf181/"}
                }
            ]
        }
    ],
    "language": "en",
    "language_ends_on": None,
    "language_is_data_source": False,
    "language_modified": "2017-05-08T09:39:58.332075+00:00",
    "language_modified_by": "test@example.com",
    "language_publish_on": "2017-05-08T09:39:58.332075+00:00",
    "language_version_number": 1,
    "language_version_url": "/api/articles/arti_c985c563f6f64c95840e64a902658e44/language-versions/1/",
    "last_data_ingest": None,
    "modified": "2017-05-08T09:39:58.332075+00:00",
    "modified_by": "test@example.com",
    "original_url": None,
    "schedule_statuses": [
        {
            "self": "/api/schedules/sche_a471a29cdbc24daba076d56c89507023/",
            "status": "current"
        },
        {
            "self": "/api/schedules/sche_a78d8973e32543bb8ec86ae46aeda90a/",
            "status": "current"
        }
    ],
    "schedule_urls": [
        "/api/schedules/sche_a471a29cdbc24daba076d56c89507023/",
        "/api/schedules/sche_a78d8973e32543bb8ec86ae46aeda90a/"
    ],
    "self": "/api/articles/arti_c985c563f6f64c95840e64a902658e44/",
    "slug": "it-had-to-be-yo",
    "status_url": "/api/article-status/arti_23456789abcdef123456789abcdef123/",
    "title": "When Harry meet Sally",
    "uid": "arti_c985c563f6f64c95840e64a902658e44"
}

PUT/api/articles/{uid}/

Modify a specific article

Example URI

PUT /api/articles/arti_1b21e35c536348c1a374a2fb654446e4/
URI Parameters
HideShow
uid
string (required) Example: arti_1b21e35c536348c1a374a2fb654446e4
Request
HideShow
Body
{
    "article_type_url": "/api/article-types/arti_97c7dc09bc66411380b9cf37ffbdc7eb/",
    "items": [
        {
            "content": "No, no, no, no, I never said that...",
            "content_type": "paragraph",
            "media": null,
            "triggers": [
                {
                    "metadata": "{\"position\": \"left\"}",
                    "url": "/api/episodes/epis_2e33887ad3b24be9ab82918efafdf181/"}
                }
            ]
        }
    ],
    "schedule_urls": [
        "/api/schedules/sche_a471a29cdbc24daba076d56c89507023/",
        "/api/schedules/sche_a78d8973e32543bb8ec86ae46aeda90a/"
    ],
    "self": "/api/articles/arti_c985c563f6f64c95840e64a902658e44/",
    "slug": "it-had-to-be-yo",
    "status_url": "/api/article-status/arti_23456789abcdef123456789abcdef123/",
    "title": "When Harry meet Sally"
}
Response  200
HideShow
Body
{
    "all_languages": ["en"],
    "article_type_url": "/api/article-types/arti_97c7dc09bc66411380b9cf37ffbdc7eb/",
    "created": "2017-05-08T09:39:58.012720+00:00",
    "data_source_fields": [],
    "data_source_id": None,
    "editability": "normal",
    "expired": False,
    "image_urls": [],
    "items": [
        {
            "content": "No, no, no, no, I never said that...",
            "content_type": "paragraph",
            "media": null,
            "triggers": [
                {
                    "metadata": "{\"position\": \"left\"}",
                    "url": "/api/episodes/epis_2e33887ad3b24be9ab82918efafdf181/"}
                }
            ]
        }
    ],
    "language": "en",
    "language_ends_on": None,
    "language_is_data_source": False,
    "language_modified": "2017-05-08T09:39:58.332075+00:00",
    "language_modified_by": "test@example.com",
    "language_publish_on": "2017-05-08T09:39:58.332075+00:00",
    "language_version_number": 1,
    "language_version_url": "/api/articles/arti_c985c563f6f64c95840e64a902658e44/language-versions/1/",
    "last_data_ingest": None,
    "modified": "2017-05-08T09:39:58.332075+00:00",
    "modified_by": "test@example.com",
    "original_url": None,
    "schedule_statuses": [
        {
            "self": "/api/schedules/sche_a471a29cdbc24daba076d56c89507023/",
            "status": "current"
        },
        {
            "self": "/api/schedules/sche_a78d8973e32543bb8ec86ae46aeda90a/",
            "status": "current"
        }
    ],
    "schedule_urls": [
        "/api/schedules/sche_a471a29cdbc24daba076d56c89507023/",
        "/api/schedules/sche_a78d8973e32543bb8ec86ae46aeda90a/"
    ],
    "self": "/api/articles/arti_c985c563f6f64c95840e64a902658e44/",
    "slug": "it-had-to-be-yo",
    "status_url": "/api/article-status/arti_23456789abcdef123456789abcdef123/",
    "title": "When Harry meet Sally",
    "uid": "arti_c985c563f6f64c95840e64a902658e44"
}

PATCH/api/articles/{uid}/

Partially modify a specific article

Example URI

PATCH /api/articles/arti_1b21e35c536348c1a374a2fb654446e4/
URI Parameters
HideShow
uid
string (required) Example: arti_1b21e35c536348c1a374a2fb654446e4
Request
HideShow
Body
{
  "title": "When Harry left Sally"
}
Response  200
HideShow
Body
{
    "all_languages": ["en"],
    "article_type_url": "/api/article-types/arti_97c7dc09bc66411380b9cf37ffbdc7eb/",
    "created": "2017-05-08T09:39:58.012720+00:00",
    "data_source_fields": [],
    "data_source_id": None,
    "editability": "normal",
    "expired": False,
    "image_urls": [],
    "items": [
        {
            "content": "No, no, no, no, I never said that...",
            "content_type": "paragraph",
            "media": null,
            "triggers": [
                {
                    "metadata": "{\"position\": \"left\"}",
                    "url": "/api/episodes/epis_2e33887ad3b24be9ab82918efafdf181/"}
                }
            ]
        }
    ],
    "language": "en",
    "language_ends_on": None,
    "language_is_data_source": False,
    "language_modified": "2017-05-08T09:39:58.332075+00:00",
    "language_modified_by": "test@example.com",
    "language_publish_on": "2017-05-08T09:39:58.332075+00:00",
    "language_version_number": 1,
    "language_version_url": "/api/articles/arti_c985c563f6f64c95840e64a902658e44/language-versions/1/",
    "last_data_ingest": None,
    "modified": "2017-05-08T09:39:58.332075+00:00",
    "modified_by": "test@example.com",
    "original_url": None,
    "schedule_statuses": [
        {
            "self": "/api/schedules/sche_a471a29cdbc24daba076d56c89507023/",
            "status": "current"
        },
        {
            "self": "/api/schedules/sche_a78d8973e32543bb8ec86ae46aeda90a/",
            "status": "current"
        }
    ],
    "schedule_urls": [
        "/api/schedules/sche_a471a29cdbc24daba076d56c89507023/",
        "/api/schedules/sche_a78d8973e32543bb8ec86ae46aeda90a/"
    ],
    "self": "/api/articles/arti_c985c563f6f64c95840e64a902658e44/",
    "slug": "it-had-to-be-yo",
    "status_url": "/api/article-status/arti_23456789abcdef123456789abcdef123/",
    "title": "When Harry left Sally",
    "uid": "arti_c985c563f6f64c95840e64a902658e44"
}

Article status

Manage Article Statuses.

Each Article has a single Article Type that can be used to define editorial workflow for Articles. Statuses can be defined on a per-deployment basis but must include at least statuses with slugs “draft” and “published” to act as the initial and final statuses, respectively.

POST/api/article-status/

Example URI

POST /api/article-status/
Request
HideShow
Body
{
  "title": "Draft",
  "slug": "draft"
}
Response  201
HideShow
Body
{
  "data_source_fields": [],
  "self": "/api/article-status/arti_154fdd6eb80c44c5a3f255452510dd57/",
  "slug": "draft",
  "title": "Draft",
  "uid": "arti_154fdd6eb80c44c5a3f255452510dd57"
}

GET/api/article-status/

Example URI

GET /api/article-status/
Response  200
HideShow
Body
{
  "objects": [
    {
      "data_source_fields": [],
      "self": "/api/article-status/arti_123456789abcdef123456789abcdef12/",
      "slug": "blank",
      "title": "---",
      "uid": "arti_123456789abcdef123456789abcdef12"
    },
    {
      "data_source_fields": [],
      "self": "/api/article-status/arti_23456789abcdef123456789abcdef123/",
      "slug": "published",
      "title": "Published",
      "uid": "arti_23456789abcdef123456789abcdef123"
    }
  ]
}

Article status:uid

PUT/api/article-status/{uid}/

Example URI

PUT /api/article-status/arti_c859bf100e734674acf5d184113f41d6/
URI Parameters
HideShow
uid
string (required) Example: arti_c859bf100e734674acf5d184113f41d6
Request
HideShow
Body
{
  "title": "Article is being verified",
  "slug": "verification"
}
Response  200
HideShow
Body
{
  "data_source_fields": [],
  "self": "/api/article-status/arti_123456789abcdef123456789abcdef12/",
  "slug": "verification",
  "title": "Article is being verified",
  "uid": "arti_123456789abcdef123456789abcdef12"
}

PATCH/api/article-status/{uid}/

Example URI

PATCH /api/article-status/arti_c859bf100e734674acf5d184113f41d6/
URI Parameters
HideShow
uid
string (required) Example: arti_c859bf100e734674acf5d184113f41d6
Request
HideShow
Body
{
  "title": "Article is being verified"
}
Response  200
HideShow
Body
{
  "data_source_fields": [],
  "self": "/api/article-status/arti_123456789abcdef123456789abcdef12/",
  "slug": "verification",
  "title": "Article is being verified",
  "uid": "arti_123456789abcdef123456789abcdef12"
}

GET/api/article-status/{uid}/

Example URI

GET /api/article-status/arti_c859bf100e734674acf5d184113f41d6/
URI Parameters
HideShow
uid
string (required) Example: arti_c859bf100e734674acf5d184113f41d6
Response  200
HideShow
Body
{
  "data_source_fields": [],
  "self": "/api/article-status/arti_123456789abcdef123456789abcdef12/",
  "slug": "verification",
  "title": "Article is being verified",
  "uid": "arti_123456789abcdef123456789abcdef12"
}

DELETE/api/article-status/{uid}/

Example URI

DELETE /api/article-status/arti_c859bf100e734674acf5d184113f41d6/
URI Parameters
HideShow
uid
string (required) Example: arti_c859bf100e734674acf5d184113f41d6
Response  204

Article types

Manage Article Types.

Each Article has a single Article Type that can be used to classify or categorise Articles.

GET/api/article-types/

Example URI

GET /api/article-types/
Response  200
HideShow
Body
{
  "objects": [
    {
      "label": "Quote",
      "slug": "quote",
      "self": "/api/article-types/arti_5f85aa392a724ffeb9c4e266a8dea7b1/",
      "uid": "arti_5f85aa392a724ffeb9c4e266a8dea7b1"
    },
    {
      "label": "News",
      "slug": "news",
      "self": "/api/article-types/arti_7f525d28497644219392cb5fd4b528ee/",
      "uid": "arti_7f525d28497644219392cb5fd4b528ee"
    }
  ]
}

POST/api/article-types/

Example URI

POST /api/article-types/
Request
HideShow
Body
{
  "label": "News"
}
Response  201
HideShow
Body
{
  "label": "News",
  "slug": "news",
  "self": "/api/article-types/arti_22dd1d2a560948aa839cd4ee969eee1b/",
  "uid": "arti_22dd1d2a560948aa839cd4ee969eee1b"
}

Article types:uid

GET/api/article-types/{uid}/

Example URI

GET /api/article-types/arti_fc04c27b59b3474095dd4e2059478e59/
URI Parameters
HideShow
uid
string (required) Example: arti_fc04c27b59b3474095dd4e2059478e59
Response  200
HideShow
Body
{
  "label": "News",
  "slug": "news",
  "self": "/api/article-types/arti_fc04c27b59b3474095dd4e2059478e59/",
  "uid": "arti_fc04c27b59b3474095dd4e2059478e59"
}

PUT/api/article-types/{uid}/

Example URI

PUT /api/article-types/arti_fc04c27b59b3474095dd4e2059478e59/
URI Parameters
HideShow
uid
string (required) Example: arti_fc04c27b59b3474095dd4e2059478e59
Request
HideShow
Body
{
  "label": "News Article",
  "slug": "news-article"
}
Response  200
HideShow
Body
{
  "label": "News Article",
  "slug": "news-article",
  "self": "/api/article-types/arti_fc04c27b59b3474095dd4e2059478e59/",
  "uid": "arti_fc04c27b59b3474095dd4e2059478e59"
}

PATCH/api/article-types/{uid}/

Example URI

PATCH /api/article-types/arti_fc04c27b59b3474095dd4e2059478e59/
URI Parameters
HideShow
uid
string (required) Example: arti_fc04c27b59b3474095dd4e2059478e59
Request
HideShow
Body
{
  "label": "News Article"
}
Response  200
HideShow
Body
{
  "label": "News Article",
  "slug": "news-article",
  "self": "/api/article-types/arti_fc04c27b59b3474095dd4e2059478e59/",
  "uid": "arti_fc04c27b59b3474095dd4e2059478e59"
}

DELETE/api/article-types/{uid}/

Example URI

DELETE /api/article-types/arti_fc04c27b59b3474095dd4e2059478e59/
URI Parameters
HideShow
uid
string (required) Example: arti_fc04c27b59b3474095dd4e2059478e59
Response  204

Box Office

Subscriptions

Create and retrieve subscriptions for a customer.

This call supports filtering by users

GET/api/subscriptions/

List current subscriptions.

Example URI

GET /api/subscriptions/
Request
HideShow
Headers
Authorization: JWT token
Response  200
HideShow
Body
{
    "objects": [
        {
            "current_period_start": "2015-09-24T11:34:49.046737+00:00",
            "cancel_at_period_end": false,
            "current_period_end": "2016-09-24T11:34:49.046737+00:00",
            "data_source_id": "zzz",
            "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
            "self": "subs_0cfe07315fda417eb8eb46fb53f6d74b",
            "plan": {
                "product": {
                    "type": "content",
                    "slug": "seeing-the-new-year-in-1915"
                },
                "uid": "plan_9c4e3dfc31474fd2b8ab617e5a44c441",
                "stripe_id": "1-14",
                "self": "/api/plans/plan_9c4e3dfc31474fd2b8ab617e5a44c441/",
                "interval": "year",
                "entitlement_url": null,
                "interval_count": 1,
                "content_url": "/api/episodes/epis_7a36ada88ff947848a19108bd9d2dc9b/",
                "schedule_urls": [
                    "/api/schedules/sche_cac28cedce464225996ffec85a64a5ee/"
                ],
                "amount": 1749,
                "price_point_url": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
                "trial_period_days": null,
                "original_amount": 1750,
                "recurring": false,
            }
        }
    ]
}

POST/api/subscriptions/

Create a new Subscription for a user.

Optionally card_url together with exp_month and exp_year can be given. In this case, the expiry date and month are validated against stored details and the request is rejected with a 400 Bad Request if they do not match.

If coupon is provided in the request, it should be a user-facing code from a Promotion, and it will be applied to the payment. No provider_card_id or card_token are required if the promotion covers the entire cost of the subscription.

Example URI

POST /api/subscriptions/
Request
HideShow
Headers
Authorization: JWT token
Body
{
    "plan_id": 774,
    "card_url": "/api/cards/abc123/",
    "exp_month": "10",
    "exp_year": "2014",
}
Response  200
HideShow
Body
{
  "self": "subs_0cfe07315fda417eb8eb46fb53f6d74b",
  "current_period_start": "2015-09-24T11:34:49.046737+00:00",
  "cancel_at_period_end": false,
  "current_period_end": "2015-07-07T15:16:48.920396+00:00",
  "data_source_id": "zzz",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
  "plan_url": "/api/plans/plan_9c4e3dfc31474fd2b8ab617e5a44c441/"
}
Request
HideShow
Headers
Authorization: JWT token
Body
{
  "plan_id": 774,
  "coupon": "SUMMER20"
}
Response  200
HideShow
Body
{
  "self": "subs_0cfe07315fda417eb8eb46fb53f6d74b",
  "current_period_start": "2015-09-24T11:34:49.046737+00:00",
  "cancel_at_period_end": false,
  "current_period_end": "2015-07-07T15:16:48.920396+00:00",
  "data_source_id": "zzz",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
  "plan_url": "/api/plans/plan_9c4e3dfc31474fd2b8ab617e5a44c441/"
}

Entitlements

Content that a customer is entitled to view.

POST/api/entitlements/

Create an Entitlement for a Customer to a specific piece of content. The Customer must already have a valid Subscription to a Plan that contains the content.

A list of all entitlements created is returned.

This call supports filtering by users

Adding ?manual_override to the API will create just an entitlement without a subscription to a plan. This is intended to be used to fix issues quickly or as a gesture of goodwill if there have been technical or other problems.

Example URI

POST /api/entitlements/
Request
HideShow
Headers
Authorization: JWT token
Body
{
    "episode_url": "/api/episodes/epis_33a1c5fea05d4955ac3288bda19dcb16/",
}
Response  201
HideShow
Body
{
  "objects": [
    {
      "viewing_window_in_hours": 48,
      "started_watching_on": null,
      "purchased_with": null,
      "slug": "C8SXpWmPahTskAqaREKPV9",
      "date": "2014-12-02T13:18:28.686828+00:00",
      "purchase_window_in_days": 30,
      "expires_soon": null,
      "time_remaining": "29 days left",
      "expired_since": null,
      "customer_id": 14713,
      "expired": false,
      "id": "asse_09a8bf8f0c054793ab4624794587ee0b",
      "film": "film-slug",
      "time_remaining_in_minutes": 43193
    }
  ]
}

GET/api/entitlements/

Get entitlements for an user. Supports search with ‘q’.

This call supports filtering by users

Example URI

GET /api/entitlements/
Request
HideShow
Headers
Authorization: JWT token
Response  200
HideShow
Body
{
  "objects": [
    {
      "viewing_window_in_hours": 48,
      "started_watching_on": null,
      "purchased_with": null,
      "slug": "C8SXpWmPahTskAqaREKPV9",
      "date": "2014-12-02T13:18:28.686828+00:00",
      "purchase_window_in_days": 30,
      "expires_soon": null,
      "time_remaining": "29 days left",
      "expired_since": null,
      "customer_id": 14713,
      "expired": false,
      "id": 476,
      "film": "film-slug",
      "time_remaining_in_minutes": 43193
    }
  ]
}
Response  204

Entitlements:uid

PATCH/api/entitlements/

Update attributes of an entitlement. Currently supports passing:

  • viewing_window

  • purchase_window

  • expires_on

  • user (id)

Example URI

PATCH /api/entitlements/
Request
HideShow
Headers
Authorization: JWT token
Body
{
  "purchase_window": "10 days",
  "viewing_window": "6 hours"
}
Response  200
HideShow
Body
{
  "viewing_window_in_hours": 6,
  "started_watching_on": null,
  "purchased_with": null,
  "slug": "C8SXpWmPahTskAqaREKPV9",
  "date": "2014-12-02T13:18:28.686828+00:00",
  "purchase_window_in_days": 14,
  "expires_soon": null,
  "time_remaining": "10 days left",
  "expired_since": null,
  "customer_id": 14713,
  "expired": false,
  "id": 476,
  "film": "film-slug",
  "time_remaining_in_minutes": 14400
}

Viewings

Viewings are requested at playback time to validate entitlements and provide the necessary OVP details required to begin playback, such as a token or signature.

After the viewing is created, statistical and tracking information about the viewing can be retrieved, but playback details are no longer available.

Authenticated customers are restricted to retrieving their own viewings. Administrators with read permission on this resource can retrieve any viewing.

Viewings cannot be updated or deleted.

GET/api/viewings/

Get a list of viewings.

This call is filterable and sortable.

This call supports filtering by users

Example URI

GET /api/viewings/
Request
HideShow
Headers
Authorization: JWT token
Response  200
HideShow
Body
{
    "objects": [
        {
            "self": "/api/viewings/view_a279df4a15f94ec0973e2ec6e7c92ace/",
            "uid": "view_a279df4a15f94ec0973e2ec6e7c92ace",
            "started_watching_on": "2016-03-31T15:30:35.824684+00:00",
            "asset_url": "/api/assets/asse_b9744f9fc9094018a609e5b2e0188e7d/",
            "customer_url": "/api/customers/cust_3bd0fa04fabf46cf97c4ceac6a9a81ce/",
            "customer_entitlement_url": "/api/entitlements/cust_171f665010274f3ea2580c87e56221bc/",
            "data_source_fields": [],
            "data_source_id": null
            "last_data_ingest": null,
        }
    ]
}

POST/api/viewings/

Create a new viewing. Return the details required to initialise a player or authorise a licence.

For on-demand content, an asset_url should be provided. For live-stream content, a channel_url or epg_programme_url can be provided, though Viewings can only be created for EPG programmes that are currently being shown, as determined by their slot time.

If the content belongs to an account that is restricted, the request must be authenticated and an Entitlement must already exist for the content. Free content does not require an Entitlement or authentication for a viewing to be issued. See Users, Entitlements and Playback for more information about this flow.

Asset information is returned grouped by OVP account. The fields returned to authorise playback vary depending on the OVP integration configured.

If a CDN Recommendation service is configured for the Skylark installation, the returned accounts are in priority order.

If the user is not logged in, the client can supply a randomly generated UUID as user_identifier when requesting a viewing for analytics purposes.

Viewing errors

These errors might occur when creating viewings:

  • NO_VIEWING_RECORD_PROVIDED: no field that resolved to a piece of content was provided

  • NO_PROGRAMME_FOUND_ON_CHANNEL: no programme could be located on the given channel

  • PROGRAMME_IS_NOT_ON_NOW: the programme provided could not match a current slot

  • NO_VALID_ENTITLEMENT_FOR_CONTENT: the content requires an entitlement, but no valid customer entitlement could be found

Example URI

POST /api/viewings/
Request
HideShow
Headers
Authorization: JWT token
Body
{
  "asset_url": "/api/assets/asse_c425f7d969be4c7a93dc62a73b7f45de/",
  "user_identifier": "7e0601fd-385c-4762-8fff-db09216712d7"
}
Response  200
HideShow
Body
{
    "objects": [
        {
            "ooyala": {
                "signature": "asjkdla890",
                "streams": ["http://www.ooyala.com/stream1"]
                "expires": "2015-02-02T13:18:28.699629+00:00",
                "user_identifier": "user-id"
            }
        },
        {
            "akamai": {
                "hls_url": "http://akamai.com/hls_url?signature",
                "hds_url": "http://akamai.com/hds_url?signature",
                "expires": "2015-02-02T13:18:28.699629+00:00",
                "user_identifier": "user-id"
            }
        }
    ]
}

Viewings:uid

GET/api/viewings/{uid}/

Get a specific viewing by UID.

This call supports filtering by users

Example URI

GET /api/viewings/view_198a0101fc7f4189b8eeb14f68c6bf83/
URI Parameters
HideShow
uid
string (required) Example: view_198a0101fc7f4189b8eeb14f68c6bf83
Request
HideShow
Headers
Authorization: JWT token
Response  200
HideShow
Body
{
    "self": "/api/viewings/view_a279df4a15f94ec0973e2ec6e7c92ace/",
    "uid": "view_a279df4a15f94ec0973e2ec6e7c92ace",
    "started_watching_on": "2016-03-31T15:30:35.824684+00:00",
    "asset_url": "/api/assets/asse_b9744f9fc9094018a609e5b2e0188e7d/",
    "customer_url": "/api/customers/cust_3bd0fa04fabf46cf97c4ceac6a9a81ce/",
    "customer_entitlement_url": "/api/entitlements/cust_171f665010274f3ea2580c87e56221bc/",
    "data_source_fields": [],
    "data_source_id": null
    "last_data_ingest": null,
}

Transactions

Get details of payments made by customers.

GET/api/transactions/

This call supports filtering by users

Example URI

GET /api/transactions/
Response  200
HideShow
Body
{
  "objects": [
    {
      "title": "Back to the Future",
      "provider_charge_id": "497e1b52-65a6-460e-bb1f-2d4e6c8d69a4",
      "discount": null,
      "amount": 298,
      "date": "2014-12-02T13:18:28.699629+00:00",
      "id": 4,
      "data_source_id": "aaa",
      "last_data_ingest": "2015-09-04T13:27:58.767434+00:00"
    }
  ]
}

Payment cards

GET/api/cards/

** Deprecated **

Retrieve stored cards for a customer.

This call supports filtering by users

Example URI

GET /api/cards/
Request
HideShow
Headers
Authorization: JWT token
Response  200
HideShow
Body
{
  "objects": [
    {
      "self": "card_1234",
      "cvc_check": true,
      "exp_month": 3,
      "funding": "credit",
      "address_line1_check": true,
      "brand": "Visa",
      "last4": "4242",
      "address_line1": "20 East Street",
      "address_zip_check": true,
      "exp_year": 2015,
      "customer_id": 14713,
      "provider_card_id": "card_155GjfGTJ3sqEqjtCtMmhk7g",
      "id": 80,
      "address_zip": "SE1 1AB"
    }
  ]
}

POST/api/cards/

** Deprecated **

Add a new card to the customer’s account. This call supports filtering by users

  • card_token (string) … A valid Stripe token.

  • address_line1 (string) … Customer’s first line of address

  • name (string) … Customer’s name

  • address_zip (string) … Customer’s postcode

Example URI

POST /api/cards/
Request
HideShow
Headers
Authorization: JWT token
Body
{
  "card_token": "tok_155GjfGTJ3sqEqjtYwRXANtq",
  "address_line1": "20 East Street",
  "name": "Skye Lark",
  "address_zip": "SE1 1AB"
}
Response  400
HideShow
Body
{
  "self": "card_1234",
  "cvc_check": "pass",
  "exp_month": 3,
  "funding": "credit",
  "address_line1_check": "pass",
  "brand": "Visa",
  "last4": "4242",
  "address_line1": "20 East Street",
  "address_zip_check": "pass",
  "exp_year": 2015,
  "customer_id": 14713,
  "provider_card_id": "card_155GjfGTJ3sqEqjtCtMmhk7g",
  "id": 80,
  "address_zip": "SE1 1AB"
}

Payment cards:uid

** Deprecated **

Limited card details are stored in the API, full card details are in the payment backend.

GET/api/cards/{uid}/

** Deprecated **

Get the full details of a card, identified by the payment backend’s card id. This call supports filtering by users

Example URI

GET /api/cards/card_155GjfGTJ3sqEqjtCtMmhk7g/
URI Parameters
HideShow
uid
string (required) Example: card_155GjfGTJ3sqEqjtCtMmhk7g
Request
HideShow
Headers
Authorization: JWT token
Response  200
HideShow
Body
{
  "self": "card_155GjfGTJ3sqEqjtCtMmhk7g",
  "cvc_check": true,
  "exp_month": 3,
  "funding": "credit",
  "address_line1_check": true,
  "brand": "Visa",
  "last4": "4242",
  "address_line1": "20 East Street",
  "address_zip_check": true,
  "exp_year": 2015,
  "customer_id": 14713,
  "provider_card_id": "card_155GjfGTJ3sqEqjtCtMmhk7g",
  "id": 80,
  "address_zip": "SE1 1AB",
  "last_used": "2000-01-01T00:00:00+00:00"
}

PATCH/api/cards/{uid}/

Partial update of Card resource

Example URI

PATCH /api/cards/card_155GjfGTJ3sqEqjtCtMmhk7g/
URI Parameters
HideShow
uid
string (required) Example: card_155GjfGTJ3sqEqjtCtMmhk7g
Request
HideShow
Headers
Authorization: JWT token
Body
{
  "exp_year": 2020
}
Response  200
HideShow
Body
{
  "self": "card_155GjfGTJ3sqEqjtCtMmhk7g",
  "cvc_check": true,
  "exp_month": 3,
  "funding": "credit",
  "address_line1_check": true,
  "brand": "Visa",
  "last4": "4242",
  "address_line1": "20 East Street",
  "address_zip_check": true,
  "exp_year": 2020,
  "customer_id": 14713,
  "provider_card_id": "card_155GjfGTJ3sqEqjtCtMmhk7g",
  "id": 80,
  "address_zip": "SE1 1AB",
  "last_used": "2000-01-01T00:00:00+00:00"
}

DELETE/api/cards/{uid}/

** Deprecated **

Delete a stored card This call supports filtering by users

Example URI

DELETE /api/cards/card_155GjfGTJ3sqEqjtCtMmhk7g/
URI Parameters
HideShow
uid
string (required) Example: card_155GjfGTJ3sqEqjtCtMmhk7g
Request
HideShow
Headers
Authorization: JWT token
Response  204

Payment Method Types

GET/api/payment-method-types/

Example URI

GET /api/payment-method-types/
Response  200
HideShow
Body
{
  "objects": [
    {
      "detail_fields": [
        "account_currency_code",
        "token",
        "paypal_username"
      ],
      "uid": "paym_62c2079132be4ff7a483e742759cf0fb",
      "schedule_urls": [
        "/api/schedules/sche_fffd4d24e0c947a6a94d6d6a738f11fe/"
      ],
      "self": "/api/payment-method-types/paym_62c2079132be4ff7a483e742759cf0fb/",
      "data_source_id": null,
      "last_data_ingest": null,
      "name": "paywizard_paypal"
    }
  ]
}

User Payment Methods

GET/api/user-payment-methods/

Example URI

GET /api/user-payment-methods/
Response  200
HideShow
Body
{
  "objects": [
    {
      "uid": "user_8a4d3f4c39d849bdb2a8bb4d1e91e077",
      "data_source_id": null,
      "created": "2017-08-03T14:12:05.311058+00:00",
      "user": "admin@example.com",
      "payment_method_type_url": "/api/payment-method-types/paym_62c2079132be4ff7a483e742759cf0fb/",
      "self": "/api/user-payment-methods/user_8a4d3f4c39d849bdb2a8bb4d1e91e077/",
      "last_data_ingest": null,
      "details": {
        "account_currency_code": "GBP",
        "token": "abc123",
        "paypal_username": ""
      }
    }
  ]
}

POST/api/user-payment-methods/

Details are different depending on the payment method type.

Example URI

POST /api/user-payment-methods/
Request
HideShow
Headers
Authorization: JWT token
Body
{
  "payment_method_type_url": "/api/payment-method-types/paym_62c2079132be4ff7a483e742759cf0fb/",
  "details": {
    "account_currency_code": "GBP",
    "token": "abc123"
  }
}
Response  201
HideShow
Body
{
  "uid": "user_8a4d3f4c39d849bdb2a8bb4d1e91e077",
  "data_source_id": null,
  "created": "2017-08-03T14:12:05.311058+00:00",
  "user": "admin@example.com",
  "payment_method_type_url": "/api/payment-method-types/paym_62c2079132be4ff7a483e742759cf0fb/",
  "self": "/api/user-payment-methods/user_8a4d3f4c39d849bdb2a8bb4d1e91e077/",
  "last_data_ingest": null,
  "details": {
    "account_currency_code": "GBP",
    "token": "abc123",
    "paypal_username": ""
  }
}

User Payment Methods:uid

GET/api/user-payment-methods/redirect/

Example URI

GET /api/user-payment-methods/redirect/
Request
HideShow
Headers
Authorization: JWT token
Response  201
HideShow
Body
{
  "redirect": "<form></form>"
}

DataLog

If enabled, a history of all changes made via the API is automatically stored in DataLog. A direct change_type is one to the object requested. An indirect change_type is a change to another object that affects the object requested. Eg: A change to a ScheduledItem change affects the Set.

To keep track of what things an ingest changes, an IngestLog should be created via the API, at the start of an ingest. An INGEST_UID header should be added to other POST/PUT/PATCH API calls in the ingest. Then you can filter /api/datalog/ by ?ingest_url= to see what an ingest did.

DataLog

GET/api/datalog/

Use ?object=/api/foo/uid_123 to see changes for a specific object.

Example URI

GET /api/datalog/
Response  200
HideShow
Body
{
  "objects": [
    {
      "change_type": "direct",
      "uid": "data_c5aecd41b7354758938002745175b28e",
      "request_body": "{\"title\":\"hello set\",\"slug\":\"hello-set\",\"summary\":\"\",\"body\":\"\",\"featured\":false,\"schedule_urls\":[],\"set_type_url\":\"/api/set-types/sett_febfffc998c74fb0a90e214aa7942da0/\"}",
      "created": "2017-02-21T14:18:07.315123+00:00",
      "response_body": "{\"all_languages\": [\"en\"], \"uid\": \"coll_13d3ce49c2e546aabcb98e659efafb46\", \"metadata_modified_by\": \"admin@example.com\", \"schedule_urls\": [], \"publish_on\": \"2017-02-21T14:18:07.153096+00:00\", \"quoter\": \"\", \"language_modified_by\": \"admin@example.com\", \"schedule_statuses\": [], \"modified_by\": \"admin@example.com\", \"metadata_modified\": \"2017-02-21T14:18:07.153096+00:00\", \"schedule_url\": null, \"self\": \"/api/sets/coll_13d3ce49c2e546aabcb98e659efafb46/\", \"created_by\": \"admin@example.com\", \"language_publish_on\": \"2017-02-21T14:18:07.160490+00:00\", \"language_modified\": \"2017-02-21T14:18:07.160490+00:00\", \"data_source_fields\": [], \"has_price\": false, \"set_type_url\": \"/api/set-types/sett_febfffc998c74fb0a90e214aa7942da0/\", \"data_source_id\": null, \"body\": \"\", \"plans\": [], \"tags\": [], \"quote\": \"\", \"formatted_body\": \"\", \"image_urls\": [], \"hierarchy_url\": null, \"sponsor_urls\": [], \"stats\": null, \"slug\": \"hello-set\", \"last_data_ingest\": null, \"version_number\": 0, \"language_ends_on\": null, \"language\": \"en\", \"created\": \"2017-02-21T14:18:07.153096+00:00\", \"items\": [], \"language_version_number\": 0, \"title\": \"hello set\", \"modified\": \"2017-02-21T14:18:07.153215+00:00\", \"summary\": \"\", \"ends_on\": null, \"version_url\": \"/api/sets/coll_13d3ce49c2e546aabcb98e659efafb46/versions/0/\", \"set_type_slug\": \"home\", \"language_is_data_source\": false, \"editability\": \"normal\", \"language_version_url\": \"/api/sets/coll_13d3ce49c2e546aabcb98e659efafb46/language-versions/0/\", \"is_data_source\": false}",
      "self": "/api/datalog/data_c5aecd41b7354758938002745175b28e/",
      "created_by": "admin@example.com",
      "ingest_url": null,
      "changed_object_url": "/api/sets/coll_13d3ce49c2e546aabcb98e659efafb46/",
      "action": "POST",
      "changes": ""
    }
  ]
}

IngestLog

GET/api/ingestlog/

Example URI

GET /api/ingestlog/
Response  200
HideShow
Body
{
  "objects": [
    {
      "self": "/api/ingestlog/inge_8e75ae9a32144ebba2468370c0536d0d/",
      "document": "<xml></xml>",
      "uid": "inge_8e75ae9a32144ebba2468370c0536d0d",
      "created": "2017-02-21T14:30:20.466724+00:00"
    }
  ]
}

POST/api/ingestlog/

Create a new ingestlog. Use the UID in headers for other API requests.

Example URI

POST /api/ingestlog/
Request
HideShow
Body
{
  "document": "<xml></xml>"
}
Response  201
HideShow
Body
{
  "self": "/api/ingestlog/inge_8e75ae9a32144ebba2468370c0536d0d/",
  "document": "<xml></xml>",
  "uid": "inge_8e75ae9a32144ebba2468370c0536d0d",
  "created": "2017-02-21T14:30:20.466724+00:00"
}

IngestLog:uid

GET/api/ingestlog/{uid}/

Example URI

GET /api/ingestlog/inge_8e75ae9a32144ebba2468370c0536d0d/
URI Parameters
HideShow
uid
string (required) Example: inge_8e75ae9a32144ebba2468370c0536d0d
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/ingestlog/inge_8e75ae9a32144ebba2468370c0536d0d/",
  "document": "<xml></xml>",
  "uid": "inge_8e75ae9a32144ebba2468370c0536d0d",
  "created": "2017-02-21T14:30:20.466724+00:00"
}

Images

In order to make a visually compelling Video on Demand product, it is important to be able to have images associated with video content so users aren’t just presented with lists. Within Skylark, images can be associated with content and can be organised to make them easier to find for editorial teams.

Images are generally associated with another Skylark object such as a Set or piece of TV Content, identified by the content_url in the image metadata. Objects can have multiple images, which can be classified with an Image Type and ordered by position.

Images can also be treated as content in their own right, and can be (for example) added to a set to form a gallery. In this case, the content_url is left set to null.

Images

This API endpoint allows Skylark to return all the image metadata available in the database and create new images.

The URL to the original image file is given in url. This image can be converted or resized by changing the URL suffix to invoke the resizer.

Images support versioning.

GET/api/images/

This call is filterable and sortable.

Example URI

GET /api/images/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "uid": "imag_fcdf67481d8147e6844d838f4112fca2",
      "schedule_urls": [
        "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
      ],
      "language_version_url": "/api/images/imag_fcdf67481d8147e6844d838f4112fca2/language-versions/0/",
      "content_url": "/api/sets/coll_70843353847d4ea4a6f7d6f0eb8a7ae1/",
      "url": "https://example.com//media/images/stills/film/980/promo210350250.jpg",
      "image_type_url": "/api/image-types/imag_97107d1bcf0b4d88914450b4524bf111/",
      "upload_image_url": "/api/images/imag_fcdf67481d8147e6844d838f4112fca2/upload/",
      "language_modified_by": null,
      "align": "default",
      "last_data_ingest": null,
      "description": "",
      "language_ends_on": null,
      "title": "ostmodern",
      "image_type": "footer",
      "self": "/api/images/imag_fcdf67481d8147e6844d838f4112fca2/",
      "created": "2014-10-27T11:25:52.490000+00:00",
      "created_by": null,
      "language_publish_on": "2015-06-23T14:38:52.455000+00:00",
      "language_modified": "2015-06-23T14:38:52.455000+00:00",
      "data_source_fields": [],
      "position": 1,
      "language_is_data_source": false,
      "language_version_number": 0,
      "data_source_id": ""
    }
  ]
}

POST/api/images/

There are two approaches for creating an image and its metadata. One approach fetches and imports the image into Skylark, the other provides a URL to upload the image.

The first approach uses the image_location field to tell Skylark where the image is to be downloaded from. After the image metadata has been created, the images will be downloaded from image_location and stored in Skylark asynchronously.

The second approach is a two step process:

  1. Create the metadata for a image (without specifying image_location)

  2. Upload the image file by POSTing it to the URL specified by upload_image_url in the returned metadata.

The align field can take the values top, middle, bottom or default (the default).

Example URI

POST /api/images/
Request
HideShow
Body
{
  "image_type_url": "/api/image-types/imag_97107d1bcf0b4d88914450b4524bf919/",
  "title": "API TEST",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "position": 4,
  "content_url": "/api/episodes/epis_bc59d697927e44f4a78b26fff1d6c23a/",
  "image_location": "http://test-location.com/test.jpg",
  "align": "top"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "imag_4a3fd98f9c1f4ae884d27dfc0469ea04",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "language_version_url": "/api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/language-versions/0/",
  "content_url": "/api/episodes/epis_bc59d697927e44f4a78b26fff1d6c23a/",
  "url": null,
  "image_type_url": "/api/image-types/imag_97107d1bcf0b4d88914450b4524bf919/",
  "upload_image_url": "/api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/upload/",
  "language_modified_by": null,
  "align": "top",
  "last_data_ingest": null,
  "description": "",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "title": "API TEST",
  "image_type": "header",
  "self": "/api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/",
  "created": "2015-09-24T15:11:56.440233+00:00",
  "created_by": "roy@gmail.com",
  "language_publish_on": "2015-09-24T15:11:56.440233+00:00",
  "language_modified": "2015-09-24T15:11:56.440233+00:00",
  "data_source_fields": [],
  "position": 4,
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": ""
}

Images:uid

GET/api/images/{uid}/

Example URI

GET /api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/
URI Parameters
HideShow
uid
string (required) Example: imag_4a3fd98f9c1f4ae884d27dfc0469ea04
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "imag_4a3fd98f9c1f4ae884d27dfc0469ea04",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "language_version_url": "/api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/language-versions/0/",
  "content_url": "/api/episodes/epis_bc59d697927e44f4a78b26fff1d6c23a/",
  "url": null,
  "image_type_url": "/api/image-types/imag_97107d1bcf0b4d88914450b4524bf919/",
  "upload_image_url": "/api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/upload/",
  "language_modified_by": null,
  "align": "top",
  "last_data_ingest": null,
  "description": "",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "title": "API TEST",
  "image_type": "header",
  "self": "/api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/",
  "created": "2015-09-24T15:11:56.440233+00:00",
  "created_by": "roy@gmail.com",
  "language_publish_on": "2015-09-24T15:11:56.440233+00:00",
  "language_modified": "2015-09-24T15:11:56.440233+00:00",
  "data_source_fields": [],
  "position": 4,
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": ""
}

PUT/api/images/{uid}/

To update the file within the image repeat step 2 of the create image process: provide an image_location in the update or upload a new file using the upload_image_url.

Example URI

PUT /api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/
URI Parameters
HideShow
uid
string (required) Example: imag_4a3fd98f9c1f4ae884d27dfc0469ea04
Request
HideShow
Body
{
  "image_type_url": "/api/image-types/imag_97107d1bcf0b4d88914450b4524bf919/",
  "title": "API TEST",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "position": 1,
  "content_url": "/api/episodes/epis_bc59d697927e44f4a78b26fff1d6c23a/",
  "align": "top"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "imag_4a3fd98f9c1f4ae884d27dfc0469ea04",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "language_version_url": "/api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/language-versions/0/",
  "content_url": "/api/episodes/epis_bc59d697927e44f4a78b26fff1d6c23a/",
  "url": null,
  "image_type_url": "/api/image-types/imag_97107d1bcf0b4d88914450b4524bf919/",
  "upload_image_url": "/api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/upload/",
  "language_modified_by": null,
  "align": "top",
  "last_data_ingest": null,
  "description": "",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "title": "API TEST",
  "image_type": "header",
  "self": "/api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/",
  "created": "2015-09-24T15:11:56.440233+00:00",
  "created_by": "roy@gmail.com",
  "language_publish_on": "2015-09-24T15:11:56.440233+00:00",
  "language_modified": "2015-09-24T15:11:56.440233+00:00",
  "data_source_fields": [],
  "position": 1,
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": ""
}

DELETE/api/images/{uid}/

Example URI

DELETE /api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/
URI Parameters
HideShow
uid
string (required) Example: imag_4a3fd98f9c1f4ae884d27dfc0469ea04
Response  204

Images:uid:upload

POST/api/images/{uid}/upload/

Add or replace the image file for the image metadata identified by the given UID.

The request should be made in multipart/form-data format with the image contained in a field named file. Any given filename will be ignored and a new URL for the binary image will be created.

JPEG, PNG, GIF, WEBP, and JP2 file formats are supported.

Example URI

POST /api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/upload/
URI Parameters
HideShow
uid
string (required) Example: imag_4a3fd98f9c1f4ae884d27dfc0469ea04
Request
HideShow
Headers
Content-Type: multipart/form-data
Response  201
HideShow
Body
{
  "uid": "imag_4a3fd98f9c1f4ae884d27dfc0469ea04",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "language_version_url": "/api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/language-versions/0/",
  "content_url": "/api/episodes/epis_bc59d697927e44f4a78b26fff1d6c23a/",
  "url": null,
  "image_type_url": "/api/image-types/imag_97107d1bcf0b4d88914450b4524bf919/",
  "upload_image_url": "/api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/upload/",
  "language_modified_by": null,
  "align": "top",
  "last_data_ingest": null,
  "description": "",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "title": "API TEST",
  "image_type": "header",
  "self": "/api/images/imag_4a3fd98f9c1f4ae884d27dfc0469ea04/",
  "created": "2015-09-24T15:11:56.440233+00:00",
  "created_by": "roy@gmail.com",
  "language_publish_on": "2015-09-24T15:11:56.440233+00:00",
  "language_modified": "2015-09-24T15:11:56.440233+00:00",
  "data_source_fields": [],
  "position": 4,
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": ""
}

Image types

GET/api/image-types/

Get a list of available image types.

Example URI

GET /api/image-types/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "self": "/api/image-types/imag_97107d1bcf0b4d88914450b4524bf919/",
      "uid": "imag_97107d1bcf0b4d88914450b4524bf919",
      "name": "header"
    }
  ]
}

POST/api/image-types/

Create a new image type.

Example URI

POST /api/image-types/
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Thumbnail"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/imag_image-types/b07b6dfb0f404f8eac19aafdb3c3b680/",
  "uid": "imag_b07b6dfb0f404f8eac19aafdb3c3b680",
  "name": "Thumbnail"
}

Image types:uid

GET/api/image-types/{uid}/

Example URI

GET /api/image-types/imag_b07b6dfb0f404f8eac19aafdb3c3b680/
URI Parameters
HideShow
uid
string (required) Example: imag_b07b6dfb0f404f8eac19aafdb3c3b680
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/imag_image-types/b07b6dfb0f404f8eac19aafdb3c3b680/",
  "uid": "imag_b07b6dfb0f404f8eac19aafdb3c3b680",
  "name": "Thumbnail"
}

PUT/api/image-types/{uid}/

Update an image type or create one with the given UID.

Example URI

PUT /api/image-types/imag_b07b6dfb0f404f8eac19aafdb3c3b680/
URI Parameters
HideShow
uid
string (required) Example: imag_b07b6dfb0f404f8eac19aafdb3c3b680
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Thumbnail"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/imag_image-types/b07b6dfb0f404f8eac19aafdb3c3b680/",
  "uid": "imag_b07b6dfb0f404f8eac19aafdb3c3b680",
  "name": "Preview"
}

DELETE/api/image-types/{uid}/

Mark an image type as deleted.

Example URI

DELETE /api/image-types/imag_b07b6dfb0f404f8eac19aafdb3c3b680/
URI Parameters
HideShow
uid
string (required) Example: imag_b07b6dfb0f404f8eac19aafdb3c3b680
Response  204

Image resizer

A Image resizer module is part of any Skylark installation. This gives client applications the flexibility to crop images into desired sizes and change image types. Image format can also be converted between JPEG, PNG, GIF, WEBP, and JP2 as needed.

Skylark installations may be configured with a distinct media server endpoint URL, which will be returned in requests to /images/ and should be used for all requests to /media/.

GET/media/

Resizing options

http://media.example.com/media/image-200x300.jpg

will create a JPEG thumbnail preserving aspect ratio, with a maximum width of 200 pixels and a maximum height of 300 pixels. IF the original image is a GIF or WEBP with animation, the JPEG will yield the first frame of that animation.

When resizing a transparent GIF the animation might not have the expected result, instead fetch the original image.

http://media.example.com/media/image-200x300-crop.jpg

Exactly 200x300, cropped as necessary, with crop point at centre and middle.

http://media.example.com/media/image-200x300-crop=lm.jpg

The image format to return is determined by the given extension. jpg, png, gif, webp, and jp2 are supported.

As for crop, but with a custom crop point. Accepted values are:

For the first character:

  • l: Left

  • c: Center

  • r: Right

For the second character:

Resize the image proportionally, and pastes it onto a canvas 200x300 pixels, with a background rgba(255,124,123,1).

Resizer will also accept three numbers for a RGB colour.

http://media.example.com/media/image-filter=greyscale.jpg

Providing filter=greyscale will convert the image to black and white. It can combined with the other parameters but must always be placed last.

Example URI

GET /media/
Response  200
HideShow
Headers
Content-Type: image/jpeg
Body
(image binary data)

Linear EPG

Channels

Channels support language versions.

GET/api/channels/

Gets a list of all channels.

This call is filterable and sortable.

Example URI

GET /api/channels/
Response  200
HideShow
Body
{
  "objects": [
    {
      "uid": "chan_da31d7465b76485abcf14d8d8ce03beb",
      "schedule_urls": [],
      "ends_on": null,
      "modified": "2016-01-19T10:55:55.030917+00:00",
      "is_data_source": false,
      "language_modified_by": null,
      "last_data_ingest": null,
      "language_version_url": "/api/channels/chan_da31d7465b76485abcf14d8d8ce03beb/language-versions/0/",
      "version_number": 0,
      "modified_by": "admin@example.com",
      "language_ends_on": null,
      "language_publish_on": "2016-01-19T10:55:55.030917+00:00",
      "self": "/api/channels/chan_da31d7465b76485abcf14d8d8ce03beb/",
      "created": "2016-01-19T10:55:55.030917+00:00",
      "publish_on": "2016-01-19T10:55:55.030917+00:00",
      "created_by": "admin@example.com",
      "name": "каналa 2",
      "language_modified": "2016-01-19T10:55:55.030917+00:00",
      "data_source_fields": [],
      "language_is_data_source": false,
      "language_version_number": 0,
      "data_source_id": "",
      "version_url": "/api/channels/chan_da31d7465b76485abcf14d8d8ce03beb/versions/0/"
    }
  ]
}

POST/api/channels/

Create a new Channel

Example URI

POST /api/channels/
Request
HideShow
Body
{
  "name": "A Channel Name",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ]
}
Response  200
HideShow
Body
{
  "uid": "chan_b0a7d117502e450581bcb3a4cfd51821",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "ends_on": null,
  "modified": "2016-01-20T10:04:09.839001+00:00",
  "is_data_source": false,
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "language_publish_on": "2016-01-20T10:04:09.839001+00:00",
  "self": "/api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/",
  "created": "2016-01-20T10:04:09.839001+00:00",
  "publish_on": "2016-01-20T10:04:09.839001+00:00",
  "created_by": "admin@example.com",
  "name": "A Channel Name",
  "language_modified": "2016-01-20T10:04:09.839001+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": "",
  "version_url": "/api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/versions/0/"
}

Channels:uid

GET/api/channels/{uid}/

Get a specific Channel

Example URI

GET /api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/
URI Parameters
HideShow
uid
string (required) Example: chan_b0a7d117502e450581bcb3a4cfd51821
Response  200
HideShow
Body
{
  "uid": "chan_b0a7d117502e450581bcb3a4cfd51821",
  "schedule_urls": [],
  "ends_on": null,
  "modified": "2016-01-20T10:04:09.839001+00:00",
  "is_data_source": false,
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "language_publish_on": "2016-01-20T10:04:09.839001+00:00",
  "self": "/api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/",
  "created": "2016-01-20T10:04:09.839001+00:00",
  "publish_on": "2016-01-20T10:04:09.839001+00:00",
  "created_by": "admin@example.com",
  "name": "A Channel Name",
  "language_modified": "2016-01-20T10:04:09.839001+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": "",
  "version_url": "/api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/versions/0/"
}

PUT/api/channels/{uid}/

Update a Channel

Example URI

PUT /api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/
URI Parameters
HideShow
uid
string (required) Example: chan_b0a7d117502e450581bcb3a4cfd51821
Request
HideShow
Body
{
  "name": "A Channel Name"
}
Response  200
HideShow
Body
{
  "uid": "chan_b0a7d117502e450581bcb3a4cfd51821",
  "schedule_urls": [],
  "ends_on": null,
  "modified": "2016-01-20T10:04:09.839001+00:00",
  "is_data_source": false,
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "language_publish_on": "2016-01-20T10:04:09.839001+00:00",
  "self": "/api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/",
  "created": "2016-01-20T10:04:09.839001+00:00",
  "publish_on": "2016-01-20T10:04:09.839001+00:00",
  "created_by": "admin@example.com",
  "name": "A Channel Name",
  "language_modified": "2016-01-20T10:04:09.839001+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": "",
  "version_url": "/api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/versions/0/"
}

DELETE/api/channels/{uid}/

Delete a Channel

Example URI

DELETE /api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/
URI Parameters
HideShow
uid
string (required) Example: chan_b0a7d117502e450581bcb3a4cfd51821
Response  204

Channels:uid:items

GET/api/channels/{uid}/items/

Gets a list of EPG Slots in the channel with EPG Programmes. Supports searching using ?slots__between=<start_date>,<end_date>, which will return all slots between those times, including slots that start before or end after the given window. In other words, it also includes slots in progress during the given time window.

It is also possible to use ?announced__between, which does the same thing than ?slots__between but with announced times instead of actual start time.

Example URI

GET /api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/items/
URI Parameters
HideShow
uid
string (required) Example: chan_b0a7d117502e450581bcb3a4cfd51821
Response  200
HideShow
Body
{
  "objects": [
    {
      "uid": "epgs_e25e006020634819bec6f449f1d4cc5e",
      "ends_on": null,
      "slot_end": "2016-01-22T14:00:00+00:00",
      "modified": "2016-01-27T14:51:10.839145+00:00",
      "slot_start": "2016-01-22T13:00:00+00:00",
      "is_data_source": false,
      "language_modified_by": null,
      "last_data_ingest": null,
      "language_version_url": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/items/epgs_e25e006020634819bec6f449f1d4cc5e/language-versions/0/",
      "version_number": 0,
      "modified_by": "admin@example.com",
      "language_ends_on": null,
      "epg_programme_url": "/api/epg-programmes/epgp_77b9c58eddb6417080d8a72f7233d227/",
      "created": "2016-01-27T14:51:10.839145+00:00",
      "self": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/items/epgs_e25e006020634819bec6f449f1d4cc5e/",
      "programme": {
        "uid": "epgp_77b9c58eddb6417080d8a72f7233d227",
        "ends_on": null,
        "content_url": null,
        "modified": "2016-01-27T14:48:11.369984+00:00",
        "image_urls": [],
        "is_data_source": false,
        "language_modified_by": null,
        "last_data_ingest": null,
        "language_version_url": "/api/epg-programmes/epgp_77b9c58eddb6417080d8a72f7233d227/language-versions/0/",
        "version_number": 0,
        "modified_by": "admin@example.com",
        "language_ends_on": null,
        "created": "2016-01-27T14:48:11.369984+00:00",
        "self": "/api/epg-programmes/epgp_77b9c58eddb6417080d8a72f7233d227/",
        "title": "archer",
        "publish_on": "2016-01-27T14:48:11.369984+00:00",
        "created_by": "admin@example.com",
        "language_publish_on": "2016-01-27T14:48:11.369984+00:00",
        "synopsis": "",
        "language_modified": "2016-01-27T14:48:11.369984+00:00",
        "data_source_fields": [],
        "language_is_data_source": false,
        "language_version_number": 0,
        "data_source_id": "",
        "version_url": "/api/epg-programmes/epgp_77b9c58eddb6417080d8a72f7233d227/versions/0/"
      },
      "publish_on": "2016-01-27T14:51:10.839145+00:00",
      "created_by": "admin@example.com",
      "language_publish_on": "2016-01-27T14:51:10.839145+00:00",
      "language_modified": "2016-01-27T14:51:10.839145+00:00",
      "data_source_fields": [],
      "language_is_data_source": false,
      "channel_url": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/",
      "language_version_number": 0,
      "data_source_id": "",
      "version_url": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/items/epgs_e25e006020634819bec6f449f1d4cc5e/versions/0/"
    }
  ]
}

POST/api/channels/{uid}/items/

EPG Slots are created with ‘slot_start’ and slot_end as the actual slot and ‘announced_start’ and ‘announced_end’ as the announced or advertised times.

Example URI

POST /api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/items/
URI Parameters
HideShow
uid
string (required) Example: chan_b0a7d117502e450581bcb3a4cfd51821
Request
HideShow
Body
{
  "slot_start": "2016-01-22T13:00:00+00:00",
  "slot_end": "2016-01-22T14:00:00+00:00",
  "epg_programme_url": "/api/epg-programmes/epgp_77b9c58eddb6417080d8a72f7233d227/"
}
Response  201
HideShow
Body
{
  "uid": "epgs_2abfca4b7a7b4a7692203e54bab225de",
  "ends_on": null,
  "slot_end": "2016-01-22T15:00:00+00:00",
  "modified": "2016-01-28T16:05:37.162177+00:00",
  "slot_start": "2016-01-22T14:00:00+00:00",
  "is_data_source": false,
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/items/epgs_2abfca4b7a7b4a7692203e54bab225de/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "epg_programme_url": "/api/epg-programmes/epgp_77b9c58eddb6417080d8a72f7233d227/",
  "created": "2016-01-28T16:05:37.162177+00:00",
  "self": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/items/epgs_2abfca4b7a7b4a7692203e54bab225de/",
  "publish_on": "2016-01-28T16:05:37.162177+00:00",
  "created_by": "admin@example.com",
  "language_publish_on": "2016-01-28T16:05:37.162177+00:00",
  "language_modified": "2016-01-28T16:05:37.162177+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "channel_url": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/",
  "language_version_number": 0,
  "data_source_id": "",
  "version_url": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/items/epgs_2abfca4b7a7b4a7692203e54bab225de/versions/0/"
}

Channels:uid:items:slot

GET/api/channels/{uid}/items/{slot}/

Example URI

GET /api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/items/epgs_e25e006020634819bec6f449f1d4cc5e/
URI Parameters
HideShow
uid
string (required) Example: chan_b0a7d117502e450581bcb3a4cfd51821
slot
string (required) Example: epgs_e25e006020634819bec6f449f1d4cc5e
Response  200
HideShow
Body
{
  "uid": "epgs_e25e006020634819bec6f449f1d4cc5e",
  "ends_on": null,
  "slot_end": "2016-01-22T14:00:00+00:00",
  "modified": "2016-01-27T14:51:10.839145+00:00",
  "slot_start": "2016-01-22T13:00:00+00:00",
  "is_data_source": false,
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/items/epgs_e25e006020634819bec6f449f1d4cc5e/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "epg_programme_url": "/api/epg-programmes/epgp_77b9c58eddb6417080d8a72f7233d227/",
  "created": "2016-01-27T14:51:10.839145+00:00",
  "self": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/items/epgs_e25e006020634819bec6f449f1d4cc5e/",
  "publish_on": "2016-01-27T14:51:10.839145+00:00",
  "created_by": "admin@example.com",
  "language_publish_on": "2016-01-27T14:51:10.839145+00:00",
  "language_modified": "2016-01-27T14:51:10.839145+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "channel_url": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/",
  "language_version_number": 0,
  "data_source_id": "",
  "version_url": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/items/epgs_e25e006020634819bec6f449f1d4cc5e/versions/0/"
}

PUT/api/channels/{uid}/items/{slot}/

Example URI

PUT /api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/items/epgs_e25e006020634819bec6f449f1d4cc5e/
URI Parameters
HideShow
uid
string (required) Example: chan_b0a7d117502e450581bcb3a4cfd51821
slot
string (required) Example: epgs_e25e006020634819bec6f449f1d4cc5e
Request
HideShow
Body
{
  "slot_start": "2016-01-22T18:00:00+00:00",
  "slot_end": "2016-01-22T19:00:00+00:00",
  "epg_programme_url": "/api/epg-programmes/epgp_77b9c58eddb6417080d8a72f7233d227/"
}
Response  200
HideShow
Body
{
  "uid": "epgs_e25e006020634819bec6f449f1d4cc5e",
  "ends_on": null,
  "slot_end": "2016-01-22T19:00:00+00:00",
  "modified": "2016-01-27T14:51:10.839145+00:00",
  "slot_start": "2016-01-22T18:00:00+00:00",
  "is_data_source": false,
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/items/epgs_e25e006020634819bec6f449f1d4cc5e/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "epg_programme_url": "/api/epg-programmes/epgp_77b9c58eddb6417080d8a72f7233d227/",
  "created": "2016-01-27T14:51:10.839145+00:00",
  "self": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/items/epgs_e25e006020634819bec6f449f1d4cc5e/",
  "publish_on": "2016-01-27T14:51:10.839145+00:00",
  "created_by": "admin@example.com",
  "language_publish_on": "2016-01-27T14:51:10.839145+00:00",
  "language_modified": "2016-01-27T14:51:10.839145+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "channel_url": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/",
  "language_version_number": 0,
  "data_source_id": "",
  "version_url": "/api/channels/chan_7fab78405710431cbb9135d291efd55e/items/epgs_e25e006020634819bec6f449f1d4cc5e/versions/0/"
}

DELETE/api/channels/{uid}/items/{slot}/

Example URI

DELETE /api/channels/chan_b0a7d117502e450581bcb3a4cfd51821/items/epgs_e25e006020634819bec6f449f1d4cc5e/
URI Parameters
HideShow
uid
string (required) Example: chan_b0a7d117502e450581bcb3a4cfd51821
slot
string (required) Example: epgs_e25e006020634819bec6f449f1d4cc5e
Response  204

EPG Programmes

EPG Programmes support language versions.

GET/api/epg-programmes/

Gets a list of all EPG Progammes.

This call is filterable and sortable.

Example URI

GET /api/epg-programmes/
Response  200
HideShow
Body
{
  "objects": [
     {
      "uid": "epgp_dfae8456e8da4791bc7c02237634c26c",
      "tags": [],
      "schedule_urls": [
        "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
      ],
      "ends_on": null,
      "episode_url": null
      "image_urls": [],
      "modified": "2016-03-03T16:45:36.947110+00:00",
      "hierarchy_url": null,
      "plan_urls": [],
      "talent": [],
      "is_data_source": false,
      "language_modified_by": null,
      "slug": "an-epg-programme",
      "last_data_ingest": null,
      "language_version_url": "/api/epg-programmes/epgp_dfae8456e8da4791bc7c02237634c26c/language-versions/0/",
      "version_number": 0,
      "modified_by": "admin@example.com",
      "language_ends_on": null,
      "language_publish_on": "2016-03-03T16:45:36.947110+00:00",
      "items": [],
      "self": "/api/epg-programmes/epgp_dfae8456e8da4791bc7c02237634c26c/",
      "created": "2016-03-03T16:45:36.947110+00:00",
      "publish_on": "2016-03-03T16:45:36.947110+00:00",
      "created_by": "admin@example.com",
      "synopsis": "",
      "language_modified": "2016-03-03T16:45:36.947110+00:00",
      "data_source_fields": [],
      "parent_url": null,
      "title": "An Epg Programme",
      "language_is_data_source": false,
      "rating_urls": [],
      "language_version_number": 0,
      "data_source_id": null,
      "version_url": "/api/epg-programmes/epgp_dfae8456e8da4791bc7c02237634c26c/versions/0/"
    }
  ]
}

POST/api/epg-programmes/

Create a new EPG Programme. tags, ratings, talent and episode are optional relationships. A EPG Programme can also be assigned to a Brand using parent_url

Example URI

POST /api/epg-programmes/
Request
HideShow
Body
{
      "parent_url": "/api/brands/bran_f806eaadfe4545bd84f882b4cd474604/",
      "episode_url": null
      "rating_urls": [
        "/api/ratings/rati_35cab5fce5674c7cbce8a97905aa3bda/"
      ],
      "schedule_urls": [
        "/api/schedules/sche_6186fb91953f4653b23e229ba986143f/"
      ],
      "tags": [
        {
          "schedule_urls": [
            "/api/schedules/sche_6186fb91953f4653b23e229ba986143f/"
          ],
          "tag_url": "/api/tags/tag__678c8b306e1b478d919531f1841c62f3/"
        }
      ],
      "talent": [
        {
          "character": "BLABLA that character",
          "roles": [],
          "talent_url": "/api/talent/tale_a7526c8750e3458a99abea7cfeed75de/"
        }
      ],
      "title": "An Epg Programme"
    }
Response  200
HideShow
Body
{
  "uid": "epgp_6977ab9e6033497ba82f7cc3921e59a5",
  "tags": [
    {
      "schedule_urls": [
        "/api/schedules/sche_6186fb91953f4653b23e229ba986143f/"
      ],
      "tag_url": "/api/tags/tag__678c8b306e1b478d919531f1841c62f3/"
    }
  ],
  "schedule_urls": [
    "/api/schedules/sche_6186fb91953f4653b23e229ba986143f/"
  ],
  "ends_on": null,
  "episode_url": null
  "image_urls": [],
  "modified": "2016-03-03T17:11:23.954789+00:00",
  "hierarchy_url": "/api/contents/by-slug/Testing/an-epg-programme/",
  "plan_urls": [],
  "talent": [
    {
      "character": "BLABLA that character",
      "roles": [],
      "talent_url": "/api/talent/tale_a7526c8750e3458a99abea7cfeed75de/"
    }
  ],
  "is_data_source": false,
  "language_modified_by": null,
  "slug": "an-epg-programme",
  "last_data_ingest": null,
  "language_version_url": "/api/epg-programmes/epgp_6977ab9e6033497ba82f7cc3921e59a5/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "language_publish_on": "2016-03-03T17:11:23.954789+00:00",
  "items": [],
  "self": "/api/epg-programmes/epgp_6977ab9e6033497ba82f7cc3921e59a5/",
  "created": "2016-03-03T17:11:23.954789+00:00",
  "publish_on": "2016-03-03T17:11:23.954789+00:00",
  "created_by": "admin@example.com",
  "synopsis": "",
  "language_modified": "2016-03-03T17:11:23.954789+00:00",
  "data_source_fields": [],
  "parent_url": "/api/brands/bran_f806eaadfe4545bd84f882b4cd474604/",
  "title": "An Epg Programme",
  "language_is_data_source": false,
  "rating_urls": [
    "/api/ratings/rati_35cab5fce5674c7cbce8a97905aa3bda/"
  ],
  "language_version_number": 0,
  "data_source_id": null,
  "version_url": "/api/epg-programmes/epgp_6977ab9e6033497ba82f7cc3921e59a5/versions/0/"
}

EPG Programmes:count

GET/api/epg-programmes/count/

Get a count of the number of EPG Programmes. Can be filtered to only return counts of a given type.

Example URI

GET /api/epg-programmes/count/
Response  200
HideShow
Body
{}

EPG Programmes:uid

GET/api/epg-programmes/{uid}/

Get a specific EPG Programme

Example URI

GET /api/epg-programmes/epgp_6977ab9e6033497ba82f7cc3921e59a5/
URI Parameters
HideShow
uid
string (required) Example: epgp_6977ab9e6033497ba82f7cc3921e59a5
Response  200
HideShow
Body
{
  "uid": "epgp_6977ab9e6033497ba82f7cc3921e59a5",
  "tags": [
    {
      "schedule_urls": [
        "/api/schedules/sche_6186fb91953f4653b23e229ba986143f/"
      ],
      "tag_url": "/api/tags/tag__678c8b306e1b478d919531f1841c62f3/"
    }
  ],
  "schedule_urls": [
    "/api/schedules/sche_6186fb91953f4653b23e229ba986143f/"
  ],
  "ends_on": null,
  "episode_url": null
  "image_urls": [],
  "modified": "2016-03-03T17:11:23.954789+00:00",
  "hierarchy_url": "/api/contents/by-slug/Testing/an-epg-programme/",
  "plan_urls": [],
  "talent": [
    {
      "character": "BLABLA that character",
      "roles": [],
      "talent_url": "/api/talent/tale_a7526c8750e3458a99abea7cfeed75de/"
    }
  ],
  "is_data_source": false,
  "language_modified_by": null,
  "slug": "an-epg-programme",
  "last_data_ingest": null,
  "language_version_url": "/api/epg-programmes/epgp_6977ab9e6033497ba82f7cc3921e59a5/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "language_publish_on": "2016-03-03T17:11:23.954789+00:00",
  "items": [],
  "self": "/api/epg-programmes/epgp_6977ab9e6033497ba82f7cc3921e59a5/",
  "created": "2016-03-03T17:11:23.954789+00:00",
  "publish_on": "2016-03-03T17:11:23.954789+00:00",
  "created_by": "admin@example.com",
  "synopsis": "",
  "language_modified": "2016-03-03T17:11:23.954789+00:00",
  "data_source_fields": [],
  "parent_url": "/api/brands/bran_f806eaadfe4545bd84f882b4cd474604/",
  "title": "An Epg Programme",
  "language_is_data_source": false,
  "rating_urls": [
    "/api/ratings/rati_35cab5fce5674c7cbce8a97905aa3bda/"
  ],
  "language_version_number": 0,
  "data_source_id": null,
  "version_url": "/api/epg-programmes/epgp_6977ab9e6033497ba82f7cc3921e59a5/versions/0/"
}

PUT/api/epg-programmes/{uid}/

Update an EPG Programme

Example URI

PUT /api/epg-programmes/epgp_6977ab9e6033497ba82f7cc3921e59a5/
URI Parameters
HideShow
uid
string (required) Example: epgp_6977ab9e6033497ba82f7cc3921e59a5
Request
HideShow
Body
{
        "title": "Rick and Morty",
    }
Response  200
HideShow
Body
{
  "uid": "epgp_6977ab9e6033497ba82f7cc3921e59a5",
  "tags": [],
  "schedule_urls": [],
  "episode_url": null
  "ends_on": null,
  "image_urls": [],
  "modified": "2016-03-03T17:11:23.954789+00:00",
  "hierarchy_url": null,
  "plan_urls": [],
  "talent": [
    {
      "character": "BLABLA that character",
      "roles": [],
      "talent_url": "/api/talent/tale_a7526c8750e3458a99abea7cfeed75de/"
    }
  ],
  "is_data_source": false,
  "language_modified_by": null,
  "slug": "rick-and-morty",
  "last_data_ingest": null,
  "language_version_url": "/api/epg-programmes/epgp_6977ab9e6033497ba82f7cc3921e59a5/language-versions/1/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "language_publish_on": "2016-03-03T17:24:08.006388+00:00",
  "items": [],
  "self": "/api/epg-programmes/epgp_6977ab9e6033497ba82f7cc3921e59a5/",
  "created": "2016-03-03T17:11:23.954789+00:00",
  "publish_on": "2016-03-03T17:11:23.954789+00:00",
  "created_by": "admin@example.com",
  "synopsis": "",
  "language_modified": "2016-03-03T17:24:08.011805+00:00",
  "data_source_fields": [],
  "parent_url": null,
  "title": "Rick and Morty",
  "language_is_data_source": false,
  "rating_urls": [],
  "language_version_number": 1,
  "data_source_id": null,
  "version_url": "/api/epg-programmes/epgp_6977ab9e6033497ba82f7cc3921e59a5/versions/0/"
}

DELETE/api/epg-programmes/{uid}/

Delete an EPG Programme

Example URI

DELETE /api/epg-programmes/epgp_6977ab9e6033497ba82f7cc3921e59a5/
URI Parameters
HideShow
uid
string (required) Example: epgp_6977ab9e6033497ba82f7cc3921e59a5
Response  204

Channels:uid

GET/api/channels/{uid}/now-and-next/

Get a specific Channel’s now (current) and next programme slots. If there is a gap between the now and next slots the gap in minutes is displayed in ‘minutes_between_now_and_next’ field. If there is no current slot the next available slot, if any, will be shown in ‘next’. If for any reason slots overlap in time the ‘clash’ field will read True.

Example URI

GET /api/channels/epgs_e25e006020634819bec6f449f1d4cc5e/now-and-next/
URI Parameters
HideShow
uid
string (required) Example: epgs_e25e006020634819bec6f449f1d4cc5e
Response  200
HideShow
Body
{
  "clash": false,
  "minutes_between_now_and_next": 0,
  "next": {
    "announced_end": "2016-07-18T19:08:40.200427+00:00",
    "announced_start": "2016-07-18T18:08:40.200412+00:00",
    "channel_url": "/api/channels/chan_0dc0371dd574451982baf5b37c10457e/",
    "created": "2016-07-18T17:08:40.315368+00:00",
    "created_by": null,
    "data_source_fields": [],
    "data_source_id": null,
    "editability": "normal",
    "epg_programme_url": "/api/epg-programmes/epgp_2d80a11fb6094695b373898526bded88/",
    "programme": {
      "athlete_urls": [],
      "content_record_url": "/api/epg-programmes/epgp_2d80a11fb6094695b373898526bded88/",
      "created": "2016-07-18T17:08:40.312797+00:00",
      "created_by": null,
      "data_source_fields": [],
      "data_source_id": null,
      "editability": "normal",
      "episode_url": "/api/episodes/epis_e9cf09e5886640ceb0e3e400ba2abe4e/",
      "hierarchy_url": null,
      "image_urls": [],
      "items": [],
      "parent_url": null,
      "plan_urls": [],
      "plumbus_urls": [],
      "rating_urls": [],
      "recommended_content_urls": [],
      "schedule_urls": [],
      "self": "/api/epg-programmes/epgp_2d80a11fb6094695b373898526bded88/",
      "slug": "programme-for-next-episode",
      "sponsor_urls": [],
      "stats": null,
      "synopsis": "",
      "tags": [],
      "talent": [],
      "title": "Programme for next episode",
      "uid": "epgp_2d80a11fb6094695b373898526bded88"
    },
    "self": "/api/channels/chan_0dc0371dd574451982baf5b37c10457e/items/epgs_eceea2903852443986b336f12c7d97fb/",
    "slot_end": "2016-07-18T19:08:40.200427+00:00",
    "slot_start": "2016-07-18T18:08:40.200412+00:00",
    "uid": "epgs_eceea2903852443986b336f12c7d97fb"
  },
  "now": {
    "announced_end": "2016-07-18T18:08:39.952366+00:00",
    "announced_start": "2016-07-18T16:08:39.952352+00:00",
    "channel_url": "/api/channels/chan_0dc0371dd574451982baf5b37c10457e/",
    "created": "2016-07-18T17:08:40.062735+00:00",
    "created_by": null,
    "data_source_fields": [],
    "data_source_id": null,
    "editability": "normal",
    "epg_programme_url": "/api/epg-programmes/epgp_560da8c53f514631b144698a4db7c2bf/",
    "programme": {
      "athlete_urls": [],
      "content_record_url": "/api/epg-programmes/epgp_560da8c53f514631b144698a4db7c2bf/",
      "created": "2016-07-18T17:08:40.060295+00:00",
      "created_by": null,
      "data_source_fields": [],
      "data_source_id": null,
      "editability": "normal",
      "episode_url": "/api/episodes/epis_ca52654ae22f457b942761569aa0fed6/",
      "hierarchy_url": null,
      "image_urls": [],
      "items": [],
      "parent_url": null,
      "plan_urls": [],
      "plumbus_urls": [],
      "rating_urls": [],
      "recommended_content_urls": [],
      "schedule_urls": [],
      "self": "/api/epg-programmes/epgp_560da8c53f514631b144698a4db7c2bf/",
      "slug": "programme-for-now-episode",
      "sponsor_urls": [],
      "stats": null,
      "synopsis": "",
      "tags": [],
      "talent": [],
      "title": "Programme for now episode",
      "uid": "epgp_560da8c53f514631b144698a4db7c2bf"
    },
    "self": "/api/channels/chan_0dc0371dd574451982baf5b37c10457e/items/epgs_ac0e91dff2324dd3a0be1cecb3294284/",
    "slot_end": "2016-07-18T18:08:39.952366+00:00",
    "slot_start": "2016-07-18T16:08:39.952352+00:00",
    "uid": "epgs_ac0e91dff2324dd3a0be1cecb3294284"
  }
}

Languages

Languages

GET/api/languages/

Returns a list of all enabled languages. The language names appear in the same language they are defined in the settings.py

Example URI

GET /api/languages/
Response  200
HideShow
Body
{
  "objects": [
    {
      "iso": "ar",
      "name": "العربية"
    },
    {
      "iso": "de",
      "name": "Deutsch"
    },
    {
      "iso": "en",
      "name": "English"
    },
    {
      "iso": "es",
      "name": "Español"
    }
  ]
}

Masters

Plans

GET/api/plans/

Returns a list of Plans.

Example URI

GET /api/plans/
Response  200
HideShow
Body
{
  "objects": [
    {
      "product": {
        "type": "set",
        "slug": "popular"
      },
      "uid": "plan_a2f28fe832804f07aba10b5214fbdaba",
      "stripe_id": 5,
      "self": "/api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/",
      "interval": "year",
      "entitlement_url": null,
      "interval_count": 1,
      "content_url": "/api/sets/coll_20ce39424470457c925f823fc150b3d4/",
      "schedule_urls": [
        "/api/schedules/sche_2f65c692f3d24215942dfa730d3b4b3f/"
      ],
      "amount": 1750,
      "price_point_url": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
      "trial_period_days": null,
      "recurring": false,
      "concurrent_views": 2
    }
  ]
}

POST/api/plans/

Creates Plan. Fields are required which are:

uid, interval_count, content_object_url, price_point_url, schedule_url,

Some fields are created dynamically depending on the content_object_url, price_point_url or schedule_url urls passed to the Plan API.

Example URI

POST /api/plans/
Request
HideShow
Body
{
  "amount": 1000,
  "content_object_url": "/api/sets/coll_20ce39424470457c925f823fc150b3d4/",
  "content_url": "/api/sets/coll_20ce39424470457c925f823fc150b3d4/",
  "interval_count": 1,
  "interval": "year",
  "price_point_url": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
  "schedule_urls": [
    "/api/schedules/sche_2f65c692f3d24215942dfa730d3b4b3f/"
  ],
  "concurrent_views": 2
}
Response  201
HideShow
Body
{
  "product": {
    "type": "set",
    "slug": "popular"
  },
  "uid": "plan_b609f53f3a9b41349cb74461153c29c3",
  "stripe_id": 13,
  "self": "/api/plans/plan_b609f53f3a9b41349cb74461153c29c3/",
  "interval": "year",
  "entitlement_url": null,
  "interval_count": 1,
  "content_url": "/api/sets/coll_20ce39424470457c925f823fc150b3d4/",
  "schedule_urls": [
    "/api/schedules/sche_2f65c692f3d24215942dfa730d3b4b3f/"
  ],
  "amount": 1750,
  "price_point_url": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
  "trial_period_days": null,
  "recurring": false,
  "concurrent_views": 2
}

Plans:uid

Retrieve, update and manage the Plan Model

A plan contains information about the length, price and availability, along with details of the film or set it applies to.

GET/api/plans/{uid}/

Details for an individual Plan

Example URI

GET /api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/
URI Parameters
HideShow
uid
string (required) Example: plan_a2f28fe832804f07aba10b5214fbdaba
Response  200
HideShow
Body
{
  "objects": [
    {
      "product": {
        "type": "set",
        "slug": "popular"
      },
      "uid": "plan_a2f28fe832804f07aba10b5214fbdaba",
      "stripe_id": 5,
      "self": "/api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/",
      "interval": "year",
      "entitlement_url": null,
      "interval_count": 14,
      "content_url": "/api/sets/coll_20ce39424470457c925f823fc150b3d4/",
      "schedule_urls": [
        "/api/schedules/sche_2f65c692f3d24215942dfa730d3b4b3f/"
      ],
      "amount": 1750,
      "price_point_url": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
      "trial_period_days": null,
      "recurring": false,
      "concurrent_views": 2
    }
  ]
}

PUT/api/plans/{uid}/

Update existing Plan’s details.

Update a current Plan’s details. Fields are required which are:

uid, interval_count, interval, content_object_url, price_point_url, schedule_url,

This example updates the ‘amount’ to 1000

Example URI

PUT /api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/
URI Parameters
HideShow
uid
string (required) Example: plan_a2f28fe832804f07aba10b5214fbdaba
Request
HideShow
Body
{
  "amount": 1000,
  "content_object_url": "/api/sets/coll_20ce39424470457c925f823fc150b3d4/",
  "interval_count": 1,
  "interval": "year",
  "price_point_url": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
  "schedule_urls": [
    "/api/schedules/sche_2f65c692f3d24215942dfa730d3b4b3f/"
  ],
  "concurrent_views": 2
}
Response  200
HideShow
Body
{
  "product": {
    "type": "set",
    "slug": "popular"
  },
  "uid": "plan_a2f28fe832804f07aba10b5214fbdaba",
  "stripe_id": 5,
  "self": "/api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/",
  "interval": "year",
  "entitlement_url": null,
  "interval_count": 1,
  "content_url": "/api/sets/coll_20ce39424470457c925f823fc150b3d4/",
  "schedule_urls": [
    "/api/schedules/sche_2f65c692f3d24215942dfa730d3b4b3f/"
  ],
  "amount": 1750,
  "price_point_url": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
  "trial_period_days": null,
  "recurring": false,
  "concurrent_views": 2
}

PATCH/api/plans/{uid}/

Partial update of /api/plans/ resource.

Example URI

PATCH /api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/
URI Parameters
HideShow
uid
string (required) Example: plan_a2f28fe832804f07aba10b5214fbdaba
Request
HideShow
Headers
Authorization: JWT token
Body
{
  "concurrent_views": 6
}
Response  200
HideShow
Body
{
  "product": {
    "type": "set",
    "slug": "popular"
  },
  "uid": "plan_a2f28fe832804f07aba10b5214fbdaba",
  "stripe_id": 5,
  "self": "/api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/",
  "interval": "year",
  "entitlement_url": null,
  "interval_count": 1,
  "content_url": "/api/sets/coll_20ce39424470457c925f823fc150b3d4/",
  "schedule_urls": [
    "/api/schedules/sche_2f65c692f3d24215942dfa730d3b4b3f/"
  ],
  "amount": 1750,
  "price_point_url": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
  "trial_period_days": null,
  "recurring": false,
  "concurrent_views": 6
}

DELETE/api/plans/{uid}/

Deletes a Plan. This is done by setting the deleted flag to false.

Example URI

DELETE /api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/
URI Parameters
HideShow
uid
string (required) Example: plan_a2f28fe832804f07aba10b5214fbdaba
Response  204

Price points

GET/api/price-points/

Returns a list of price points.

This call is filterable and sortable.

Example URI

GET /api/price-points/
Response  200
HideShow
Body
{
  "objects": [
    {
      "currency": "GBP",
      "amount": 1750,
      "self": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
      "uid": "pric_0420fb45f1084d5e9595fe55f2a395fc"
    }
  ]
}

POST/api/price-points/

Creates a price point.

Example URI

POST /api/price-points/
Request
HideShow
Body
{
  "currency": "GBP",
  "amount": 1750,
  "data_source_id": "aaa",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00"
}
Response  201
HideShow
Body
{
  "currency": "GBP",
  "amount": 1750,
  "self": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
  "uid": "pric_0420fb45f1084d5e9595fe55f2a395fc",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
  "data_source_id": "aaa"
}

Price Points:uid

GET/api/price-points/{uid}/

Retrieve, update and manage the price points model

Details for an individual price points

Example URI

GET /api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/
URI Parameters
HideShow
uid
string (required) Example: pric_0420fb45f1084d5e9595fe55f2a395fc
Response  200
HideShow
Body
{
  "currency": "GBP",
  "amount": 1750,
  "self": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
  "uid": "pric_0420fb45f1084d5e9595fe55f2a395fc"
}

PUT/api/price-points/{uid}/

Update existing price points details.

Example URI

PUT /api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/
URI Parameters
HideShow
uid
string (required) Example: pric_0420fb45f1084d5e9595fe55f2a395fc
Request
HideShow
Body
{
  "currency": "GBP",
  "amount": 2000,
  "data_source_id": "aaa",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00"
}
Response  200
HideShow
Body
{
  "currency": "GBP",
  "amount": 2000,
  "self": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
  "uid": "pric_0420fb45f1084d5e9595fe55f2a395fc"
}

PATCH/api/price-points/{uid}/

Partial update existing price points details.

Example URI

PATCH /api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/
URI Parameters
HideShow
uid
string (required) Example: pric_0420fb45f1084d5e9595fe55f2a395fc
Request
HideShow
Body
{
  "amount": 1000
}
Response  200
HideShow
Body
{
  "currency": "GBP",
  "amount": 1000,
  "self": "/api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/",
  "uid": "pric_0420fb45f1084d5e9595fe55f2a395fc"
}

DELETE/api/price-points/{uid}/

Deletes a price point. This is done by setting the deleted flag to false.

Example URI

DELETE /api/price-points/pric_0420fb45f1084d5e9595fe55f2a395fc/
URI Parameters
HideShow
uid
string (required) Example: pric_0420fb45f1084d5e9595fe55f2a395fc
Response  204

Price points:q

GET/api/price-points/{?q}

Details for an individual price points

Example URI

GET /api/price-points/?q=currency:USD AND amount:[0 TO 2000]
URI Parameters
HideShow
q
string (required) Example: currency:USD AND amount:[0 TO 2000]
Response  200
HideShow
Body
{
  "currency": "GBP",
  "amount": 1750,
  "uid": "pric_0c1d20bd9799474c96d1e7ec25c74c18"
}

Price points:count:q

Get a count of the number of available of price points. Can be filtered to only return counts of a given type.

GET/api/price-points/count/{?q}

Example URI

GET /api/price-points/count/?q=currency:USD AND amount:[0 TO 2000]
URI Parameters
HideShow
q
string (required) Example: currency:USD AND amount:[0 TO 2000]
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 4
}

Discounts

GET/api/discounts/

Gets a list of all Discounts

Example URI

GET /api/discounts/
Response  200
HideShow
Body
{
  "objects": [
    {
      "uid": "disc_84c0f4ca59a94e89aafaaf218ea13d0b",
      "schedule_urls": [
        "/api/schedules/sche_fc5be8ad9bdd4bb889c35cdf51d369e9/"
      ],
      "self": "/api/discounts/disc_84c0f4ca59a94e89aafaaf218ea13d0b/",
      "percent": null,
      "amount": 11,
      "plan_urls": []
    }
  ]
}

POST/api/discounts/

Create a new Discount, post either a percent or amount, not both

Example URI

POST /api/discounts/
Request
HideShow
Body
{
    "percent": 50,
    "schedule_urls": ["/api/schedules/sche_fc5be8ad9bdd4bb889c35cdf51d369e9/"],
    "data_source_id": "zzz",
    "last_data_ingest": "2015-09-04T13:27:58.767434+00:00"
    "plan_urls": [
        "/api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/"
        ]
}
Response  201
HideShow
Body
{
  "uid": "disc_ccd70abd356b48fcb804bc1defe00187",
  "schedule_urls": [
    "/api/schedules/sche_fc5be8ad9bdd4bb889c35cdf51d369e9/"
  ],
  "self": "/api/discounts/disc_ccd70abd356b48fcb804bc1defe00187/",
  "percent": 50,
  "amount": null,
  "data_source_id": "zzz",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
  "plan_urls": [
    "/api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/"
  ]
}

Discounts:uid

GET/api/discounts/{uid}/

Get a specific Discount

Example URI

GET /api/discounts/disc_ccd70abd356b48fcb804bc1defe00187/
URI Parameters
HideShow
uid
string (required) Example: disc_ccd70abd356b48fcb804bc1defe00187
Response  200
HideShow
Body
{
    "uid": "disc_ccd70abd356b48fcb804bc1defe00187",
    "schedule_urls": [
        "/api/schedules/sche_fc5be8ad9bdd4bb889c35cdf51d369e9/"
    ],
    "self": "/api/discounts/disc_ccd70abd356b48fcb804bc1defe00187/",
    "percent": 50,
    "amount": null,
    "data_source_id": "zzz",
    "last_data_ingest": "2015-09-04T13:27:58.767434+00:00"
    "plan_urls": [
        "/api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/"
    ]
}

PUT/api/discounts/{uid}/

update a Discount, only post a percentage or amount, not both

Example URI

PUT /api/discounts/disc_ccd70abd356b48fcb804bc1defe00187/
URI Parameters
HideShow
uid
string (required) Example: disc_ccd70abd356b48fcb804bc1defe00187
Request
HideShow
Body
{
  "percent": 90,
  "schedule_urls": [
    "/api/schedules/sche_fc5be8ad9bdd4bb889c35cdf51d369e9/"
  ],
  "data_source_id": "zzz",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
  "plan_urls": [
    "/api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/"
  ]
}
Response  200
HideShow
Body
{
  "uid": "disc_ccd70abd356b48fcb804bc1defe00187",
  "schedule_urls": [
    "/api/schedules/sche_fc5be8ad9bdd4bb889c35cdf51d369e9/"
  ],
  "self": "/api/discounts/disc_ccd70abd356b48fcb804bc1defe00187/",
  "percent": 90,
  "amount": null,
  "data_source_id": "zzz",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
  "plan_urls": [
    "/api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/"
  ]
}

PATCH/api/discounts/{uid}/

Partial update of Discount resource, only post a percentage or amount, not both

Example URI

PATCH /api/discounts/disc_ccd70abd356b48fcb804bc1defe00187/
URI Parameters
HideShow
uid
string (required) Example: disc_ccd70abd356b48fcb804bc1defe00187
Request
HideShow
Body
{
  "percent": 97
}
Response  200
HideShow
Body
{
  "uid": "disc_ccd70abd356b48fcb804bc1defe00187",
  "schedule_urls": [
    "/api/schedules/sche_fc5be8ad9bdd4bb889c35cdf51d369e9/"
  ],
  "self": "/api/discounts/disc_ccd70abd356b48fcb804bc1defe00187/",
  "percent": 97,
  "amount": null,
  "data_source_id": "zzz",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
  "plan_urls": [
    "/api/plans/plan_a2f28fe832804f07aba10b5214fbdaba/"
  ]
}

DELETE/api/discounts/{uid}/

Delete a Discount

Example URI

DELETE /api/discounts/disc_ccd70abd356b48fcb804bc1defe00187/
URI Parameters
HideShow
uid
string (required) Example: disc_ccd70abd356b48fcb804bc1defe00187
Response  204

Promotions

GET/api/promotions/

Returns a list of Promotions.

Example URI

GET /api/promotions/
Response  200
HideShow
Body
{
  "objects": [
    {
      "code": "my_test_code",
      "description": "test description",
      "duration": "forever",
      "title": "promo 1",
      "percent": null,
      "self": "/api/promotions/prom_be5579ba3fe94f779d45ab7b34e6883e/",
      "times_redeemed": null,
      "applies_to_all": true,
      "currency": "GBP",
      "redeem_by": "2050-11-24",
      "amount": 10,
      "max_redemptions": 2,
      "active": false,
      "creates_promotion": false,
      "duration_in_months": 2,
      "uid": "prom_be5579ba3fe94f779d45ab7b34e6883e",
      "schedule_urls": [],
      "data_source_id": "aaa",
      "last_data_ingest": "2015-09-04T13:27:58.767434+00:00"
    }
  ]
}

POST/api/promotions/

Create a new promotion

Example URI

POST /api/promotions/
Request
HideShow
Body
{
  "code": "my_test_code",
  "description": "test description",
  "amount": 10,
  "max_redemptions": 2,
  "redeem_by": "11/24/2050",
  "duration": "forever",
  "duration_in_months": 2,
  "applies_to_all": true,
  "title": "promo 1",
  "creates_promotion": false,
  "eligible_user_url": "/api/customers/cust_6411f7f132944ce08bae3368651328b5/",
  "currency": "GBP",
  "schedule_urls": [],
  "data_source_id": "aaa",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00"
}
Response  201
HideShow
Body
{
    "code": "my_test_code",
    "description": "test description",
    "duration": "forever",
    "title": "promo 1",
    "percent": null,
    "self": "/api/promotions/prom_be5579ba3fe94f779d45ab7b34e6883e/",
    "times_redeemed": null,
    "applies_to_all": true,
    "currency": "GBP",
    "redeem_by": "2050-11-24",
    "amount": 10,
    "max_redemptions": 2,
    "active": false,
    "creates_promotion": false,
    "duration_in_months": 2,
    "uid": "prom_be5579ba3fe94f779d45ab7b34e6883e",
    "schedule_urls": [],
    "data_source_id": "aaa",
    "last_data_ingest": "2015-09-04T13:27:58.767434+00:0
}

Promotions:validate

Look up and validate voucher codes.

POST/api/promotions/validate/

Test validity of a voucher, given a customer type and a plan.

Example URI

POST /api/promotions/validate/
Request
HideShow
Body
{
  "customer_type": 1,
  "code": "FREEX",
  "plan": 775,
  "token": null
}
Response  500
HideShow
Body
{
  "error": {
    "message": "That code does not exist",
    "code": "voucher",
    "param": "voucher_code"
  }
}

Promotions:voucher

GET/api/promotions/{voucher}/

Get details of an individual promotion.

Example URI

GET /api/promotions/my_test_code/
URI Parameters
HideShow
voucher
string (required) Example: my_test_code
Response  200
HideShow
Body
{
    "code": "my_test_code",
    "description": "test description",
    "duration": "forever",
    "title": "promo 1",
    "percent": null,
    "self": "/api/promotions/prom_be5579ba3fe94f779d45ab7b34e6883e/",
    "times_redeemed": null,
    "applies_to_all": true,
    "currency": "GBP",
    "redeem_by": "2050-11-24",
    "amount": 10,
    "max_redemptions": 2,
    "active": false,
    "creates_promotion": false,
    "duration_in_months": 2,
    "uid": "prom_be5579ba3fe94f779d45ab7b34e6883e",
    "schedule_urls": [],
    "data_source_id": "aaa",
    "last_data_ingest": "2015-09-04T13:27:58.767434+00:00
}

Promotions:uid

GET/api/promotions/{uid}/

Get details of an individual promotion.

Example URI

GET /api/promotions/prom_be5579ba3fe94f779d45ab7b34e6883e/
URI Parameters
HideShow
uid
string (required) Example: prom_be5579ba3fe94f779d45ab7b34e6883e
Response  200
HideShow
Body
{
  "code": "my_test_code",
  "description": "test description",
  "duration": "forever",
  "title": "promo 1",
  "percent": null,
  "self": "/api/promotions/prom_be5579ba3fe94f779d45ab7b34e6883e/",
  "times_redeemed": null,
  "applies_to_all": true,
  "currency": "GBP",
  "redeem_by": "2050-11-24",
  "amount": 10,
  "max_redemptions": 2,
  "active": false,
  "creates_promotion": false,
  "duration_in_months": 2,
  "uid": "prom_be5579ba3fe94f779d45ab7b34e6883e",
  "schedule_urls": [],
  "data_source_id": "aaa",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00"
}

PATCH/api/promotions/{uid}/

Partial update existing Promotions resource.

Example URI

PATCH /api/promotions/prom_be5579ba3fe94f779d45ab7b34e6883e/
URI Parameters
HideShow
uid
string (required) Example: prom_be5579ba3fe94f779d45ab7b34e6883e
Request
HideShow
Headers
Authorization: JWT token
Body
{
  "title": "promo 2"
}
Response  200
HideShow
Body
{
  "title": "promo 2",
  "percent": null,
  "self": "/api/promotions/prom_be5579ba3fe94f779d45ab7b34e6883e/",
  "times_redeemed": null,
  "applies_to_all": true,
  "currency": "GBP",
  "redeem_by": "2050-11-24",
  "amount": 10,
  "max_redemptions": 2,
  "active": false,
  "creates_promotion": false,
  "duration_in_months": 2,
  "uid": "prom_be5579ba3fe94f779d45ab7b34e6883e",
  "schedule_urls": [],
  "data_source_id": "aaa",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00"
}

DELETE/api/promotions/{uid}/

Deletes a Promotion. This is done by setting the deleted flag to false.

Example URI

DELETE /api/promotions/prom_be5579ba3fe94f779d45ab7b34e6883e/
URI Parameters
HideShow
uid
string (required) Example: prom_be5579ba3fe94f779d45ab7b34e6883e
Response  204

Plan Entitlements:uid

Retrieve, update and manage the Entitlement model

GET/api/plan-entitlements/{uid}/

Details for an individual Entitlement

Example URI

GET /api/plan-entitlements/enti_89e7cf23cb904f259bac6ed2e87e6edd/
URI Parameters
HideShow
uid
string (required) Example: enti_89e7cf23cb904f259bac6ed2e87e6edd
Response  200
HideShow
Body
{
  "uid": "enti_89e7cf23cb904f259bac6ed2e87e6edd",
  "self": "/api/plan-entitlements/enti_89e7cf23cb904f259bac6ed2e87e6edd/",
  "name": "entitlement for tests 3",
  "asset_type_urls": [
    "/api/asset-types/asse_ad80e137d31e4ce99047ba109e59a46c/"
  ],
  "viewing_window": "4 weeks, 2 days",
  "purchase_window": "4 weeks, 2 days"
}

PUT/api/plan-entitlements/{uid}/

Update existing Entitlement details.

Example URI

PUT /api/plan-entitlements/enti_89e7cf23cb904f259bac6ed2e87e6edd/
URI Parameters
HideShow
uid
string (required) Example: enti_89e7cf23cb904f259bac6ed2e87e6edd
Request
HideShow
Body
{
  "name": "entitlement for tests 4",
  "asset_type_urls": [
    "/api/asset-types/asse_ad80e137d31e4ce99047ba109e59a46c/"
  ],
  "viewing_window": "4 weeks, 2 days",
  "purchase_window": "4 weeks, 2 days"
}
Response  200
HideShow
Body
{
  "uid": "enti_89e7cf23cb904f259bac6ed2e87e6edd",
  "self": "/api/plan-entitlements/enti_89e7cf23cb904f259bac6ed2e87e6edd/",
  "name": "entitlement for tests 4",
  "asset_type_urls": [
    "/api/asset-types/asse_ad80e137d31e4ce99047ba109e59a46c/"
  ],
  "viewing_window": "4 weeks, 2 days",
  "purchase_window": "4 weeks, 2 days"
}

DELETE/api/plan-entitlements/{uid}/

Deletes an Entitlement. This is done by setting the deleted flag to false.

Example URI

DELETE /api/plan-entitlements/enti_89e7cf23cb904f259bac6ed2e87e6edd/
URI Parameters
HideShow
uid
string (required) Example: enti_89e7cf23cb904f259bac6ed2e87e6edd
Response  204

Plan Entitlements

GET/api/plan-entitlements/

Returns a list of Entitlements.

Example URI

GET /api/plan-entitlements/
Response  200
HideShow
Body
{
  "objects": [
    {
      "uid": "enti_d8794a29b57f4a88a84c65c61f121a09",
      "self": "/api/plan-entitlements/enti_d8794a29b57f4a88a84c65c61f121a09/",
      "name": "entitlement for tests 3",
      "asset_type_urls": [],
      "viewing_window": "4 weeks, 2 days",
      "purchase_window": "4 weeks, 2 days"
    },
    {
      "uid": "enti_89e7cf23cb904f259bac6ed2e87e6edd",
      "self": "/api/plan-entitlements/enti_89e7cf23cb904f259bac6ed2e87e6edd/",
      "name": "entitlement for tests 5",
      "asset_type_urls": [
        "/api/asset-types/asse_ad80e137d31e4ce99047ba109e59a46c/"
      ],
      "viewing_window": "4 weeks, 2 days",
      "purchase_window": "4 weeks, 2 days"
    }
  ]
}

POST/api/plan-entitlements/

Creates an Entitlement.

Example URI

POST /api/plan-entitlements/
Request
HideShow
Body
{
  "name": "entitlement for tests 8",
  "asset_type_urls": [
    "/api/asset-types/asse_ad80e137d31e4ce99047ba109e59a46c/"
  ],
  "viewing_window": "4 weeks, 5 days",
  "purchase_window": "4 weeks, 5 days"
}
Response  201
HideShow
Body
{
  "uid": "enti_a8873ac51cc94d2aa55ad7137f3b1094",
  "self": "/api/plan-entitlements/enti_a8873ac51cc94d2aa55ad7137f3b1094/",
  "name": "entitlement for tests 8",
  "asset_type_urls": [
    "/api/asset-types/asse_ad80e137d31e4ce99047ba109e59a46c/"
  ],
  "viewing_window": "4 weeks, 5 days",
  "purchase_window": "4 weeks, 5 days"
}

Misc

About skylark

Returns status, diagnostic, and version information.

If an essential component of a Skylark system is unavailable, a 500 Internal Server Error response will be returned indicating the component that is down.

GET/api/about-skylark/

Example URI

GET /api/about-skylark/
Response  200
HideShow
Body
{
  skylark_version: "4.2.50",
  database_up: true,
  authenticated: false,
  elastic_search_database_up: true,
  celery_broker_up: true
}

Benchmark

Benchmarks a given URL. Requires authentication as a superuser.

POST/api/benchmark/

Example URI

POST /api/benchmark/
Request
HideShow
Body
{
  "url": "/api/episodes/?limit=1",
  "requests": 10,
  "no-cache": true
}
Response  200
HideShow
Body
{
  "min_time_ms": 80.14893531799316,
  "average_time_ms": 89.87481594085693,
  "total_time_ms": 898.7481594085693,
  "max_time_ms": 97.36204147338867
}

Batch requests

POST/api/batch/

Use this endpoint to make several requests at once and open only one HTTP connection.

The mandatory fields are id, method and url. body must be a string, so JSON must be encoded to a string.

To request the details of objects that are related to each other, prefer field expansion for better performance and cacheability.

Example URI

POST /api/batch/
Request
HideShow
Body
[
    {
        "id": "episodes",
        "method": "GET",
        "url": "/api/episodes/"
    },
    {
        "id": "create-episode",
        "method": "POST",
        "url": "/api/episodes/",
        "headers": {
            "HTTP_AUTHORIZATION": "JWT avalitoken4815162342"
        },
        "data": "{\"title\": \"Episode Title\", \"subtitle\": null, \"slug\": \"episode-slug\", \"synopsis\": \"\"}"
    },
]
Response  200
HideShow
Body
[
    {
        "id": "episodes",
        "code": "200",
        "headers": {
            ... headers for the response ...
        }
        "body": "... a list of episodes ..."
    },
    {
        "id": "create-episode",
        "code": "200",
        "headers": {
            ... headers for the response ...
        },
        "body": "...created episode..."
    }
]

Schema

Returns a list of all the models with fields and other information. Requires a superuser JWT.

GET/api/schema/

Example URI

GET /api/schema/
Response  200
HideShow
Body
{
    "objects": [
        {
          "name": "Category",
          "has_images": false,
          "has_languages": true,
          "entity_name": "tag-categories",
          "has_tags": false,
          "can_ingest": true,
          "relationships": [
              {
                  "to": "BasicEmailUser",
                  "type": "ForeignKey",
                  "name": "created_by"
              },
              {
                  "to": "BasicEmailUser",
                  "type": "ForeignKey",
                  "name": "modified_by"
              }
          ],
          "can_count": true,
          "has_versions": true,
          "fields": {
              "modified_by": "ForeignKey",
              "uid": "UidField",
              "created": "DateTimeField",
              "deleted": "BooleanField",
              "modified": "DateTimeField",
              "created_by": "ForeignKey",
              "editability": "CharField",
              "tag": "ManyToOneRel",
              "last_data_ingest": "DateTimeField",
              "data_source_fields": "ArrayField",
              "id": "AutoField",
              "categorylanguageversion": "ManyToOneRel",
              "data_source_id": "CharField"
          },
          "url": "/api/tag-categories/",
          "has_schedules": false,
          "has_talent": false,
          "language_version_model_fields": {
              "version_number": "IntegerField",
              "modified_by": "ForeignKey",
              "name": "CharField",
              "language": "SlugField",
              "slug": "SlugField",
              "modified": "DateTimeField",
              "publish_on": "DateTimeField",
              "ends_on": "DateTimeField",
              "id": "AutoField",
              "version_of": "ForeignKey",
              "is_data_source": "BooleanField"
          }
      },
      ...
    ]
}

Viewing-metrics

Returns viewing metrics. Requires a superuser JWT.

GET/api/viewing-metrics/

Example URI

GET /api/viewing-metrics/
Response  200
HideShow
Body
{
  "past_year_viewings": 1,
  "total_viewings": 1,
  "past_quarter_viewings": 1,
  "monthly_breakdown": {
    "2017-08": 1,
    "2016-07": 1,
    "2015-06": 1,
    "2014-05": 1,
    "2013-07": 1
  }
}

OVP

Accounts

GET/api/accounts/

Example URI

GET /api/accounts/
Response  200
HideShow
Body
{}

Providers

GET/api/providers/

Example URI

GET /api/providers/
Response  200
HideShow
Body
{}

Devices

Many VoD broadcasters require that customers only have a set number of devices which can be registered at any one time with their product. In order to accomplish this, the Skylark API allows for the management of user devices through integration with a third party.

Interface to Ooyala device management.

GET/api/devices/

Retrieves the devices for an authenticated customer, ordered by last_used. This call supports filtering by users

Example URI

GET /api/devices/
Request
HideShow
Headers
Authorization: JWT token
Response  200
HideShow
Body
{
  "objects": []
}

Devices

GET/api/devices/{uid}/

Returns the specified device. This call supports filtering by users

Example URI

GET /api/devices/devi_155GjfGTJ3sqEqjtCtMmhk7g/
URI Parameters
HideShow
uid
uid (required) Example: devi_155GjfGTJ3sqEqjtCtMmhk7g
Request
HideShow
Headers
Authorization: JWT token
Response  200
HideShow
Body
{
  "id": 7,
  "last_used": "07/11/2016",
  "nickname": "",
  "public_id": "",
  "registered": "07/11/2016",
  "removed": null,
  "user_agent": ""
}

PATCH/api/devices/{uid}/

Partial update of Device resource.

Example URI

PATCH /api/devices/devi_155GjfGTJ3sqEqjtCtMmhk7g/
URI Parameters
HideShow
uid
uid (required) Example: devi_155GjfGTJ3sqEqjtCtMmhk7g
Request
HideShow
Headers
Authorization: JWT token
Body
{
    "nickname": "test nickname",
}
Response  200
HideShow
Body
{
  "id": 7,
  "last_used": "07/11/2016",
  "nickname": "test nickname",
  "public_id": "",
  "registered": "07/11/2016",
  "removed": null,
  "user_agent": ""
}

DELETE/api/devices/{uid}/

Delete the specified device. This call supports filtering by users

Example URI

DELETE /api/devices/devi_155GjfGTJ3sqEqjtCtMmhk7g/
URI Parameters
HideShow
uid
uid (required) Example: devi_155GjfGTJ3sqEqjtCtMmhk7g
Response  204

Personalisation

Userlists

For consumers of VOD products, it is important that they feel the experience on the front end is tailored to how they use the product. Userlists allows Skylark to create a personal feel for the consumer by creating personal playlists based on the user’s activities. For example, this could be in the form of content a customer has marked as “Watch Later” or as a “Favourite”.

Userlists are created for the customer at the point of explicitly (or implicitly) personalising content. For example, if a consumer marks an episode or series to “Watch Later” on the front end product, then a new user list would be created.

POST/api/userlists/

This creates a new userlist for the authenticated user.

Example URI

POST /api/userlists/
Request
HideShow
Headers
Content-Type: application/json
Authorization: JWT token
Body
{
  "title": "My Userlist"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "play_b4504838bb764142adf7fef86aa41465",
  "schedule_urls": [],
  "version_number": 0,
  "publish_on": "2015-09-24T14:37:17.603217+00:00",
  "last_data_ingest": null,
  "cached_film_count": null,
  "modified_by": "roy@gmail.com",
  "created": "2015-09-24T14:37:17.603217+00:00",
  "self": "/api/userlists/play_b4504838bb764142adf7fef86aa41465/",
  "title": "My Userlist",
  "modified": "2015-09-24T14:37:17.603217+00:00",
  "created_by": "roy@gmail.com",
  "ends_on": null,
  "version_url": "/api/userlists/play_b4504838bb764142adf7fef86aa41465/versions/0/",
  "data_source_fields": [],
  "data_source_id": "",
  "is_data_source": false
}

Userlists:uid

GET/api/userlists/{uid}/

Retrieve the details about a particular userlist. If the userlist uid given does not exist, or is not owned by the user, a 404 not found response is returned.

Example URI

GET /api/userlists/user_cae338e801ee4d43aec1ffe7909ad242/
URI Parameters
HideShow
uid
string (required) Example: user_cae338e801ee4d43aec1ffe7909ad242
Request
HideShow
Headers
Content-Type: application/json
Authorization: JWT token
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "play_b4504838bb764142adf7fef86aa41465",
  "schedule_urls": [],
  "version_number": 0,
  "publish_on": "2015-09-24T14:37:17.603217+00:00",
  "last_data_ingest": null,
  "cached_film_count": null,
  "modified_by": "roy@gmail.com",
  "created": "2015-09-24T14:37:17.603217+00:00",
  "self": "/api/userlists/play_b4504838bb764142adf7fef86aa41465/",
  "title": "My Userlist",
  "modified": "2015-09-24T14:37:17.603217+00:00",
  "created_by": "roy@gmail.com",
  "ends_on": null,
  "version_url": "/api/userlists/play_b4504838bb764142adf7fef86aa41465/versions/0/",
  "data_source_fields": [],
  "data_source_id": "",
  "is_data_source": false
}

PUT/api/userlists/{uid}/

This is used to update the details of an existing userlist, which then creates a new version of the userlist.

If the userlist UID given does not exist, or is not owned by the user, a 404 not found response is returned.

Example URI

PUT /api/userlists/user_cae338e801ee4d43aec1ffe7909ad242/
URI Parameters
HideShow
uid
string (required) Example: user_cae338e801ee4d43aec1ffe7909ad242
Request
HideShow
Headers
Content-Type: application/json
Authorization: JWT token
Body
{
  "title": "Userlist 2"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "play_b4504838bb764142adf7fef86aa41465",
  "schedule_urls": [],
  "version_number": 1,
  "publish_on": "2015-09-24T14:38:36.055159+00:00",
  "last_data_ingest": null,
  "cached_film_count": null,
  "modified_by": "roy@gmail.com",
  "created": "2015-09-24T14:37:17.603217+00:00",
  "self": "/api/userlists/play_b4504838bb764142adf7fef86aa41465/",
  "title": "Userlist 2",
  "modified": "2015-09-24T14:38:36.057957+00:00",
  "created_by": "roy@gmail.com",
  "ends_on": null,
  "version_url": "/api/userlists/play_b4504838bb764142adf7fef86aa41465/versions/1/",
  "data_source_fields": [],
  "data_source_id": "",
  "is_data_source": false
}

PATCH/api/userlists/{uid}/

This is used to update part of the details of an existing userlist, which then creates a new version of the userlist.

If the userlist UID given does not exist, or is not owned by the user, a 404 not found response is returned.

Example URI

PATCH /api/userlists/user_cae338e801ee4d43aec1ffe7909ad242/
URI Parameters
HideShow
uid
string (required) Example: user_cae338e801ee4d43aec1ffe7909ad242
Request
HideShow
Headers
Content-Type: application/json
Authorization: JWT token
Body
{
  "title": "Userlist 2"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "play_b4504838bb764142adf7fef86aa41465",
  "schedule_urls": [],
  "version_number": 1,
  "publish_on": "2015-09-24T14:38:36.055159+00:00",
  "last_data_ingest": null,
  "cached_film_count": null,
  "modified_by": "roy@gmail.com",
  "created": "2015-09-24T14:37:17.603217+00:00",
  "self": "/api/userlists/play_b4504838bb764142adf7fef86aa41465/",
  "title": "Userlist 2",
  "modified": "2015-09-24T14:38:36.057957+00:00",
  "created_by": "roy@gmail.com",
  "ends_on": null,
  "version_url": "/api/userlists/play_b4504838bb764142adf7fef86aa41465/versions/1/",
  "data_source_fields": [],
  "data_source_id": "",
  "is_data_source": false
}

DELETE/api/userlists/{uid}/

Delete a userlist.

If the userlist uid given does not exist, or is not owned by the user, a 404 not found response is returned.

Example URI

DELETE /api/userlists/user_cae338e801ee4d43aec1ffe7909ad242/
URI Parameters
HideShow
uid
string (required) Example: user_cae338e801ee4d43aec1ffe7909ad242
Request
HideShow
Headers
Content-Type: application/json
Authorization: JWT token
Response  204
HideShow
Headers
Content-Type: application/json

Userlists:uid:items

Each individual Userlist is contained of multiple items of content specific to the consumer. This endpoint within Skylark is used to find and maintain items specific to a Userlist.

GET/api/userlists/{uid}/items/

This retrieves the items that are the current content of the given userlist.

If the userlist UID given does not exist, or is not owned by the user, a 404 not found response is returned.

Example URI

GET /api/userlists/user_cae338e801ee4d43aec1ffe7909ad242/items/
URI Parameters
HideShow
uid
string (required) Example: user_cae338e801ee4d43aec1ffe7909ad242
Request
HideShow
Headers
Content-Type: application/json
Authorization: JWT token
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "uid": "sche_f2e520fd7ab7476885d192113b787a28",
      "schedule_urls": [],
      "self": "/api/userlists/play_b4504838bb764142adf7fef86aa41465/items/sche_f2e520fd7ab7476885d192113b787a28/",
      "content_url": "/api/episodes/epis_33a1c5fea05d4955ac3288bda19dcb16/",
      "userlist_url": "/api/userlists/play_b4504838bb764142adf7fef86aa41465/",
      "content_type": "content",
      "position": 3,
      "text_review": ""
    }
  ]
}

POST/api/userlists/{uid}/items/

Add a new content item to the userlist at the given position. If no position is given, the new item is automatically added as the last position in the Userlist.

Users with admin or edit permission on the userlist can add new items.

If the userlist does not exist or is not owned by the user, a 404 Not Found response is returned.

Example URI

POST /api/userlists/user_cae338e801ee4d43aec1ffe7909ad242/items/
URI Parameters
HideShow
uid
string (required) Example: user_cae338e801ee4d43aec1ffe7909ad242
Request
HideShow
Headers
Content-Type: application/json
Authorization: JWT token
Body
{
  "content_url": "/api/episodes/epis_33a1c5fea05d4955ac3288bda19dcb16/",
  "position": 3
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "sche_f2e520fd7ab7476885d192113b787a28",
  "schedule_urls": [],
  "self": "/api/userlists/play_b4504838bb764142adf7fef86aa41465/items/sche_f2e520fd7ab7476885d192113b787a28/",
  "content_url": "/api/episodes/epis_33a1c5fea05d4955ac3288bda19dcb16/",
  "userlist_url": "/api/userlists/play_b4504838bb764142adf7fef86aa41465/",
  "content_type": "content",
  "position": 3,
  "text_review": ""
}

Userlists:uid:intersection

Retrieve the items that are the current content of the given userlist, and also in the list of given content URLs. Supports POST to allow long lists of URLs.

GET/api/userlists/{uid}/intersection/{?comma_separated_content}

Example URI

GET /api/userlists/user_cae338e801ee4d43aec1ffe7909ad242/intersection/?comma_separated_content=/api/episodes/epis_220067fe34f84bd681b3e8b1bcc2979e/,/api/episodes/epis_7a99b420e91e4513ac56cf12f3fb82f8/
URI Parameters
HideShow
uid
string (required) Example: user_cae338e801ee4d43aec1ffe7909ad242
comma_separated_content
string (required) Example: /api/episodes/epis_220067fe34f84bd681b3e8b1bcc2979e/,/api/episodes/epis_7a99b420e91e4513ac56cf12f3fb82f8/
Request
HideShow
Headers
Content-Type: application/json
Authorization: JWT token
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "uid": "sche_866239f603794e499ccc4b0fdef775a3",
      "schedule_urls": [],
      "modified": "2016-03-02T17:24:33.212751+00:00",
      "language_modified_by": null,
      "modified_by": "admin@example.com",
      "language_publish_on": "2016-03-02T17:24:33.212751+00:00",
      "self": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/items/sche_866239f603794e499ccc4b0fdef775a3/",
      "created_by": "admin@example.com",
      "language_modified": "2016-03-02T17:24:33.212751+00:00",
      "data_source_fields": [],
      "data_source_id": null,
      "version_url": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/items/sche_866239f603794e499ccc4b0fdef775a3/versions/0/",
      "language_version_url": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/items/sche_866239f603794e499ccc4b0fdef775a3/language-versions/0/",
      "deleted": false,
      "content_url": "/api/episodes/epis_a5e1022dfd874e169fd6da6597d0cd0f/",
      "content_type": "content",
      "text_review": "",
      "last_data_ingest": null,
      "version_number": 0,
      "language_is_data_source": false,
      "language_ends_on": null,
      "created": "2016-03-02T17:24:33.212751+00:00",
      "language_version_number": 0,
      "publish_on": "2016-03-02T17:24:33.212751+00:00",
      "ends_on": null,
      "position": 1,
      "userlist_url": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/",
      "is_data_source": false
    },
    {
      "uid": "sche_e751d636c12641bbaff1948bcdb3193a",
      "schedule_urls": [],
      "modified": "2016-03-02T17:27:01.619863+00:00",
      "language_modified_by": null,
      "modified_by": "admin@example.com",
      "language_publish_on": "2016-03-02T17:27:01.619863+00:00",
      "self": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/items/sche_e751d636c12641bbaff1948bcdb3193a/",
      "created_by": "admin@example.com",
      "language_modified": "2016-03-02T17:27:01.619863+00:00",
      "data_source_fields": [],
      "data_source_id": null,
      "version_url": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/items/sche_e751d636c12641bbaff1948bcdb3193a/versions/0/",
      "language_version_url": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/items/sche_e751d636c12641bbaff1948bcdb3193a/language-versions/0/",
      "deleted": false,
      "content_url": "/api/episodes/epis_7a99b420e91e4513ac56cf12f3fb82f8/",
      "content_type": "content",
      "text_review": "",
      "last_data_ingest": null,
      "version_number": 0,
      "language_is_data_source": false,
      "language_ends_on": null,
      "created": "2016-03-02T17:27:01.619863+00:00",
      "language_version_number": 0,
      "publish_on": "2016-03-02T17:27:01.619863+00:00",
      "ends_on": null,
      "position": 2,
      "userlist_url": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/",
      "is_data_source": false
    }
  ]
}

POST/api/userlists/{uid}/intersection/{?comma_separated_content}

Example URI

POST /api/userlists/user_cae338e801ee4d43aec1ffe7909ad242/intersection/?comma_separated_content=/api/episodes/epis_220067fe34f84bd681b3e8b1bcc2979e/,/api/episodes/epis_7a99b420e91e4513ac56cf12f3fb82f8/
URI Parameters
HideShow
uid
string (required) Example: user_cae338e801ee4d43aec1ffe7909ad242
comma_separated_content
string (required) Example: /api/episodes/epis_220067fe34f84bd681b3e8b1bcc2979e/,/api/episodes/epis_7a99b420e91e4513ac56cf12f3fb82f8/
Request
HideShow
Headers
Content-Type: application/json
Authorization: JWT token
Body
{
  "content_urls": "/api/episodes/epis_a5e1022dfd874e169fd6da6597d0cd0f/,/api/episodes/epis_7a99b420e91e4513ac56cf12f3fb82f8/"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "uid": "sche_866239f603794e499ccc4b0fdef775a3",
      "schedule_urls": [],
      "modified": "2016-03-02T17:24:33.212751+00:00",
      "language_modified_by": null,
      "modified_by": "admin@example.com",
      "language_publish_on": "2016-03-02T17:24:33.212751+00:00",
      "self": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/items/sche_866239f603794e499ccc4b0fdef775a3/",
      "created_by": "admin@example.com",
      "language_modified": "2016-03-02T17:24:33.212751+00:00",
      "data_source_fields": [],
      "data_source_id": null,
      "version_url": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/items/sche_866239f603794e499ccc4b0fdef775a3/versions/0/",
      "language_version_url": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/items/sche_866239f603794e499ccc4b0fdef775a3/language-versions/0/",
      "deleted": false,
      "content_url": "/api/episodes/epis_a5e1022dfd874e169fd6da6597d0cd0f/",
      "content_type": "content",
      "text_review": "",
      "last_data_ingest": null,
      "version_number": 0,
      "language_is_data_source": false,
      "language_ends_on": null,
      "created": "2016-03-02T17:24:33.212751+00:00",
      "language_version_number": 0,
      "publish_on": "2016-03-02T17:24:33.212751+00:00",
      "ends_on": null,
      "position": 1,
      "userlist_url": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/",
      "is_data_source": false
    },
    {
      "uid": "sche_e751d636c12641bbaff1948bcdb3193a",
      "schedule_urls": [],
      "modified": "2016-03-02T17:27:01.619863+00:00",
      "language_modified_by": null,
      "modified_by": "admin@example.com",
      "language_publish_on": "2016-03-02T17:27:01.619863+00:00",
      "self": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/items/sche_e751d636c12641bbaff1948bcdb3193a/",
      "created_by": "admin@example.com",
      "language_modified": "2016-03-02T17:27:01.619863+00:00",
      "data_source_fields": [],
      "data_source_id": null,
      "version_url": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/items/sche_e751d636c12641bbaff1948bcdb3193a/versions/0/",
      "language_version_url": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/items/sche_e751d636c12641bbaff1948bcdb3193a/language-versions/0/",
      "deleted": false,
      "content_url": "/api/episodes/epis_7a99b420e91e4513ac56cf12f3fb82f8/",
      "content_type": "content",
      "text_review": "",
      "last_data_ingest": null,
      "version_number": 0,
      "language_is_data_source": false,
      "language_ends_on": null,
      "created": "2016-03-02T17:27:01.619863+00:00",
      "language_version_number": 0,
      "publish_on": "2016-03-02T17:27:01.619863+00:00",
      "ends_on": null,
      "position": 2,
      "userlist_url": "/api/userlists/user_5f2a902ae69147c99ba84b8d848e86f2/",
      "is_data_source": false
    }
  ]
}

Userlists:uid:items:item

DELETE/api/userlists/{uid}/items/{item}/

Remove a piece of content from a userlist.

If the userlist does not exist, or is not owned by the user, a 404 Not Found response is returned.

Example URI

DELETE /api/userlists/user_cae338e801ee4d43aec1ffe7909ad242/items/sche_3962a8d61de940c19b1a9f1e1e04dd23/
URI Parameters
HideShow
uid
string (required) Example: user_cae338e801ee4d43aec1ffe7909ad242
item
string (required) Example: sche_3962a8d61de940c19b1a9f1e1e04dd23
Request
HideShow
Headers
Content-Type: application/json
Authorization: JWT token
Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Resource not found."
}

User events

For storing events such as ‘liking’ an Article on Facebook.

POST/api/user-events/

Example URI

POST /api/user-events/
Request
HideShow
Body
{
  "action": "like",
  "content_url": "/api/episodes/epis_7a99b420e91e4513ac56cf12f3fb82f8/",
  "action_detail": "facebook"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "action": "like",
  "content_object": "/api/episodes/epis_7a99b420e91e4513ac56cf12f3fb82f8/",
  "created": "2016-05-10T14:13:31.628012+00:00",
  "action_detail": "facebook"
}

Relationships

Tags

These resources allow the management of Tags and their categories. Tags can be applied to many of the other entities in the system.

Tags support language versions.

GET/api/tags/

Get a list of tags.

This call is filterable and sortable.

Example URI

GET /api/tags/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "uid": "tag__7e83c349050b4369b960479039609dbe",
      "data_source_fields": [],
      "language_modified_by": null,
      "slug": "test_slug",
      "last_data_ingest": null,
      "language_version_url": "/api/tags/tag__7e83c349050b4369b960479039609dbe/language-versions/0/",
      "modified_by": "admin@example.com",
      "language_ends_on": "2015-10-16T16:53:45+00:00",
      "created": "2015-08-03T16:39:35+00:00",
      "self": "/api/tags/tag__7e83c349050b4369b960479039609dbe/",
      "created_by": "admin@example.com",
      "name": "test name",
      "language_publish_on": "2015-08-03T16:53:07+00:00",
      "language_modified": "2015-08-03T16:53:07+00:00",
      "category_url": "/api/tag-categories/cate_0ab4d09071e54451a52a62538efaaf8d/",
      "language_is_data_source": false,
      "language_version_number": 0,
      "data_source_id": ""
    }
  ]
}

POST/api/tags/

Create a new tag

Example URI

POST /api/tags/
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "category_url": "/api/tag-categories/cate_12d0a5eeea4e43efa0a1db12e7027f56/",
  "name": "United Kingdom",
  "slug": "gb"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "tag__c329bdcba28349a1b68d97de1dd7cdac",
  "data_source_fields": [],
  "language_modified_by": null,
  "slug": "gb",
  "last_data_ingest": null,
  "language_version_url": "/api/tags/tag__c329bdcba28349a1b68d97de1dd7cdac/language-versions/0/",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "created": "2015-09-24T14:45:38.740395+00:00",
  "self": "/api/tags/tag__c329bdcba28349a1b68d97de1dd7cdac/",
  "created_by": "roy@gmail.com",
  "name": "United Kingdom",
  "language_publish_on": "2015-09-24T14:45:38.740395+00:00",
  "language_modified": "2015-09-24T14:45:38.740395+00:00",
  "category_url": "/api/tag-categories/cate_12d0a5eeea4e43efa0a1db12e7027f56/",
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": ""
}

Tags:count

Get a count of the number of available of tags. Can be filtered to only return counts of a given type.

GET/api/tags/count/{?q}

Example URI

GET /api/tags/count/?q=name:"fantasizing"
URI Parameters
HideShow
q
string (required) Example: name:"fantasizing"
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 4
}

Tags:uid

GET/api/tags/{uid}/

Retrieve the detail about a specific tag.

Example URI

GET /api/tags/tag__6db2c3bc205147e58d1941243874d626/
URI Parameters
HideShow
uid
string (required) Example: tag__6db2c3bc205147e58d1941243874d626
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "category": {
    "self": "/api/tag-categories/cate_65a2c5b93d834bfb96d3d35c449627ab/",
    "uid": "cate_65a2c5b93d834bfb96d3d35c449627ab",
    "name": "Country",
    "slug": "country"
  },
  "uid": "tag__c329bdcba28349a1b68d97de1dd7cdac",
  "data_source_fields": [],
  "language_modified_by": null,
  "slug": "gb",
  "last_data_ingest": null,
  "language_version_url": "/api/tags/tag__c329bdcba28349a1b68d97de1dd7cdac/language-versions/0/",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "created": "2015-09-24T14:45:38.740395+00:00",
  "self": "/api/tags/tag__c329bdcba28349a1b68d97de1dd7cdac/",
  "created_by": "roy@gmail.com",
  "name": "United Kingdom",
  "language_publish_on": "2015-09-24T14:45:38.740395+00:00",
  "language_modified": "2015-09-24T14:45:38.740395+00:00",
  "category_url": "/api/tag-categories/cate_65a2c5b93d834bfb96d3d35c449627ab/",
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": ""
}

PUT/api/tags/{uid}/

Update the details of a specific tag, or create one with the given UID.

Example URI

PUT /api/tags/tag__6db2c3bc205147e58d1941243874d626/
URI Parameters
HideShow
uid
string (required) Example: tag__6db2c3bc205147e58d1941243874d626
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "category_url": "/api/tag-categories/cate_65a2c5b93d834bfb96d3d35c449627ab/",
  "name": "Great Britain",
  "slug": "gb"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "tag__c329bdcba28349a1b68d97de1dd7cdac",
  "data_source_fields": [],
  "language_modified_by": null,
  "slug": "gb",
  "last_data_ingest": null,
  "language_version_url": "/api/tags/tag__c329bdcba28349a1b68d97de1dd7cdac/language-versions/0/",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "created": "2015-09-24T14:45:38.740395+00:00",
  "self": "/api/tags/tag__c329bdcba28349a1b68d97de1dd7cdac/",
  "created_by": "roy@gmail.com",
  "name": "Great Britain",
  "language_publish_on": "2015-09-24T14:45:38.740395+00:00",
  "language_modified": "2015-09-24T14:45:38.740395+00:00",
  "category_url": "/api/tag-categories/cate_12d0a5eeea4e43efa0a1db12e7027f56/",
  "category": {
    "self": "/api/tag-categories/cate_12d0a5eeea4e43efa0a1db12e7027f56/",
    "uid": "cate_65a2c5b93d834bfb96d3d35c449627ab",
    "name": "Country",
    "slug": "country"
  },
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": ""
}

DELETE/api/tags/{uid}/

Mark the tag as deleted.

Example URI

DELETE /api/tags/tag__6db2c3bc205147e58d1941243874d626/
URI Parameters
HideShow
uid
string (required) Example: tag__6db2c3bc205147e58d1941243874d626
Response  204

Tags:q

GET/api/tags/{?q}

Retrieve the detail about a specific tag.

Example URI

GET /api/tags/?q=category,slug:just_a_slug,name:Unique tag :This is a category name
URI Parameters
HideShow
q
string (required) Example: category,slug:just_a_slug,name:Unique tag :This is a category name
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/tag-categories/tag__2ef28bd373f8496594c37e42db599370/",
  "uid": "tag__2ef28bd373f8496594c37e42db599370",
  "category_url": "/api/tag-categories/cate_65a2c5b93d834bfb96d3d35c449627ab/",
  "category": {
    "self": "/api/tag-categories/cate_65a2c5b93d834bfb96d3d35c449627ab/",
    "uid": "cate_65a2c5b93d834bfb96d3d35c449627ab",
    "name": "Country",
    "slug": "country"
  },
  "name": "United Kingdom",
  "slug": "gb"
}

Tags:uid:items

GET/api/tags/{uid}/items/

Retrieve the items linked to a specific tag.

Example URI

GET /api/tags/tag__6db2c3bc205147e58d1941243874d626/items/
URI Parameters
HideShow
uid
string (required) Example: tag__6db2c3bc205147e58d1941243874d626
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "/api/episodes/film_a5e1022dfd874e169fd6da6597d0cd0f/",
  "/api/episodes/film_a5e1022dfd874e169fd6da6597d0cd0f/",
  "/api/assets/asse_1454a1f0f17746ebbab0a5890b53f7a3/"
]

Tag categories

Tag categories support language versions.

This call is filterable and sortable.

GET/api/tag-categories/

Get a list of tag categories.

Example URI

GET /api/tag-categories/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "uid": "cate_12d0a5eeea4e43efa0a1db12e7027f56",
      "language_modified_by": null,
      "slug": "country",
      "last_data_ingest": null,
      "language_version_url": "/api/tag-categories/cate_12d0a5eeea4e43efa0a1db12e7027f56/language-versions/0/",
      "modified_by": "roy@gmail.com",
      "language_ends_on": null,
      "created": "2015-09-24T14:42:57.370865+00:00",
      "self": "/api/tag-categories/cate_12d0a5eeea4e43efa0a1db12e7027f56/",
      "created_by": "roy@gmail.com",
      "name": "Country",
      "language_publish_on": "2015-09-24T14:42:57.370865+00:00",
      "language_modified": "2015-09-24T14:42:57.370865+00:00",
      "data_source_fields": [],
      "language_is_data_source": false,
      "language_version_number": 0,
      "data_source_id": ""
    }
  ]
}

POST/api/tag-categories/

Create a new tag category.

Example URI

POST /api/tag-categories/
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Country",
  "slug": "country"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "cate_12d0a5eeea4e43efa0a1db12e7027f56",
  "language_modified_by": null,
  "slug": "country",
  "last_data_ingest": null,
  "language_version_url": "/api/tag-categories/cate_12d0a5eeea4e43efa0a1db12e7027f56/language-versions/0/",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "created": "2015-09-24T14:42:57.370865+00:00",
  "self": "/api/tag-categories/cate_12d0a5eeea4e43efa0a1db12e7027f56/",
  "created_by": "roy@gmail.com",
  "name": "Country",
  "language_publish_on": "2015-09-24T14:42:57.370865+00:00",
  "language_modified": "2015-09-24T14:42:57.370865+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": ""
}

Tag categories:uid

GET/api/tag-categories/{uid}/

Retrieve the detail about a specific tag category.

Example URI

GET /api/tag-categories/cate_7a1646149e9b4ca09c8c3edb46d33db2/
URI Parameters
HideShow
uid
string (required) Example: cate_7a1646149e9b4ca09c8c3edb46d33db2
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "cate_12d0a5eeea4e43efa0a1db12e7027f56",
  "language_modified_by": null,
  "slug": "country",
  "last_data_ingest": null,
  "language_version_url": "/api/tag-categories/cate_12d0a5eeea4e43efa0a1db12e7027f56/language-versions/0/",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "created": "2015-09-24T14:42:57.370865+00:00",
  "self": "/api/tag-categories/cate_12d0a5eeea4e43efa0a1db12e7027f56/",
  "created_by": "roy@gmail.com",
  "name": "Country",
  "language_publish_on": "2015-09-24T14:42:57.370865+00:00",
  "language_modified": "2015-09-24T14:42:57.370865+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": ""
}

PUT/api/tag-categories/{uid}/

Update the details of a specific tag category, or create one with the given UID.

Example URI

PUT /api/tag-categories/cate_7a1646149e9b4ca09c8c3edb46d33db2/
URI Parameters
HideShow
uid
string (required) Example: cate_7a1646149e9b4ca09c8c3edb46d33db2
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Locality",
  "slug": "country"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "cate_12d0a5eeea4e43efa0a1db12e7027f56",
  "language_modified_by": null,
  "slug": "country",
  "last_data_ingest": null,
  "language_version_url": "/api/tag-categories/cate_12d0a5eeea4e43efa0a1db12e7027f56/language-versions/0/",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "created": "2015-09-24T14:42:57.370865+00:00",
  "self": "/api/tag-categories/cate_12d0a5eeea4e43efa0a1db12e7027f56/",
  "created_by": "roy@gmail.com",
  "name": "Locality",
  "language_publish_on": "2015-09-24T14:42:57.370865+00:00",
  "language_modified": "2015-09-24T14:42:57.370865+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": ""
}

DELETE/api/tag-categories/{uid}/

Mark the tag category as deleted.

Example URI

DELETE /api/tag-categories/cate_7a1646149e9b4ca09c8c3edb46d33db2/
URI Parameters
HideShow
uid
string (required) Example: cate_7a1646149e9b4ca09c8c3edb46d33db2
Response  204

Talent

Talent support metadata versions.

GET/api/talent/

Get a list of available talent.

This call is filterable and sortable.

Example URI

GET /api/talent/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "first_name": "John",
      "last_name": "Doe",
      "uid": "tale_6f7a9a664c934fff891d3cf217c77aae",
      "created": "2015-08-19T15:38:31.554000+00:00",
      "self": "/api/talent/tale_6f7a9a664c934fff891d3cf217c77aae/",
      "created_by": null,
      "data_source_id": "",
      "data_source_fields": [],
      "last_data_ingest": null
    }
  ]
}

POST/api/talent/

Create a new talent record.

Example URI

POST /api/talent/
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "first_name": "James",
  "last_name": "Horner"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "first_name": "James",
  "last_name": "Horner",
  "uid": "tale_cdb91ee6febd43d9bef016988452e8f3",
  "created": "2015-09-24T13:56:19.453030+00:00",
  "self": "/api/talent/tale_cdb91ee6febd43d9bef016988452e8f3/",
  "created_by": "roy@gmail.com",
  "data_source_id": "",
  "data_source_fields": [],
  "last_data_ingest": null
}

Talent:q

GET/api/talent/{?q}

Retrieve a specific talent with a free text search.

Example URI

GET /api/talent/?q=first_name:James AND last_name:Horner
URI Parameters
HideShow
q
string (required) Example: first_name:James AND last_name:Horner
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/talent/tale_788fa83bd18f44958a4ea8fe49785288/",
  "created": "2015-06-23T11:47:59.869059+00:00",
  "created_by": null,
  "first_name": "James",
  "last_name": "Horner",
  "uid": "tale_788fa83bd18f44958a4ea8fe49785288"
}

Talent:count:q

Get a count of the number of available of talent. Can be filtered to only return counts of a given type.

GET/api/talent/count/{?q}

Example URI

GET /api/talent/count/?q=first_name:James AND last_name:Horner
URI Parameters
HideShow
q
string (required) Example: first_name:James AND last_name:Horner
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 4
}

Talent:uid

GET/api/talent/{uid}/

Retrieve a specific talent record.

Example URI

GET /api/talent/tale_cdb91ee6febd43d9bef016988452e8f3/
URI Parameters
HideShow
uid
string (required) Example: tale_cdb91ee6febd43d9bef016988452e8f3
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "first_name": "James",
  "last_name": "Horner",
  "uid": "tale_cdb91ee6febd43d9bef016988452e8f3",
  "created": "2015-09-24T13:56:19.453030+00:00",
  "self": "/api/talent/tale_cdb91ee6febd43d9bef016988452e8f3/",
  "created_by": "roy@gmail.com",
  "data_source_id": "",
  "data_source_fields": [],
  "last_data_ingest": null
}

PUT/api/talent/{uid}/

Create or update the talent with the given UID.

Example URI

PUT /api/talent/tale_cdb91ee6febd43d9bef016988452e8f3/
URI Parameters
HideShow
uid
string (required) Example: tale_cdb91ee6febd43d9bef016988452e8f3
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "first_name": "James",
  "last_name": "Horner"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "first_name": "James",
  "last_name": "Wade",
  "uid": "tale_cdb91ee6febd43d9bef016988452e8f3",
  "created": "2015-09-24T13:56:19.453030+00:00",
  "self": "/api/talent/tale_cdb91ee6febd43d9bef016988452e8f3/",
  "created_by": "roy@gmail.com",
  "data_source_id": "",
  "data_source_fields": [],
  "last_data_ingest": null
}

DELETE/api/talent/{uid}/

Mark the talent as deleted.

Example URI

DELETE /api/talent/tale_cdb91ee6febd43d9bef016988452e8f3/
URI Parameters
HideShow
uid
string (required) Example: tale_cdb91ee6febd43d9bef016988452e8f3
Response  204

Roles

Roles support language versions

GET/api/roles/

Get a list of available roles.

This call is filterable and sortable.

Example URI

GET /api/roles/
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "uid": "role_22a71328a858462d9f67bfed273b6589",
      "language_modified_by": null,
      "last_data_ingest": null,
      "language_version_url": "/api/roles/role_22a71328a858462d9f67bfed273b6589/language-versions/0/",
      "language_ends_on": null,
      "created": "2015-08-20T10:36:45+00:00",
      "self": "/api/roles/role_22a71328a858462d9f67bfed273b6589/",
      "title": "RLV test 2",
      "created_by": "admin@example.com",
      "language_publish_on": "2015-08-21T08:30:20.511000+00:00",
      "language_modified": "2015-08-21T08:30:20.512000+00:00",
      "data_source_fields": [
        "Test role 2"
      ],
      "language_is_data_source": false,
      "language_version_number": 0,
      "data_source_id": ""
    }
  ]
}

POST/api/roles/

Create a new role.

Example URI

POST /api/roles/
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "title": "Key Grip"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "role_f9a8fb7f530f43f79ac7ce01a28a6c7a",
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/roles/role_f9a8fb7f530f43f79ac7ce01a28a6c7a/language-versions/0/",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "created": "2015-09-24T13:54:10.923571+00:00",
  "self": "/api/roles/role_f9a8fb7f530f43f79ac7ce01a28a6c7a/",
  "title": "Key Grip",
  "created_by": "roy@gmail.com",
  "language_publish_on": "2015-09-24T13:54:10.923571+00:00",
  "language_modified": "2015-09-24T13:54:10.923571+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": ""
}

Roles:uid

GET/api/roles/{uid}/

Retrieve a specific role.

Example URI

GET /api/roles/role_f9a8fb7f530f43f79ac7ce01a28a6c7a/
URI Parameters
HideShow
uid
string (required) Example: role_f9a8fb7f530f43f79ac7ce01a28a6c7a
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "role_f9a8fb7f530f43f79ac7ce01a28a6c7a",
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/roles/role_f9a8fb7f530f43f79ac7ce01a28a6c7a/language-versions/0/",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "created": "2015-09-24T13:54:10.923571+00:00",
  "self": "/api/roles/role_f9a8fb7f530f43f79ac7ce01a28a6c7a/",
  "title": "Key Grip",
  "created_by": "roy@gmail.com",
  "language_publish_on": "2015-09-24T13:54:10.923571+00:00",
  "language_modified": "2015-09-24T13:54:10.923571+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": ""
}

PUT/api/roles/{uid}/

Create or update the role with the given UID.

Example URI

PUT /api/roles/role_f9a8fb7f530f43f79ac7ce01a28a6c7a/
URI Parameters
HideShow
uid
string (required) Example: role_f9a8fb7f530f43f79ac7ce01a28a6c7a
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "title": "Best Boy Grip"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "role_f9a8fb7f530f43f79ac7ce01a28a6c7a",
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/roles/role_f9a8fb7f530f43f79ac7ce01a28a6c7a/language-versions/1/",
  "modified_by": "roy@gmail.com",
  "language_ends_on": null,
  "created": "2015-09-24T13:54:10.923571+00:00",
  "self": "/api/roles/role_f9a8fb7f530f43f79ac7ce01a28a6c7a/",
  "title": "Best Boy Grip",
  "created_by": "roy@gmail.com",
  "language_publish_on": "2015-09-24T13:55:11.828637+00:00",
  "language_modified": "2015-09-24T13:55:11.831818+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 1,
  "data_source_id": ""
}

DELETE/api/roles/{uid}/

Mark the role as deleted.

Example URI

DELETE /api/roles/role_f9a8fb7f530f43f79ac7ce01a28a6c7a/
URI Parameters
HideShow
uid
string (required) Example: role_f9a8fb7f530f43f79ac7ce01a28a6c7a
Response  204

Sponsors

GET/api/sponsors/

Gets a list of all sponsors

Example URI

GET /api/sponsors/
Response  200
HideShow
Body
{
  "objects": [
    {
      "name": "Sponsor test 1",
      "schedule_urls": [
        "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
      ],
      "self": "/api/sponsors/spon_c03a87627fcc425faa56714bdcb3d266/",
      "image_urls": [],
      "intro": "Just a small Intro for the Sponsor test 1",
      "link": "link1",
      "image": "",
      "uid": "spon_c03a87627fcc425faa56714bdcb3d266"
    }
  ]
}

POST/api/sponsors/

Create a new Sponsor

Example URI

POST /api/sponsors/
Request
HideShow
Body
{
  "name": "Sponsor Test Name",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "intro": "Just a small Intro for the Sponsor test 2"
}
Response  200
HideShow
Body
{
  "name": "Sponsor Test Name",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "self": "/api/sponsors/spon_329771f3777b4076ac083292687956c3/",
  "image_urls": [],
  "intro": "Just a small Intro for the Sponsor test 2",
  "link": "",
  "image": "",
  "uid": "spon_329771f3777b4076ac083292687956c3"
}

Sponsors:count

Get a count of the number of available sponsors.

GET/api/sponsors/count/

Example URI

GET /api/sponsors/count/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 4
}

Sponsors:uid

GET/api/sponsors/{uid}/

Get a specific Sponsor

Example URI

GET /api/sponsors/spon_329771f3777b4076ac083292687956c3/
URI Parameters
HideShow
uid
string (required) Example: spon_329771f3777b4076ac083292687956c3
Response  200
HideShow
Body
{
  "name": "Sponsor Test Name",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "self": "/api/sponsors/spon_329771f3777b4076ac083292687956c3/",
  "image_urls": [],
  "intro": "Just a small Intro for the Sponsor test 2",
  "link": "",
  "image": "",
  "uid": "spon_329771f3777b4076ac083292687956c3"
}

PUT/api/sponsors/{uid}/

update a Sponsor

Example URI

PUT /api/sponsors/spon_329771f3777b4076ac083292687956c3/
URI Parameters
HideShow
uid
string (required) Example: spon_329771f3777b4076ac083292687956c3
Request
HideShow
Body
{
  "name": "Sponsor Test Name",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "intro": "Just a small Intro for the Sponsor test 2"
}
Response  200
HideShow
Body
{
  "name": "Sponsor Test Name",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "self": "/api/sponsors/spon_329771f3777b4076ac083292687956c3/",
  "image_urls": [],
  "intro": "Just a small Intro for the Sponsor test 3",
  "link": "",
  "image": "",
  "uid": "spon_329771f3777b4076ac083292687956c3"
}

DELETE/api/sponsors/{uid}/

Delete a Sponsor

Example URI

DELETE /api/sponsors/spon_329771f3777b4076ac083292687956c3/
URI Parameters
HideShow
uid
string (required) Example: spon_329771f3777b4076ac083292687956c3
Response  204

Ratings

Ratings support language versions.

GET/api/ratings/

Get a list of available ratings.

Example URI

GET /api/ratings/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "uid": "rati_11ded3e63acf47dca0d25edbde16ce84",
      "schedule_urls": [
        "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
      ],
      "ends_on": null,
      "rating_position": null,
      "image_urls": [],
      "modified": "2016-03-16T11:39:18.524000+00:00",
      "is_data_source": false,
      "language_modified_by": "admin@example.com",
      "slug": "u",
      "last_data_ingest": null,
      "language_version_url": "/api/ratings/rati_11ded3e63acf47dca0d25edbde16ce84/language-versions/0/",
      "version_number": 0,
      "modified_by": null,
      "language_ends_on": null,
      "self": "/api/ratings/rati_11ded3e63acf47dca0d25edbde16ce84/",
      "description": "",
      "publish_on": "2016-03-16T11:39:18.524000+00:00",
      "created_by": "admin@example.com",
      "created": "2016-03-16T11:39:18.524000+00:00",
      "language_publish_on": "2016-03-16T11:39:18.524000+00:00",
      "language_modified": "2016-03-16T11:39:18.524000+00:00",
      "data_source_fields": [],
      "title": "U",
      "language_is_data_source": false,
      "language_version_number": 0,
      "data_source_id": null,
      "version_url": "/api/ratings/rati_11ded3e63acf47dca0d25edbde16ce84/versions/0/"
    }
  ]
}

POST/api/ratings/

Create a rating.

Example URI

POST /api/ratings/
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "rating_position": 5,
  "title": "12a",
  "slug": "12a"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "rati_2810456e78f74ba08a20b2878ba388d7",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "ends_on": null,
  "rating_position": 5,
  "image_urls": [],
  "modified": "2016-05-26T13:00:44.635304+00:00",
  "is_data_source": false,
  "language_modified_by": "admin@example.com",
  "slug": "12a",
  "last_data_ingest": null,
  "language_version_url": "/api/ratings/rati_2810456e78f74ba08a20b2878ba388d7/language-versions/0/",
  "version_number": 0,
  "modified_by": null,
  "language_ends_on": null,
  "self": "/api/ratings/rati_2810456e78f74ba08a20b2878ba388d7/",
  "description": "",
  "publish_on": "2016-05-26T13:00:44.635304+00:00",
  "created_by": "admin@example.com",
  "created": "2016-05-26T13:00:44.635304+00:00",
  "language_publish_on": "2016-05-26T13:00:44.635304+00:00",
  "language_modified": "2016-05-26T13:00:44.635304+00:00",
  "data_source_fields": [],
  "title": "12a",
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": null,
  "version_url": "/api/ratings/rati_2810456e78f74ba08a20b2878ba388d7/versions/0/"
}

Ratings:uid

GET/api/ratings/{uid}/

Example URI

GET /api/ratings/rati_11ded3e63acf47dca0d25edbde16ce84/
URI Parameters
HideShow
uid
string (required) Example: rati_11ded3e63acf47dca0d25edbde16ce84
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "rati_11ded3e63acf47dca0d25edbde16ce84",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "ends_on": null,
  "rating_position": null,
  "image_urls": [],
  "modified": "2016-03-16T11:39:18.524000+00:00",
  "is_data_source": false,
  "language_modified_by": "admin@example.com",
  "slug": "u",
  "last_data_ingest": null,
  "language_version_url": "/api/ratings/rati_11ded3e63acf47dca0d25edbde16ce84/language-versions/0/",
  "version_number": 0,
  "modified_by": null,
  "language_ends_on": null,
  "self": "/api/ratings/rati_11ded3e63acf47dca0d25edbde16ce84/",
  "description": "",
  "publish_on": "2016-03-16T11:39:18.524000+00:00",
  "created_by": "admin@example.com",
  "created": "2016-03-16T11:39:18.524000+00:00",
  "language_publish_on": "2016-03-16T11:39:18.524000+00:00",
  "language_modified": "2016-03-16T11:39:18.524000+00:00",
  "data_source_fields": [],
  "title": "U",
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": null,
  "version_url": "/api/ratings/rati_11ded3e63acf47dca0d25edbde16ce84/versions/0/"
}

PUT/api/ratings/{uid}/

Update a rating or create one with the given UID.

Example URI

PUT /api/ratings/rati_11ded3e63acf47dca0d25edbde16ce84/
URI Parameters
HideShow
uid
string (required) Example: rati_11ded3e63acf47dca0d25edbde16ce84
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "rating_position": 5,
  "title": "12a",
  "slug": "12a"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "rati_11ded3e63acf47dca0d25edbde16ce84",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "ends_on": null,
  "rating_position": null,
  "image_urls": [],
  "modified": "2016-03-16T11:39:18.524000+00:00",
  "is_data_source": false,
  "language_modified_by": "admin@example.com",
  "slug": "u",
  "last_data_ingest": null,
  "language_version_url": "/api/ratings/rati_11ded3e63acf47dca0d25edbde16ce84/language-versions/0/",
  "version_number": 0,
  "modified_by": null,
  "language_ends_on": null,
  "self": "/api/ratings/rati_11ded3e63acf47dca0d25edbde16ce84/",
  "description": "",
  "publish_on": "2016-03-16T11:39:18.524000+00:00",
  "created_by": "admin@example.com",
  "created": "2016-03-16T11:39:18.524000+00:00",
  "language_publish_on": "2016-03-16T11:39:18.524000+00:00",
  "language_modified": "2016-03-16T11:39:18.524000+00:00",
  "data_source_fields": [],
  "title": "U",
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": null,
  "version_url": "/api/ratings/rati_11ded3e63acf47dca0d25edbde16ce84/versions/0/"
}

DELETE/api/ratings/{uid}/

Mark a rating as deleted.

Example URI

DELETE /api/ratings/rati_11ded3e63acf47dca0d25edbde16ce84/
URI Parameters
HideShow
uid
string (required) Example: rati_11ded3e63acf47dca0d25edbde16ce84
Response  204

Schedules

Schedules represent availability during a given time period, for a given set of dimensions.

The available dimensions are Affiliate, Device Type, Language, Locale, and Region. The values of each dimension are represented by a slug and a free text name. The endpoints under /api/dimensions/ allow these to be retrieved and managed.

A full description of Scheduling accros the API is given in the Scheduling section.

The API always returns three fields with that contains information about the schedules associated with the prepared object :

  • schedule_url (deprecated) : returns the url of a arbitrary chose schedule

  • schedule_urls : returns the urls for all the schedules associated with the object

  • schedule_statuses : for each schedule associated with the object, indicate if it matches the current request parameters

Schedules

POST/api/schedules/

Dates must be a string of ISO format when creating or updating

Example URI

POST /api/schedules/
Request
HideShow
Body
{
    "starts": "2015-04-27T12:00:29.300953+00:00",
    "ends": "2015-05-03T12:00:29.300997+00:00",
    "title": "api post test",
    "affiliate_urls": [],
    "device_type_urls": [
        "/api/schedule/dimensions/device-types/devi_4dcd8120f85a47819d842001d754ae52",
        "/api/schedule/dimensions/device-types/devi_1a5db027fc1b4702b93bacd19fa3b20d",
    ],
    "language_urls": [],
    "locale_urls": [],
    "region_urls": [],
    "customer_type_urls": [],
    "data_source_id": "aaa",
    "last_data_ingest": "2015-09-04T13:27:58.767434+00:00"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "locale_urls": [],
  "ends": "2015-05-03T12:00:29.300997+00:00",
  "affiliate_urls": [],
  "uid": "sche_5cd69b233db64d679b8b3ed80219ee8b",
  "language_urls": [],
  "created": "2015-09-24T14:29:34.594616+00:00",
  "starts": "2015-04-27T12:00:29.300953+00:00",
  "self": "/api/schedules/sche_5cd69b233db64d679b8b3ed80219ee8b/",
  "title": "api post test",
  "data_source_id": "aaa",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
  "modified": "2015-09-24T14:29:34.594616+00:00",
  "device_type_urls": [],
  "region_urls": [],
  "customer_type_urls": [],
  "rights": true,
  "status": "current"
}

Schedules:rights

GET/api/schedules/{?rights}

Schedule can optionally be filtered by their rights flag. By default, all schedules are returned. To get just rights schedules, append ?rights=true to the URL, to get just editorial schedules, append ?rights=false.

This call is filterable and sortable.

Example URI

GET /api/schedules/?rights=true
URI Parameters
HideShow
rights
boolean (optional) Example: true

If given, filter the list of schedules based on their rights flag.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "locale_urls": [],
  "ends": "2015-05-03T12:00:29.300997+00:00",
  "affiliate_urls": [],
  "uid": "sche_5cd69b233db64d679b8b3ed80219ee8b",
  "language_urls": [],
  "created": "2015-09-24T14:29:34.594616+00:00",
  "starts": "2015-04-27T12:00:29.300953+00:00",
  "self": "/api/schedules/sche_5cd69b233db64d679b8b3ed80219ee8b/",
  "title": "api post test",
  "modified": "2015-09-24T14:29:34.594616+00:00",
  "device_type_urls": [],
  "region_urls": [],
  "rights": true,
  "data_source_id": "aaa",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
  "status": "current"
}

Schedules:q

GET/api/schedules/{?q}

Example: q=title:Schedule 9

q=locales:China

Example URI

GET /api/schedules/?q=title:Forever
URI Parameters
HideShow
q
string (required) Example: title:Forever

title, locales, affiliates, device_types, languages, regions, customer_types.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "locale_urls": [
        "/api/dimensions/locales/loca_245853e64de74c50a1b362f885f6065f/",
        "/api/dimensions/locales/loca_676bbcf9e7b54df9ad8471df6a5cdfd7/",
        "/api/dimensions/locales/loca_dd88d12c713a4007a564a123f65df75e/",
        "/api/dimensions/locales/loca_f4ca6c8c13a446ec9453e053175bad4f/",
        "/api/dimensions/locales/loca_ae8872b650bf46a8a031b52986cb09b1/"
      ],
      "ends": "2020-01-01T11:11:11+00:00",
      "affiliate_urls": [
        "/api/dimensions/affiliates/affi_33e901006eba4ca1b0604af4eb8ed8f9/",
        "/api/dimensions/affiliates/affi_6f7f4f468c1246a5acbd00a774f0d321/",
        "/api/dimensions/affiliates/affi_8cddbbc4fee74d889ad4eeb32be6ab59/",
        "/api/dimensions/affiliates/affi_6b74e2485a564755b544b8490c3f65fc/",
        "/api/dimensions/affiliates/affi_d6fc6003be7d4a46bdc24206335cae05/"
      ],
      "uid": "sche_fc5be8ad9bdd4bb889c35cdf51d369e9",
      "language_urls": [
        "/api/dimensions/languages/lang_7b554b4dad524d9394240867589e6ef1/",
        "/api/dimensions/languages/lang_1e6eac471ff44840989209181be28c0a/",
        "/api/dimensions/languages/lang_c9d8216982b94cc1aa2529908f96bd97/",
        "/api/dimensions/languages/lang_fce8f45b543e4da7b1652c429b6bb4e0/",
        "/api/dimensions/languages/lang_202248c253d14069974423e9aa6793d0/"
      ],
      "created": "2015-07-29T12:08:29.013000+00:00",
      "starts": "2000-01-01T11:11:11+00:00",
      "self": "/api/schedules/sche_fc5be8ad9bdd4bb889c35cdf51d369e9/",
      "title": "I am current ALL dimensions",
      "modified": "2015-07-29T12:08:29.013000+00:00",
      "device_type_urls": [
        "/api/dimensions/device-types/devi_8a3e47bdef294b60b1aa8c0a5761dee0/",
        "/api/dimensions/device-types/devi_8b89cb6a1a2d4152b3c9ba8b46b15562/",
        "/api/dimensions/device-types/devi_d31d9853c6064c4580fe973d9564f8ff/",
        "/api/dimensions/device-types/devi_56a266ba809446759281e2e83af40353/",
        "/api/dimensions/device-types/devi_bfdb053e75eb4106a3cbeb1dc1947cd8/"
      ],
      "region_urls": [
        "/api/dimensions/regions/regi_25e9a9b336bb4b188a2d0771f62701ad/",
        "/api/dimensions/regions/regi_f7964eea383747969fe4fbb85bb53918/",
        "/api/dimensions/regions/regi_2d4052fb95884a388cf67f1305993e87/",
        "/api/dimensions/regions/regi_6180f212f3e94aaf9f6c4fde126f172f/"
      ],
      "customer_type_urls": [
        "/api/dimensions/regions/cust_25e9a9b336bb4b188a2d0771f62701ad/",
        "/api/dimensions/regions/cust_f7964eea383747969fe4fbb85bb53918/",
        "/api/dimensions/regions/cust_2d4052fb95884a388cf67f1305993e87/",
        "/api/dimensions/regions/cust_6180f212f3e94aaf9f6c4fde126f172f/"
      ],
      "rights": false
    },
    {
      "locale_urls": [
        "/api/dimensions/locales/loca_245853e64de74c50a1b362f885f6065f/",
        "/api/dimensions/locales/loca_31f3c63f2a884740a4455388869e4433/"
      ],
      "ends": "2020-01-01T11:11:11+00:00",
      "affiliate_urls": [
        "/api/dimensions/affiliates/affi_33e901006eba4ca1b0604af4eb8ed8f9/",
        "/api/dimensions/affiliates/affi_f7c00d1aff1841e78b98fc6a9a5995e6/"
      ],
      "uid": "sche_8ce506da87b64ef0bdb1a1695d013ddd",
      "language_urls": [
        "/api/dimensions/languages/lang_7b554b4dad524d9394240867589e6ef1/",
        "/api/dimensions/languages/lang_58a98d3532de44e78c577d8d1c78f705/"
      ],
      "created": "2015-07-29T13:07:54.343000+00:00",
      "starts": "2000-01-01T11:11:11+00:00",
      "self": "/api/schedules/sche_8ce506da87b64ef0bdb1a1695d013ddd/",
      "title": "I am current UNIQUE dimensions",
      "modified": "2015-07-29T13:07:54.343000+00:00",
      "device_type_urls": [
        "/api/dimensions/device-types/devi_8a3e47bdef294b60b1aa8c0a5761dee0/",
        "/api/dimensions/device-types/devi_ad9b22caade34c7bbdb626ab0d087c5f/"
      ],
      "region_urls": [
        "/api/dimensions/regions/regi_f7964eea383747969fe4fbb85bb53918/",
        "/api/dimensions/regions/regi_27b6a3b1c50042319d9f94149cf611d7/"
      ],
      "customer_type_urls": [
        "/api/dimensions/regions/cust_25e9a9b336bb4b188a2d0771f62701ad/",
        "/api/dimensions/regions/cust_f7964eea383747969fe4fbb85bb53918/",
        "/api/dimensions/regions/cust_2d4052fb95884a388cf67f1305993e87/",
        "/api/dimensions/regions/cust_6180f212f3e94aaf9f6c4fde126f172f/"
      ],
      "rights": false,
      "status": "current"
    }
  ]
}

Schedules:count

Get a count of the number of available of schedules. Can be filtered to only return counts of a given type.

GET/api/schedules/count/{?q}

Example URI

GET /api/schedules/count/?q=title:Forever
URI Parameters
HideShow
q
string (required) Example: title:Forever
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 4
}

Schedules:uid

GET/api/schedules/{uid}/

Example URI

GET /api/schedules/sche_5cd69b233db64d679b8b3ed80219ee8b/
URI Parameters
HideShow
uid
string (required) Example: sche_5cd69b233db64d679b8b3ed80219ee8b
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "locale_urls": [],
  "ends": "2038-03-14T00:00:00+00:00",
  "affiliate_urls": [],
  "uid": "sche_5cd69b233db64d679b8b3ed80219ee8b",
  "language_urls": [],
  "created": "2015-03-11T13:57:03.839000+00:00",
  "starts": "2015-02-12T00:00:00+00:00",
  "self": "/api/schedules/sche_5cd69b233db64d679b8b3ed80219ee8b/",
  "title": "Schedule 9",
  "modified": "2015-03-11T13:57:03.839000+00:00",
  "device_type_urls": [],
  "region_urls": [],
  "customer_type_urls": [],
  "data_source_id": "aaa",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
  "rights": true,
  "status": "current"
}

PUT/api/schedules/{uid}/

Example URI

PUT /api/schedules/sche_5cd69b233db64d679b8b3ed80219ee8b/
URI Parameters
HideShow
uid
string (required) Example: sche_5cd69b233db64d679b8b3ed80219ee8b
Request
HideShow
Body
{
  "self": "/api/schedules/sche_ca17b2c342fe47dea77f2f0fe54ca904/",
  "uid": "sche_ca17b2c342fe47dea77f2f0fe54ca904",
  "affiliate_urls": [],
  "device_type_urls": [],
  "language_urls": [],
  "locale_urls": [],
  "region_urls": [],
  "customer_type_urls": [],
  "created": "2015-03-11T13:57:03.839000+00:00",
  "ends": "2015-05-03T12:00:29.300997+00:00",
  "modified": "2015-03-11T13:57:03.839000+00:00",
  "starts": "2015-04-27T12:00:29.300953+00:00",
  "title": "api post test 2",
  "data_source_id": "zzz",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "locale_urls": [],
  "ends": "2015-05-03T12:00:29.300997+00:00",
  "affiliate_urls": [],
  "uid": "sche_5cd69b233db64d679b8b3ed80219ee8b",
  "language_urls": [],
  "created": "2015-09-24T14:29:34.594616+00:00",
  "starts": "2015-04-27T12:00:29.300953+00:00",
  "self": "/api/schedules/sche_5cd69b233db64d679b8b3ed80219ee8b/",
  "title": "api post test 2",
  "modified": "2015-09-24T14:29:34.594616+00:00",
  "device_type_urls": [],
  "region_urls": [],
  "customer_type_urls": [],
  "rights": true,
  "data_source_id": "zzz",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
  "status": "current"
}

PATCH/api/schedules/{uid}/

Example URI

PATCH /api/schedules/sche_5cd69b233db64d679b8b3ed80219ee8b/
URI Parameters
HideShow
uid
string (required) Example: sche_5cd69b233db64d679b8b3ed80219ee8b
Request
HideShow
Body
{
  "title": "New title"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "locale_urls": [],
  "ends": "2015-05-03T12:00:29.300997+00:00",
  "affiliate_urls": [],
  "uid": "sche_5cd69b233db64d679b8b3ed80219ee8b",
  "language_urls": [],
  "created": "2015-09-24T14:29:34.594616+00:00",
  "starts": "2015-04-27T12:00:29.300953+00:00",
  "self": "/api/schedules/sche_5cd69b233db64d679b8b3ed80219ee8b/",
  "title": "New title",
  "modified": "2015-09-24T14:29:34.594616+00:00",
  "device_type_urls": [],
  "region_urls": [],
  "customer_type_urls": [],
  "rights": true,
  "data_source_id": "zzz",
  "last_data_ingest": "2015-09-04T13:27:58.767434+00:00",
  "status": "current"
}

DELETE/api/schedules/{uid}/

Example URI

DELETE /api/schedules/sche_5cd69b233db64d679b8b3ed80219ee8b/
URI Parameters
HideShow
uid
string (required) Example: sche_5cd69b233db64d679b8b3ed80219ee8b
Response  204
HideShow
Headers
Content-Type: application/json

Dimensions:affiliates

GET/api/dimensions/affiliates/

Example URI

GET /api/dimensions/affiliates/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "self": "/api/dimensions/affiliates/affi_33e901006eba4ca1b0604af4eb8ed8f9/",
      "uid": "affi_33e901006eba4ca1b0604af4eb8ed8f9",
      "slug": "affiliate-1",
      "name": "Affiliate 1"
    }
  ]
}

POST/api/dimensions/affiliates/

Example URI

POST /api/dimensions/affiliates/
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Affiliate X",
  "slug": "affiliate-x"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/affiliates/affi_989ed34ec4054f2e9089a200e091ef61/",
  "uid": "affi_989ed34ec4054f2e9089a200e091ef61",
  "name": "Affiliate X",
  "slug": "affiliate-x"
}

Dimensions:affiliates:uid

GET/api/dimensions/affiliates/{uid}/

Example URI

GET /api/dimensions/affiliates/affi_989ed34ec4054f2e9089a200e091ef61/
URI Parameters
HideShow
uid
string (required) Example: affi_989ed34ec4054f2e9089a200e091ef61
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/affiliates/affi_989ed34ec4054f2e9089a200e091ef61/",
  "uid": "affi_989ed34ec4054f2e9089a200e091ef61",
  "name": "Affiliate X",
  "slug": "affiliate-x"
}

PUT/api/dimensions/affiliates/{uid}/

Example URI

PUT /api/dimensions/affiliates/affi_989ed34ec4054f2e9089a200e091ef61/
URI Parameters
HideShow
uid
string (required) Example: affi_989ed34ec4054f2e9089a200e091ef61
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Affiliate X",
  "slug": "affiliate-x"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/affiliates/affi_989ed34ec4054f2e9089a200e091ef61/",
  "uid": "affi_989ed34ec4054f2e9089a200e091ef61",
  "name": "Affiliate X",
  "slug": "affiliate-x"
}

PATCH/api/dimensions/affiliates/{uid}/

Example URI

PATCH /api/dimensions/affiliates/affi_989ed34ec4054f2e9089a200e091ef61/
URI Parameters
HideShow
uid
string (required) Example: affi_989ed34ec4054f2e9089a200e091ef61
Request
HideShow
Headers
Content-Type: application/json
Body
{
    "name": "New name",
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/affiliates/affi_989ed34ec4054f2e9089a200e091ef61/",
  "uid": "affi_989ed34ec4054f2e9089a200e091ef61",
  "name": "New name",
  "slug": "affiliate-x"
}

DELETE/api/dimensions/affiliates/{uid}/

Example URI

DELETE /api/dimensions/affiliates/affi_989ed34ec4054f2e9089a200e091ef61/
URI Parameters
HideShow
uid
string (required) Example: affi_989ed34ec4054f2e9089a200e091ef61
Response  204

Dimensions:device-types

GET/api/dimensions/device-types/

Example URI

GET /api/dimensions/device-types/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "self": "/api/dimensions/device-types/devi_8a3e47bdef294b60b1aa8c0a5761dee0/",
      "uid": "devi_8a3e47bdef294b60b1aa8c0a5761dee0",
      "slug": "ios",
      "name": "iOS"
    }
  ]
}

POST/api/dimensions/device-types/

Example URI

POST /api/dimensions/device-types/
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Smart TV",
  "slug": "smart-tv"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/device-types/devi_fe157bd6c41c45579252165091ece9df/",
  "uid": "devi_fe157bd6c41c45579252165091ece9df",
  "name": "Smart TV",
  "slug": "smart-tv"
}

Dimensions:device-types:uid

GET/api/dimensions/device-types/{uid}/

Example URI

GET /api/dimensions/device-types/devi_fe157bd6c41c45579252165091ece9df/
URI Parameters
HideShow
uid
string (required) Example: devi_fe157bd6c41c45579252165091ece9df
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/device-types/devi_fe157bd6c41c45579252165091ece9df/",
  "uid": "devi_fe157bd6c41c45579252165091ece9df",
  "name": "Smart TV",
  "slug": "smart-tv"
}

PUT/api/dimensions/device-types/{uid}/

Example URI

PUT /api/dimensions/device-types/devi_fe157bd6c41c45579252165091ece9df/
URI Parameters
HideShow
uid
string (required) Example: devi_fe157bd6c41c45579252165091ece9df
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Smart TV",
  "slug": "smart-tv"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/device-types/devi_fe157bd6c41c45579252165091ece9df/",
  "uid": "devi_fe157bd6c41c45579252165091ece9df",
  "name": "Smart TV",
  "slug": "smart-tv"
}

PATCH/api/dimensions/device-types/{uid}/

Example URI

PATCH /api/dimensions/device-types/devi_fe157bd6c41c45579252165091ece9df/
URI Parameters
HideShow
uid
string (required) Example: devi_fe157bd6c41c45579252165091ece9df
Request
HideShow
Headers
Content-Type: application/json
Body
{
    "name": "Dumb TV",
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/device-types/devi_fe157bd6c41c45579252165091ece9df/",
  "uid": "devi_fe157bd6c41c45579252165091ece9df",
  "name": "Dumb TV",
  "slug": "smart-tv"
}

DELETE/api/dimensions/device-types/{uid}/

Example URI

DELETE /api/dimensions/device-types/devi_fe157bd6c41c45579252165091ece9df/
URI Parameters
HideShow
uid
string (required) Example: devi_fe157bd6c41c45579252165091ece9df
Response  204

Dimensions:languages

GET/api/dimensions/languages/

Example URI

GET /api/dimensions/languages/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "self": "/api/dimensions/languages/lang_11cb2c30ea1c4f6a8a10def35488fd39/",
      "uid": "lang_11cb2c30ea1c4f6a8a10def35488fd39",
      "name": "French",
      "slug": "fr"
    }
  ]
}

POST/api/dimensions/languages/

Example URI

POST /api/dimensions/languages/
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "French",
  "slug": "fr"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/languages/lang_11cb2c30ea1c4f6a8a10def35488fd39/",
  "uid": "lang_11cb2c30ea1c4f6a8a10def35488fd39",
  "name": "French",
  "slug": "fr"
}

Dimensions:languages:uid

GET/api/dimensions/languages/{uid}/

Example URI

GET /api/dimensions/languages/lang_11cb2c30ea1c4f6a8a10def35488fd39/
URI Parameters
HideShow
uid
string (required) Example: lang_11cb2c30ea1c4f6a8a10def35488fd39
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/languages/lang_11cb2c30ea1c4f6a8a10def35488fd39/",
  "uid": "lang_11cb2c30ea1c4f6a8a10def35488fd39",
  "name": "French",
  "slug": "fr"
}

PUT/api/dimensions/languages/{uid}/

Example URI

PUT /api/dimensions/languages/lang_11cb2c30ea1c4f6a8a10def35488fd39/
URI Parameters
HideShow
uid
string (required) Example: lang_11cb2c30ea1c4f6a8a10def35488fd39
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "French",
  "slug": "fr"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/languages/lang_11cb2c30ea1c4f6a8a10def35488fd39/",
  "uid": "lang_11cb2c30ea1c4f6a8a10def35488fd39",
  "name": "French",
  "slug": "fr"
}

PATCH/api/dimensions/languages/{uid}/

Example URI

PATCH /api/dimensions/languages/lang_11cb2c30ea1c4f6a8a10def35488fd39/
URI Parameters
HideShow
uid
string (required) Example: lang_11cb2c30ea1c4f6a8a10def35488fd39
Request
HideShow
Headers
Content-Type: application/json
Body
{
    "name": "Italian",
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/languages/lang_11cb2c30ea1c4f6a8a10def35488fd39/",
  "uid": "lang_11cb2c30ea1c4f6a8a10def35488fd39",
  "name": "Italian",
  "slug": "fr"
}

DELETE/api/dimensions/languages/{uid}/

Example URI

DELETE /api/dimensions/languages/lang_11cb2c30ea1c4f6a8a10def35488fd39/
URI Parameters
HideShow
uid
string (required) Example: lang_11cb2c30ea1c4f6a8a10def35488fd39
Response  204

Dimensions:locales

GET/api/dimensions/locales/

Example URI

GET /api/dimensions/locales/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "self": "/api/dimensions/locales/loca_55a6fae5d3974acf882fce4f9c8cc4e5/",
      "uid": "loca_55a6fae5d3974acf882fce4f9c8cc4e5",
      "name": "Spain",
      "slug": "es"
    }
  ]
}

POST/api/dimensions/locales/

Example URI

POST /api/dimensions/locales/
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Spain",
  "slug": "es"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/locales/loca_55a6fae5d3974acf882fce4f9c8cc4e5/",
  "uid": "loca_55a6fae5d3974acf882fce4f9c8cc4e5",
  "name": "Spain",
  "slug": "es"
}

Dimensions:locales:uid

GET/api/dimensions/locales/{uid}/

Example URI

GET /api/dimensions/locales/loca_55a6fae5d3974acf882fce4f9c8cc4e5/
URI Parameters
HideShow
uid
string (required) Example: loca_55a6fae5d3974acf882fce4f9c8cc4e5
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/locales/loca_55a6fae5d3974acf882fce4f9c8cc4e5/",
  "uid": "loca_55a6fae5d3974acf882fce4f9c8cc4e5",
  "name": "Spain",
  "slug": "es"
}

PUT/api/dimensions/locales/{uid}/

Example URI

PUT /api/dimensions/locales/loca_55a6fae5d3974acf882fce4f9c8cc4e5/
URI Parameters
HideShow
uid
string (required) Example: loca_55a6fae5d3974acf882fce4f9c8cc4e5
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Spain",
  "slug": "es"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/locales/loca_55a6fae5d3974acf882fce4f9c8cc4e5/",
  "uid": "loca_55a6fae5d3974acf882fce4f9c8cc4e5",
  "name": "Spain",
  "slug": "es"
}

PATCH/api/dimensions/locales/{uid}/

Example URI

PATCH /api/dimensions/locales/loca_55a6fae5d3974acf882fce4f9c8cc4e5/
URI Parameters
HideShow
uid
string (required) Example: loca_55a6fae5d3974acf882fce4f9c8cc4e5
Request
HideShow
Headers
Content-Type: application/json
Body
{
    "name": "Italy",
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/locales/loca_55a6fae5d3974acf882fce4f9c8cc4e5/",
  "uid": "loca_55a6fae5d3974acf882fce4f9c8cc4e5",
  "name": "Italy",
  "slug": "es"
}

DELETE/api/dimensions/locales/{uid}/

Example URI

DELETE /api/dimensions/locales/loca_55a6fae5d3974acf882fce4f9c8cc4e5/
URI Parameters
HideShow
uid
string (required) Example: loca_55a6fae5d3974acf882fce4f9c8cc4e5
Response  204

Dimensions:regions

GET/api/dimensions/regions/

Example URI

GET /api/dimensions/regions/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "self": "/api/dimensions/regions/regi_f428368dba2b4f3da7bff5846782d974/",
      "uid": "regi_f428368dba2b4f3da7bff5846782d974",
      "name": "Zone 2",
      "slug": "zone-2"
    }
  ]
}

POST/api/dimensions/regions/

Example URI

POST /api/dimensions/regions/
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Zone 2",
  "slug": "zone-2"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/regions/regi_f428368dba2b4f3da7bff5846782d974/",
  "uid": "regi_f428368dba2b4f3da7bff5846782d974",
  "name": "Zone 2",
  "slug": "zone-2"
}

Dimensions:regions:uid

GET/api/dimensions/regions/{uid}/

Example URI

GET /api/dimensions/regions/regi_f428368dba2b4f3da7bff5846782d974/
URI Parameters
HideShow
uid
string (required) Example: regi_f428368dba2b4f3da7bff5846782d974
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/regions/regi_f428368dba2b4f3da7bff5846782d974/",
  "uid": "regi_f428368dba2b4f3da7bff5846782d974",
  "name": "Zone 2",
  "slug": "zone-2"
}

PUT/api/dimensions/regions/{uid}/

Example URI

PUT /api/dimensions/regions/regi_f428368dba2b4f3da7bff5846782d974/
URI Parameters
HideShow
uid
string (required) Example: regi_f428368dba2b4f3da7bff5846782d974
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Zone 2",
  "slug": "zone-2"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/regions/regi_f428368dba2b4f3da7bff5846782d974/",
  "uid": "regi_f428368dba2b4f3da7bff5846782d974",
  "name": "Zone 2",
  "slug": "zone-2"
}

PATCH/api/dimensions/regions/{uid}/

Example URI

PATCH /api/dimensions/regions/regi_f428368dba2b4f3da7bff5846782d974/
URI Parameters
HideShow
uid
string (required) Example: regi_f428368dba2b4f3da7bff5846782d974
Request
HideShow
Headers
Content-Type: application/json
Body
{
    "name": "Zone 6",
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/regions/regi_f428368dba2b4f3da7bff5846782d974/",
  "uid": "regi_f428368dba2b4f3da7bff5846782d974",
  "name": "Zone 6",
  "slug": "zone-2"
}

DELETE/api/dimensions/regions/{uid}/

Example URI

DELETE /api/dimensions/regions/regi_f428368dba2b4f3da7bff5846782d974/
URI Parameters
HideShow
uid
string (required) Example: regi_f428368dba2b4f3da7bff5846782d974
Response  204

Dimensions:customer_types

GET/api/dimensions/customer-types/

Example URI

GET /api/dimensions/customer-types/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "self": "/api/dimensions/customer-types/cust_f428368dba2b4f3da7bff5846782d974/",
      "uid": "cust_f428368dba2b4f3da7bff5846782d974",
      "name": "Basic",
      "slug": "basic"
    }
  ]
}

POST/api/dimensions/customer-types/

Example URI

POST /api/dimensions/customer-types/
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Basic",
  "slug": "basic"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/customer-types/cust_f428368dba2b4f3da7bff5846782d974/",
  "uid": "cust_f428368dba2b4f3da7bff5846782d974",
  "name": "Basic",
  "slug": "basic"
}

Dimensions:customer_types:uid

GET/api/dimensions/customer-types/{uid}/

Example URI

GET /api/dimensions/customer-types/cust_f428368dba2b4f3da7bff5846782d974/
URI Parameters
HideShow
uid
string (required) Example: cust_f428368dba2b4f3da7bff5846782d974
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/customer-types/cust_f428368dba2b4f3da7bff5846782d974/",
  "uid": "cust_f428368dba2b4f3da7bff5846782d974",
  "name": "Basic",
  "slug": "basic"
}

PUT/api/dimensions/customer-types/{uid}/

Example URI

PUT /api/dimensions/customer-types/cust_f428368dba2b4f3da7bff5846782d974/
URI Parameters
HideShow
uid
string (required) Example: cust_f428368dba2b4f3da7bff5846782d974
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Basic",
  "slug": "basic"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/customer-types/cust_f428368dba2b4f3da7bff5846782d974/",
  "uid": "cust_f428368dba2b4f3da7bff5846782d974",
  "name": "Basic",
  "slug": "basic"
}

PATCH/api/dimensions/customer-types/{uid}/

Example URI

PATCH /api/dimensions/customer-types/cust_f428368dba2b4f3da7bff5846782d974/
URI Parameters
HideShow
uid
string (required) Example: cust_f428368dba2b4f3da7bff5846782d974
Request
HideShow
Headers
Content-Type: application/json
Body
{
    "name": "Premium",
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dimensions/customer-types/cust_f428368dba2b4f3da7bff5846782d974/",
  "uid": "cust_f428368dba2b4f3da7bff5846782d974",
  "name": "Premium",
  "slug": "basic"
}

DELETE/api/dimensions/customer-types/{uid}/

Example URI

DELETE /api/dimensions/customer-types/cust_f428368dba2b4f3da7bff5846782d974/
URI Parameters
HideShow
uid
string (required) Example: cust_f428368dba2b4f3da7bff5846782d974
Response  204

Set Elements

Skylark comes with a number of built-in object types that can be scheduled as Set content. These are documented in this section.

In a particular Skylark configuration, each of these objects can be customised with their own metadata and translatable fields, both on the objects themselves and on their Set containment metadata.

This diagram shows how metadata can be stored on the Set, content item being placed into the set, and on the containment relationship itself. The fields available depend on the configuration of the Skylark installation.

These objects have intended semantics, but do not provide any particular Skylark functionality beyond storing translatable metadata, scheduling and placement into Sets. Client applications are responsible for interpreting the presence of these objects in the sets that they load, and for providing integrations with (eg) advertising or social providers.

As well as these elements, many other Skylark objects can be placed into Sets including Articles, TV Content, and Images.

Ad slot types

Ad slot types are used to place adverts with editorially controlled placement or targeting data.

Ad-by-ad metadata, such as a slot identifier, is provided whe the ad is scheduled into a containing Set. The default metadata field available when scheduling an ad into a set is name.

GET/api/ad-slot-types/

Gets a list of all Ad Slot Types.

Example URI

GET /api/ad-slot-types/
Response  200
HideShow
Body
{
  "objects": [
    {
      "uid": "adsl_38f9cef753d6490eacc33f171150767c",
      "ends_on": null,
      "modified": "2016-03-23T17:25:07.470713+00:00",
      "is_data_source": false,
      "language_modified_by": null,
      "last_data_ingest": null,
      "language_version_url": "/api/ad-slot-types/adsl_38f9cef753d6490eacc33f171150767c/language-versions/0/",
      "version_number": 0,
      "modified_by": "admin@example.com",
      "language_ends_on": null,
      "created": "2016-03-23T17:25:07.470713+00:00",
      "self": "/api/ad-slots/adsl_38f9cef753d6490eacc33f171150767c/",
      "publish_on": "2016-03-23T17:25:07.470713+00:00",
      "created_by": "admin@example.com",
      "language_publish_on": "2016-03-23T17:25:07.470713+00:00",
      "language_modified": "2016-03-23T17:25:07.470713+00:00",
      "data_source_fields": [],
      "language_is_data_source": false,
      "language_version_number": 0,
      "data_source_id": null,
      "version_url": "/api/ad-slot-types/adsl_38f9cef753d6490eacc33f171150767c/versions/0/"
    }
  ]
}

POST/api/ad-slot-types/

Create a new Ad Slot Type.

Example URI

POST /api/ad-slot-types/
Request
HideShow
Body
{}
Response  201
HideShow
Body
{
  "uid": "adsl_38f9cef753d6490eacc33f171150767c",
  "ends_on": null,
  "modified": "2016-03-23T17:25:07.470713+00:00",
  "is_data_source": false,
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/ad-slot-types/adsl_38f9cef753d6490eacc33f171150767c/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "created": "2016-03-23T17:25:07.470713+00:00",
  "self": "/api/ad-slots/adsl_38f9cef753d6490eacc33f171150767c/",
  "publish_on": "2016-03-23T17:25:07.470713+00:00",
  "created_by": "admin@example.com",
  "language_publish_on": "2016-03-23T17:25:07.470713+00:00",
  "language_modified": "2016-03-23T17:25:07.470713+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": null,
  "version_url": "/api/ad-slot-types/adsl_38f9cef753d6490eacc33f171150767c/versions/0/"
}

Ad Slot Type:uid

GET/api/ad-slot-types/{uid}/

Get an Ad Slot

Example URI

GET /api/ad-slot-types/adsl_38f9cef753d6490eacc33f171150767c/
URI Parameters
HideShow
uid
string (required) Example: adsl_38f9cef753d6490eacc33f171150767c
Response  200
HideShow
Body
{
  "uid": "adsl_38f9cef753d6490eacc33f171150767c",
  "ends_on": null,
  "modified": "2016-03-23T17:25:07.470713+00:00",
  "is_data_source": false,
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/ad-slot-types/adsl_38f9cef753d6490eacc33f171150767c/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "created": "2016-03-23T17:25:07.470713+00:00",
  "self": "/api/ad-slots/adsl_38f9cef753d6490eacc33f171150767c/",
  "publish_on": "2016-03-23T17:25:07.470713+00:00",
  "created_by": "admin@example.com",
  "language_publish_on": "2016-03-23T17:25:07.470713+00:00",
  "language_modified": "2016-03-23T17:25:07.470713+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": null,
  "version_url": "/api/ad-slot-types/adsl_38f9cef753d6490eacc33f171150767c/versions/0/"
}

PUT/api/ad-slot-types/{uid}/

Update an Ad Slot

Example URI

PUT /api/ad-slot-types/adsl_38f9cef753d6490eacc33f171150767c/
URI Parameters
HideShow
uid
string (required) Example: adsl_38f9cef753d6490eacc33f171150767c
Request
HideShow
Body
{}
Response  200
HideShow
Body
{
  "uid": "adsl_38f9cef753d6490eacc33f171150767c",
  "ends_on": null,
  "modified": "2016-03-23T17:25:07.470713+00:00",
  "is_data_source": false,
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/ad-slot-types/adsl_38f9cef753d6490eacc33f171150767c/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "created": "2016-03-23T17:25:07.470713+00:00",
  "self": "/api/ad-slots/adsl_38f9cef753d6490eacc33f171150767c/",
  "publish_on": "2016-03-23T17:25:07.470713+00:00",
  "created_by": "admin@example.com",
  "language_publish_on": "2016-03-23T17:25:07.470713+00:00",
  "language_modified": "2016-03-23T17:25:07.470713+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": null,
  "version_url": "/api/ad-slot-types/adsl_38f9cef753d6490eacc33f171150767c/versions/0/"
}

DELETE/api/ad-slot-types/{uid}/

Delete an Ad Slot

Example URI

DELETE /api/ad-slot-types/adsl_38f9cef753d6490eacc33f171150767c/
URI Parameters
HideShow
uid
string (required) Example: adsl_38f9cef753d6490eacc33f171150767c
Response  204

Blanks

GET/api/blanks/

Gets a list of all blanks

Example URI

GET /api/blanks/
Response  200
HideShow
Body
{
  "self": "/api/blanks/blan_c825d96a82dc4849804c41704c247d49/",
  "blank_style": "dark",
  "uid": "blan_c825d96a82dc4849804c41704c247d49",
  "name": "blank"
}

POST/api/blanks/

Create a new blank

Example URI

POST /api/blanks/
Request
HideShow
Body
{
  "blank_style": "dark",
  "name": "blank"
}
Response  200
HideShow
Body
{
  "self": "/api/blanks/blan_c825d96a82dc4849804c41704c247d49/",
  "blank_style": "dark",
  "uid": "blan_c825d96a82dc4849804c41704c247d49",
  "name": "blank"
}

Blanks:uid

GET/api/blanks/{uid}/

Get a specific blank

Example URI

GET /api/blanks/blan_33f650dcc6984f8bb0adbba13803d684/
URI Parameters
HideShow
uid
string (required) Example: blan_33f650dcc6984f8bb0adbba13803d684
Response  200
HideShow
Body
{
  "self": "/api/blanks/blan_c825d96a82dc4849804c41704c247d49/",
  "blank_style": "dark",
  "uid": "blan_c825d96a82dc4849804c41704c247d49",
  "name": "blank"
}

PUT/api/blanks/{uid}/

update a blank

Example URI

PUT /api/blanks/blan_33f650dcc6984f8bb0adbba13803d684/
URI Parameters
HideShow
uid
string (required) Example: blan_33f650dcc6984f8bb0adbba13803d684
Request
HideShow
Body
{
  "blank_style": "red",
  "name": "blank 2"
}
Response  200
HideShow
Body
{
  "self": "/api/blanks/blan_c825d96a82dc4849804c41704c247d49/",
  "blank_style": "red",
  "uid": "blan_c825d96a82dc4849804c41704c247d49",
  "name": "bank 2"
}

PATCH/api/blanks/{uid}/

update a blank

Example URI

PATCH /api/blanks/blan_33f650dcc6984f8bb0adbba13803d684/
URI Parameters
HideShow
uid
string (required) Example: blan_33f650dcc6984f8bb0adbba13803d684
Request
HideShow
Body
{
        "blank_style": "red",
    }
Response  200
HideShow
Body
{
  "self": "/api/blanks/blan_c825d96a82dc4849804c41704c247d49/",
  "blank_style": "red",
  "uid": "blan_c825d96a82dc4849804c41704c247d49",
  "name": "bank 2"
}

DELETE/api/blanks/{uid}/

Delete a Blank

Example URI

DELETE /api/blanks/blan_33f650dcc6984f8bb0adbba13803d684/
URI Parameters
HideShow
uid
string (required) Example: blan_33f650dcc6984f8bb0adbba13803d684
Response  204

Dividers

Dividers are generally used to create headings, navigation items, or placeholders.

Skylark configurations generally treat this object as a divider type, with divider-by-divider appearance and content metadata stored when the divider is scheduled into a containing Set.

GET/api/dividers/

Example URI

GET /api/dividers/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "self": "/api/dividers/divi_c425f7d969be4c7a93dc62a73b7f45de/",
      "uid": "divi_c425f7d969be4c7a93dc62a73b7f45de",
      "name": "Sub-Collection Navigation",
      "slug": "subcollection-menu"
    }
  ]
}

POST/api/dividers/

Example URI

POST /api/dividers/
Request
HideShow
Body
{
  "name": "divider name",
  "slug": "this-is-the-slug"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dividers/divi_7c82c18b50734b659d8248b00e7a2aa8/",
  "uid": "divi_7c82c18b50734b659d8248b00e7a2aa8",
  "name": "divder name",
  "slug": "this-is-the-slug"
}

Dividers:uid

GET/api/dividers/{uid}/

Example URI

GET /api/dividers/divi_7c82c18b50734b659d8248b00e7a2aa8/
URI Parameters
HideShow
uid
string (required) Example: divi_7c82c18b50734b659d8248b00e7a2aa8
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dividers/divi_7c82c18b50734b659d8248b00e7a2aa8/",
  "uid": "divi_7c82c18b50734b659d8248b00e7a2aa8",
  "name": "divder name",
  "slug": "this-is-the-slug"
}

PUT/api/dividers/{uid}/

Example URI

PUT /api/dividers/divi_7c82c18b50734b659d8248b00e7a2aa8/
URI Parameters
HideShow
uid
string (required) Example: divi_7c82c18b50734b659d8248b00e7a2aa8
Request
HideShow
Body
{
  "name": "new name",
  "slug": "new-slug"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dividers/divi_7c82c18b50734b659d8248b00e7a2aa8/",
  "uid": "divi_7c82c18b50734b659d8248b00e7a2aa8",
  "name": "new name",
  "slug": "new-slug"
}

PATCH/api/dividers/{uid}/

Example URI

PATCH /api/dividers/divi_7c82c18b50734b659d8248b00e7a2aa8/
URI Parameters
HideShow
uid
string (required) Example: divi_7c82c18b50734b659d8248b00e7a2aa8
Request
HideShow
Body
{
  "slug": "new-slug"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "self": "/api/dividers/divi_7c82c18b50734b659d8248b00e7a2aa8/",
  "uid": "divi_7c82c18b50734b659d8248b00e7a2aa8",
  "name": "new name",
  "slug": "new-slug"
}

DELETE/api/dividers/{uid}/

Example URI

DELETE /api/dividers/divi_7c82c18b50734b659d8248b00e7a2aa8/
URI Parameters
HideShow
uid
string (required) Example: divi_7c82c18b50734b659d8248b00e7a2aa8
Response  204

Quotes

Quotes are used to contain attributed quotation data.

GET/api/quotes/

Gets a list of all Quotes

Example URI

GET /api/quotes/
Response  200
HideShow
Body
{
  "objects": [
    {
      "timestamp": "2015-05-03T12:00:29.300997+00:00",
      "self": "/api/quotes/quot_fbfdbb39d20943ccb0f981ab31a7beef/",
      "quote_style": "dark",
      "uid": "quote_fbfdbb39d20943ccb0f981ab31a7beef",
      "name": "quote"
    }
  ]
}

POST/api/quotes/

Create a new Quote

Example URI

POST /api/quotes/
Request
HideShow
Body
{
  "quote_style": "dark",
  "name": "quote",
  "timestamp": "2015-05-03T12:00:29.300997+00:00"
}
Response  201
HideShow
Body
{
  "quote_style": "dark",
  "self": "/api/quotes/quot_64c6453969e44aaca987dda10a0d75ae/",
  "uid": "quot_64c6453969e44aaca987dda10a0d75ae",
  "name": "quote"
}

Quotes:uid

GET/api/quotes/{uid}/

Get a specific quote

Example URI

GET /api/quotes/quot_64c6453969e44aaca987dda10a0d75ae/
URI Parameters
HideShow
uid
string (required) Example: quot_64c6453969e44aaca987dda10a0d75ae
Response  200
HideShow
Body
{
  "quote_style": "dark",
  "timestamp": "2015-05-03T12:00:29.300997+00:00",
  "self": "/api/quotes/quot_64c6453969e44aaca987dda10a0d75ae/",
  "uid": "quot_64c6453969e44aaca987dda10a0d75ae",
  "name": "quote"
}

PUT/api/quotes/{uid}/

update a quote

Example URI

PUT /api/quotes/quot_64c6453969e44aaca987dda10a0d75ae/
URI Parameters
HideShow
uid
string (required) Example: quot_64c6453969e44aaca987dda10a0d75ae
Request
HideShow
Body
{
  "quote_style": "red",
  "name": "quote 2",
  "timestamp": "2015-05-03T12:00:29.300997+00:00"
}
Response  200
HideShow
Body
{
  "quote_style": "red",
  "self": "/api/quotes/quot_64c6453969e44aaca987dda10a0d75ae/",
  "uid": "quot_64c6453969e44aaca987dda10a0d75ae",
  "name": "quote 2",
  "timestamp": "2015-05-03T12:00:29.300997+00:00"
}

PATCH/api/quotes/{uid}/

update a quote

Example URI

PATCH /api/quotes/quot_64c6453969e44aaca987dda10a0d75ae/
URI Parameters
HideShow
uid
string (required) Example: quot_64c6453969e44aaca987dda10a0d75ae
Request
HideShow
Body
{
        "quote_style": "red",
    }
Response  200
HideShow
Body
{
  "quote_style": "red",
  "self": "/api/quotes/quot_64c6453969e44aaca987dda10a0d75ae/",
  "uid": "quot_64c6453969e44aaca987dda10a0d75ae",
  "name": "quote 2",
  "timestamp": "2015-05-03T12:00:29.300997+00:00"
}

DELETE/api/quotes/{uid}/

Delete a Quote

Example URI

DELETE /api/quotes/quot_64c6453969e44aaca987dda10a0d75ae/
URI Parameters
HideShow
uid
string (required) Example: quot_64c6453969e44aaca987dda10a0d75ae
Response  204

Social card types

Social card types are used to represent posts or conversations that should be represented in the client application. Each social card type represents a particular source of embeddable content.

Post-by-post identifiers are stored when the social card is scheduled into a containing Set. The default metadata field available when scheduling a social card into a set is social_id.

GET/api/social-card-types/

Gets a list of all Social Card Types.

Example URI

GET /api/social-card-types/
Response  200
HideShow
Body
{
  "objects": [
    {
      "uid": "soci_5a6ffc8581e945d6ab85b9fdb3aa0f16",
      "ends_on": null,
      "modified": "2016-04-18T15:39:19.193974+00:00",
      "is_data_source": false,
      "language_modified_by": null,
      "last_data_ingest": null,
      "language_version_url": "/api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/language-versions/0/",
      "version_number": 0,
      "modified_by": "admin@example.com",
      "language_ends_on": null,
      "created": "2016-04-18T15:39:19.193974+00:00",
      "self": "/api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/",
      "publish_on": "2016-04-18T15:39:19.193974+00:00",
      "created_by": "admin@example.com",
      "name": "facebook",
      "language_publish_on": "2016-04-18T15:39:19.193974+00:00",
      "language_modified": "2016-04-18T15:39:19.193974+00:00",
      "data_source_fields": [],
      "language_is_data_source": false,
      "language_version_number": 0,
      "data_source_id": null,
      "version_url": "/api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/versions/0/"
    }
  ]
}

POST/api/social-card-types/

Create a new Social Card Type

Example URI

POST /api/social-card-types/
Request
HideShow
Body
{
  "name": "facebook"
}
Response  201
HideShow
Body
{
  "uid": "soci_5a6ffc8581e945d6ab85b9fdb3aa0f16",
  "ends_on": null,
  "modified": "2016-04-18T15:39:19.193974+00:00",
  "is_data_source": false,
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "created": "2016-04-18T15:39:19.193974+00:00",
  "self": "/api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/",
  "publish_on": "2016-04-18T15:39:19.193974+00:00",
  "created_by": "admin@example.com",
  "name": "facebook",
  "language_publish_on": "2016-04-18T15:39:19.193974+00:00",
  "language_modified": "2016-04-18T15:39:19.193974+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": null,
  "version_url": "/api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/versions/0/"
}

Social card types:uid

GET/api/social-card-types/{uid}/

Get a Social Card Type

Example URI

GET /api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/
URI Parameters
HideShow
uid
string (required) Example: soci_5a6ffc8581e945d6ab85b9fdb3aa0f16
Response  200
HideShow
Body
{
  "uid": "soci_5a6ffc8581e945d6ab85b9fdb3aa0f16",
  "ends_on": null,
  "modified": "2016-04-18T15:39:19.193974+00:00",
  "is_data_source": false,
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "created": "2016-04-18T15:39:19.193974+00:00",
  "self": "/api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/",
  "publish_on": "2016-04-18T15:39:19.193974+00:00",
  "created_by": "admin@example.com",
  "name": "facebook",
  "language_publish_on": "2016-04-18T15:39:19.193974+00:00",
  "language_modified": "2016-04-18T15:39:19.193974+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": null,
  "version_url": "/api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/versions/0/"
}

PUT/api/social-card-types/{uid}/

Update a Social Card Type

Example URI

PUT /api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/
URI Parameters
HideShow
uid
string (required) Example: soci_5a6ffc8581e945d6ab85b9fdb3aa0f16
Request
HideShow
Body
{
  "name": "twitter"
}
Response  200
HideShow
Body
{
  "uid": "soci_5a6ffc8581e945d6ab85b9fdb3aa0f16",
  "ends_on": null,
  "modified": "2016-04-18T15:39:19.193974+00:00",
  "is_data_source": false,
  "language_modified_by": null,
  "last_data_ingest": null,
  "language_version_url": "/api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/language-versions/0/",
  "version_number": 0,
  "modified_by": "admin@example.com",
  "language_ends_on": null,
  "created": "2016-04-18T15:39:19.193974+00:00",
  "self": "/api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/",
  "publish_on": "2016-04-18T15:39:19.193974+00:00",
  "created_by": "admin@example.com",
  "name": "twitter",
  "language_publish_on": "2016-04-18T15:39:19.193974+00:00",
  "language_modified": "2016-04-18T15:39:19.193974+00:00",
  "data_source_fields": [],
  "language_is_data_source": false,
  "language_version_number": 0,
  "data_source_id": null,
  "version_url": "/api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/versions/0/"
}

DELETE/api/social-card-types/{uid}/

Delete a Social Card Type

Example URI

DELETE /api/social-card-types/soci_5a6ffc8581e945d6ab85b9fdb3aa0f16/
URI Parameters
HideShow
uid
string (required) Example: soci_5a6ffc8581e945d6ab85b9fdb3aa0f16
Response  204

Text blocks

Text Blocks are used to create short-form textual content.

Skylark configurations generally treat this object as a text block type, with block-by-block appearance and copy metadata stored when the text block is scheduled into a containing Set.

For longer-form rich text, consider the Articles API instead.

GET/api/textblocks/

Gets a list of all textblocks

Example URI

GET /api/textblocks/
Response  200
HideShow
Body
{
  "self": "/api/blanks/blan_7680e0b92c954243b7442ad5aec88263/",
  "blank_style": null,
  "uid": "text_f7dfa4e871864995832c705ca4c8cd6c",
  "name": "text block"
}

POST/api/textblocks/

Create a new Text Block

Example URI

POST /api/textblocks/
Request
HideShow
Body
{
  "name": "text block"
}
Response  200
HideShow
Body
{
  "self": "/api/blanks/blan_7680e0b92c954243b7442ad5aec88263/",
  "uid": "text_f7dfa4e871864995832c705ca4c8cd6c",
  "name": "text block"
}

Text blocks:uid

GET/api/textblocks/{uid}/

Get a specific Text Block

Example URI

GET /api/textblocks/text_f7dfa4e871864995832c705ca4c8cd6c/
URI Parameters
HideShow
uid
string (required) Example: text_f7dfa4e871864995832c705ca4c8cd6c
Response  200
HideShow
Body
{
  "self": "/api/blanks/blan_7680e0b92c954243b7442ad5aec88263/",
  "uid": "text_f7dfa4e871864995832c705ca4c8cd6c",
  "name": "text block"
}

PUT/api/textblocks/{uid}/

Update a Text Block

Example URI

PUT /api/textblocks/text_f7dfa4e871864995832c705ca4c8cd6c/
URI Parameters
HideShow
uid
string (required) Example: text_f7dfa4e871864995832c705ca4c8cd6c
Request
HideShow
Body
{
  "name": "text block 2"
}
Response  200
HideShow
Body
{
  "self": "/api/blanks/blan_7680e0b92c954243b7442ad5aec88263/",
  "uid": "text_f7dfa4e871864995832c705ca4c8cd6c",
  "name": "text block 2"
}

DELETE/api/textblocks/{uid}/

Delete a Text Block

Example URI

DELETE /api/textblocks/text_f7dfa4e871864995832c705ca4c8cd6c/
URI Parameters
HideShow
uid
string (required) Example: text_f7dfa4e871864995832c705ca4c8cd6c
Response  204

Sets

Skylark uses Sets to organise content into ordered groups with scheduled contents. Sets are typically used to represent views or pages, visual modules, editorially maintained collections or playlists, automatic most popular lists, navigation menus, or the contents of available Plans. Sets have a Set Type to show their purpose.

A Set can consist of video content (brands, seasons, episodes), articles, images or other page elements.

Sets can also contain other sets, including ones they are contained in themselves.

Each item scheduled into a set can also be associated with additional metadata that relates to the placement of the item in the set. This metadata is typically used to provide display or appearance options for content. For many of the set elements such as links and text blocks, this data may form the primary content of the element, such as the text of a text block.

The content, positioning, scheduling and additional metadata of objects within a Set has a direct correlation on what a user can see on the front end product.

Sets

Sets support language versions and returning only a subset of fields.

GET/api/sets/{?set_type_slug,contains,q,item_type}

Get a list of sets. Can be filtered to only return sets of a given type.

This call is filterable and sortable.

Example URI

GET /api/sets/?set_type_slug=genre&contains=/api/episodes/epis_1dd36bfb349a4dd2929bfdbd922ea7bd/&q=title:horror&item_type=/api/episodes/
URI Parameters
HideShow
set_type_slug
string (optional) Example: genre

If given, filter the list of sets to those matching the given set type.

contains
string (optional) Example: /api/episodes/epis_1dd36bfb349a4dd2929bfdbd922ea7bd/

If given, recursively filter the list of sets to those containing a piece of content.

q
string (optional) Example: title:horror

If given, search with given search terms

item_type
string (optional) Example: /api/episodes/

If given, filter the items to only a certain type

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "objects": [
        {
            "uid": "coll_e8400ca3aebb4f70baf74a81aefd5a78",
            "schedule_urls": [
                "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
            ],
            "modified": "2014-10-25T12:45:54.131000+00:00",
            "featured": false,
            "sponsor_urls": [],
            "language_modified_by": null,
            "plans": [],
            "modified_by": null,
            "title": "Home",
            "self": "/api/sets/coll_e8400ca3aebb4f70baf74a81aefd5a78/",
            "created_by": "admin@example.com",
            "language_publish_on": "2014-10-24T00:00:00+00:00",
            "language_modified": "2014-10-25T12:45:54.131000+00:00",
            "data_source_fields": [],
            "has_price": false,
            "set_type_url": "/api/set-types/sett_febfffc998c74fb0a90e214aa7942da0/",
            "film_count": 0,
            "data_source_id": "",
            "body": "",
            "language_version_url": "/api/sets/coll_e8400ca3aebb4f70baf74a81aefd5a78/language-versions/0/",
            "image_urls": [
                "/api/images/imag_1b278fdce62545cf8d0748a4053186cd",
            ],
            "hierarchy_url": null,
            "expired": false,
            "active": true,
            "slug": "home",
            "last_data_ingest": null,
            "version_number": 0,
            "language_ends_on": "2100-01-01T00:00:00+00:00",
            "created": "2014-10-25T12:45:54+00:00",
            "items": [
                {
                    "self": "/api/sets/coll_f77e1de439c94266b5e2ab0edc60c49b/items/sche_cd264566957f478cbbeebb6dd33400ca/",
                    "content_type': "film",
                    "content_url": "/api/films/film_6d578410f49043729e4035b5b56377d9/",
                    "position": 1,
                    "set_url': "/api/sets/coll_f77e1de439c94266b5e2ab0edc60c49b/",
                    "schedule_urls": [
                        "/api/schedules/sche_d6fc6b78fffd4e7c9f486f9b81586d8b"
                    ]
                }
            ],
            "language_version_number": 0,
            "publish_on": "2014-10-24T00:00:00+00:00",
            "summary": "",
            "ends_on": "2100-01-01T00:00:00+00:00",
            "version_url": "/api/sets/coll_e8400ca3aebb4f70baf74a81aefd5a78/versions/0/",
            "set_type_slug": "home",
            "language_is_data_source": false,
            "is_data_source": false
        }
    ]
}

Sets

POST/api/sets/

Create a new set.

Example URI

POST /api/sets/
Request
HideShow
Body
{
  "title": "Action Films",
  "slug": "action-films",
  "summary": "",
  "body": "action",
  "featured": true,
  "schedule_urls": [
    "/api/schedules/sche_859f01ae50084c2d9df164b92627a0bf"
  ],
  "set_type_url": "/api/set-types/sett_077d089c6c584a9ba1a4f2fee62fc2ad",
  "tags": [
    {
      "tag_url": "/api/tags/tag__7e83c349050b4369b960479039609dbe/",
      "schedule_urls": [
        "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/",
        "/api/schedules/sche_6b1ccb0429ac43a1a991d1926ed9b136/"
      ]
    },
    {
      "tag_url": "/api/tags/tag__7e83c349050b4369b960479039609db1/",
      "schedule_urls": [
        "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
      ]
    }
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
    "uid": "coll_d5d8943ce8f24b8da41405b7b7212d20",
    "schedule_urls": [
        "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
    ],
    "modified": "2015-09-24T13:36:10.527765+00:00",
    "featured": true,
    "sponsor_urls": [],
    "language_modified_by": null,
    "plans": [],
    "modified_by": "roy@gmail.com",
    "title": "Action Films",
    "self": "/api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/",
    "created_by": "roy@gmail.com",
    "language_publish_on": "2015-09-24T13:36:10.527765+00:00",
    "language_modified": "2015-09-24T13:36:10.527765+00:00",
    "data_source_fields": [],
    "has_price": false,
    "set_type_url": "/api/set-types/sett_febfffc998c74fb0a90e214aa7942da0/",
    "film_count": 0,
    "data_source_id": "",
    "body": "action",
    "language_version_url": "/api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/language-versions/0/",
    "image_urls": [
      "/api/images/imag_370e19bd4b6843e19deafd29474034f2/"
    ],
    "hierarchy_url": null,
    "active": false,
    "slug": "action-films",
    "last_data_ingest": null,
    "version_number": 0,
    "language_ends_on": null,
    "created": "2015-09-24T13:36:10.527765+00:00",
    "items": [],
    "expired": false,
    "set_type_url": "/api/set-types/sett_077d089c6c584a9ba1a4f2fee62fc2ad",
    "set_type_slug": "genres",
    "image_urls": [],
    "created": "2015-01-03T13:24:26+0000",
    "created_by": "creator@example.com",
    "modified": "2015-01-03T13:24:26+0000",
    "modified_by": "creator@example.com",
    "publish_on": "2015-01-03T13:24:26+0000",
    "ends_on": None,
    "tags": [
      {
        "schedule_urls": [
          "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/",
          "/api/schedules/sche_6b1ccb0429ac43a1a991d1926ed9b136/"
        ],
        "tag_url": "/api/tags/tag__7e83c349050b4369b960479039609dbe/"
      },
      {
        "schedule_urls": [
          "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
        ],
        "tag_url": "/api/tags/tag__7e83c349050b4369b960479039609db1/"
      }
    ]
}

Sets:uid

GET/api/sets/{uid}/

Example URI

GET /api/sets/coll_e8400ca3aebb4f70baf74a81aefd5a78/
URI Parameters
HideShow
uid
string (required) Example: coll_e8400ca3aebb4f70baf74a81aefd5a78
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "uid": "coll_d5d8943ce8f24b8da41405b7b7212d20",
    "schedule_urls": [
        "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
    ],
    "expired": false,
    "modified": "2015-09-24T13:36:10.527765+00:00",
    "featured": true,
    "sponsor_urls": [],
    "language_modified_by": null,
    "plans": [],
    "modified_by": "roy@gmail.com",
    "title": "Action Films",
    "self": "/api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/",
    "created_by": "roy@gmail.com",
    "language_publish_on": "2015-09-24T13:36:10.527765+00:00",
    "language_modified": "2015-09-24T13:36:10.527765+00:00",
    "data_source_fields": [],
    "has_price": false,
    "set_type_url": "/api/set-types/sett_febfffc998c74fb0a90e214aa7942da0/",
    "film_count": 0,
    "data_source_id": "",
    "body": "action",
    "language_version_url": "/api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/language-versions/0/",
    "image_urls": [
        "/api/images/imag_1b278fdce62545cf8d0748a4053186cd",
    ],
    "hierarchy_url": null,
    "active": false,
    "slug": "action-films",
    "last_data_ingest": null,
    "version_number": 0,
    "language_ends_on": null,
    "created": "2015-09-24T13:36:10.527765+00:00",
    "items": [
        {
            "self": "/api/sets/coll_f77e1de439c94266b5e2ab0edc60c49b/items/sche_cd264566957f478cbbeebb6dd33400ca/",
            "content_type': "film",
            "content_url": "/api/films/film_6d578410f49043729e4035b5b56377d9/",
            "position": 1,
            "set_url': "/api/sets/coll_f77e1de439c94266b5e2ab0edc60c49b/",
            "schedule_urls": ["/api/schedules/sche_d6fc6b78fffd4e7c9f486f9b81586d8b"]
        }
    ],
    "language_version_number": 0,
    "publish_on": "2015-09-24T13:36:10.527765+00:00",
    "summary": "",
    "ends_on": null,
    "version_url": "/api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/versions/0/",
    "set_type_slug": "home",
    "language_is_data_source": false,
    "is_data_source": false
}

PUT/api/sets/{uid}/

Create or update a Set with the given UID.

Example URI

PUT /api/sets/coll_e8400ca3aebb4f70baf74a81aefd5a78/
URI Parameters
HideShow
uid
string (required) Example: coll_e8400ca3aebb4f70baf74a81aefd5a78
Request
HideShow
Headers
Content-Type: application/json
Body
{
    "title": "Indie Films",
    "slug": "indie-films",
    "summary": "",
    "body": "indie",
    "featured": true,
    "schedule_urls": ["/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"],
    "set_type_url": "/api/set-types/sett_febfffc998c74fb0a90e214aa7942da0/",
    "image_urls": [
      "/api/images/imag_370e19bd4b6843e19deafd29474034f2/"
    "tags": [
        {"tag_url": "/api/tags/tag__7e83c349050b4369b960479039609dbe/",
          "schedule_urls": ["/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/",
                            "/api/schedules/sche_6b1ccb0429ac43a1a991d1926ed9b136/"]},
        {"tag_url": "/api/tags/tag__7e83c349050b4369b960479039609db1/",
          "schedule_urls": ["/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"]}
    ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "coll_d5d8943ce8f24b8da41405b7b7212d20",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "expired": false,
  "modified": "2015-09-24T13:36:10.527765+00:00",
  "featured": true,
  "sponsor_urls": [],
  "language_modified_by": null,
  "plans": [],
  "modified_by": "roy@gmail.com",
  "title": "Indie Films",
  "self": "/api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/",
  "created_by": "roy@gmail.com",
  "language_publish_on": "2015-09-24T13:38:57.114480+00:00",
  "language_modified": "2015-09-24T13:38:57.120885+00:00",
  "data_source_fields": [],
  "has_price": false,
  "set_type_url": "/api/set-types/sett_febfffc998c74fb0a90e214aa7942da0/",
  "film_count": 0,
  "data_source_id": "",
  "body": "indie",
  "language_version_url": "/api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/language-versions/1/",
  "image_urls": [
    "/api/images/imag_370e19bd4b6843e19deafd29474034f2/"
  ],
  "hierarchy_url": null,
  "active": false,
  "slug": "indie-films",
  "last_data_ingest": null,
  "version_number": 0,
  "language_ends_on": null,
  "created": "2015-09-24T13:36:10.527765+00:00",
  "items": [],
  "language_version_number": 1,
  "publish_on": "2015-09-24T13:36:10.527765+00:00",
  "summary": "",
  "ends_on": null,
  "version_url": "/api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/versions/0/",
  "set_type_slug": "home",
  "language_is_data_source": false,
  "is_data_source": false
}

PATCH/api/sets/{uid}/

Update a part of a Set with the given UID

Example URI

PATCH /api/sets/coll_e8400ca3aebb4f70baf74a81aefd5a78/
URI Parameters
HideShow
uid
string (required) Example: coll_e8400ca3aebb4f70baf74a81aefd5a78
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "tags": [
    {
      "tag_url": "/api/tags/tag__7e83c349050b4369b960479039609dbe/",
      "schedule_urls": [
        "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/",
        "/api/schedules/sche_6b1ccb0429ac43a1a991d1926ed9b136/"
      ]
    },
    {
      "tag_url": "/api/tags/tag__7e83c349050b4369b960479039609db1/",
      "schedule_urls": [
        "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
      ]
    }
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "coll_d5d8943ce8f24b8da41405b7b7212d20",
  "schedule_urls": [
    "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
  ],
  "expired": false,
  "modified": "2015-09-24T13:36:10.527765+00:00",
  "featured": true,
  "sponsor_urls": [],
  "language_modified_by": null,
  "plans": [],
  "modified_by": "roy@gmail.com",
  "title": "Indie Films",
  "self": "/api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/",
  "created_by": "roy@gmail.com",
  "language_publish_on": "2015-09-24T13:38:57.114480+00:00",
  "language_modified": "2015-09-24T13:38:57.120885+00:00",
  "data_source_fields": [],
  "has_price": false,
  "set_type_url": "/api/set-types/sett_febfffc998c74fb0a90e214aa7942da0/",
  "film_count": 0,
  "data_source_id": "",
  "body": "indie",
  "language_version_url": "/api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/language-versions/1/",
  "image_urls": [
    "/api/images/imag_370e19bd4b6843e19deafd29474034f2/"
  ],
  "hierarchy_url": null,
  "active": false,
  "slug": "indie-films",
  "last_data_ingest": null,
  "version_number": 0,
  "language_ends_on": null,
  "created": "2015-09-24T13:36:10.527765+00:00",
  "items": [],
  "language_version_number": 1,
  "publish_on": "2015-09-24T13:36:10.527765+00:00",
  "summary": "",
  "ends_on": null,
  "version_url": "/api/sets/coll_d5d8943ce8f24b8da41405b7b7212d20/versions/0/",
  "set_type_slug": "home",
  "language_is_data_source": false,
  "is_data_source": false
}

DELETE/api/sets/{uid}/

Mark a Set as deleted.

Example URI

DELETE /api/sets/coll_e8400ca3aebb4f70baf74a81aefd5a78/
URI Parameters
HideShow
uid
string (required) Example: coll_e8400ca3aebb4f70baf74a81aefd5a78
Response  204
HideShow
Headers
Content-Type: application/json

Sets:count

Get a count of the number of Sets. Can be filtered to count only matching results.

GET/api/sets/count/

Example URI

GET /api/sets/count/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 4
}

Sets:uid:items

Also supports ?order=random.

GET/api/sets/{uid}/items/{?item_type}

Retrieve the items that are the current content of the given set.

Example URI

GET /api/sets/sche_5f0cbd046a254e38af98b247f406700f/items/?item_type=/api/episodes/
URI Parameters
HideShow
uid
string (required) Example: sche_5f0cbd046a254e38af98b247f406700f
item_type
string (optional) Example: /api/episodes/
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "objects": [
    {
      "uid": "sche_5f0cbd046a254e38af98b247f406700f",
      "schedule_urls": [
        "/api/schedules/sche_8ce506da87b64ef0bdb1a1695d013ddd/"
      ],
      "self": "/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/items/sche_5f0cbd046a254e38af98b247f406700f/",
      "content_url": "/api/assets/asse_5007ccdf64234514b63aeb52b20f4ad8/",
      "set_url": "/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/",
      "content_type": "content",
      "position": 2,
      "text_review": "CURRENT unique ASSET!"
    }
  ]
}

Sets:uid:items

POST/api/sets/{uid}/items/

Add a new content item to the Set at the given position. If no position is given, the new item is stored at position 0, and treated as “unplaced”. Unplaced content is not returned by the standard sets API even when scheduled: only the Sets API for CMS will return it.

A content_url is mandatory. Additional metadata fields, relating to the the contents containment within the set, will be available depending on the type of that content.

If the given set does not exist a 404 Not Found response is returned.

Example URI

POST /api/sets/sche_5f0cbd046a254e38af98b247f406700f/items/
URI Parameters
HideShow
uid
string (required) Example: sche_5f0cbd046a254e38af98b247f406700f
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "schedule_urls": [
    "/api/schedules/sche_8ce506da87b64ef0bdb1a1695d013ddd/"
  ],
  "content_url": "/api/assets/asse_5007ccdf64234514b63aeb52b20f4ad8/",
  "position": 8,
  "text_review": "Five stars!"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "sche_c6f47721c37b4a32a21c00412f9b3f88",
  "schedule_urls": [
    "/api/schedules/sche_8ce506da87b64ef0bdb1a1695d013ddd/"
  ],
  "self": "/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/items/sche_c6f47721c37b4a32a21c00412f9b3f88/",
  "content_url": "/api/assets/asse_5007ccdf64234514b63aeb52b20f4ad8/",
  "set_url": "/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/",
  "content_type": "content",
  "position": 8,
  "text_review": "Five stars!"
}

Sets:uid:items:item

PUT/api/sets/{uid}/items/{item}/

Update the details of a scheduled item.

Example URI

PUT /api/sets/user_cae338e801ee4d43aec1ffe7909ad242/items/sche_3962a8d61de940c19b1a9f1e1e04dd23/
URI Parameters
HideShow
uid
string (required) Example: user_cae338e801ee4d43aec1ffe7909ad242
item
string (required) Example: sche_3962a8d61de940c19b1a9f1e1e04dd23
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "schedule_urls": [
    "/api/schedules/sche_8ce506da87b64ef0bdb1a1695d013ddd/"
  ],
  "content_url": "/api/assets/asse_5007ccdf64234514b63aeb52b20f4ad8/",
  "position": 8,
  "text_review": "Three stars. Very average"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "sche_79206492f6594912821b50f513f8cf4e",
  "schedule_urls": [
    "/api/schedules/sche_8ce506da87b64ef0bdb1a1695d013ddd/"
  ],
  "self": "/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/items/sche_79206492f6594912821b50f513f8cf4e/",
  "content_url": "/api/assets/asse_5007ccdf64234514b63aeb52b20f4ad8/",
  "set_url": "/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/",
  "content_type": "content",
  "position": 8,
  "text_review": "Three stars. Very average"
}

PATCH/api/sets/{uid}/items/{item}/

Update part of the details of a scheduled item.

Example URI

PATCH /api/sets/user_cae338e801ee4d43aec1ffe7909ad242/items/sche_3962a8d61de940c19b1a9f1e1e04dd23/
URI Parameters
HideShow
uid
string (required) Example: user_cae338e801ee4d43aec1ffe7909ad242
item
string (required) Example: sche_3962a8d61de940c19b1a9f1e1e04dd23
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "text_review": "Three stars. Very average"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uid": "sche_79206492f6594912821b50f513f8cf4e",
  "schedule_urls": [
    "/api/schedules/sche_8ce506da87b64ef0bdb1a1695d013ddd/"
  ],
  "self": "/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/items/sche_79206492f6594912821b50f513f8cf4e/",
  "content_url": "/api/assets/asse_5007ccdf64234514b63aeb52b20f4ad8/",
  "set_url": "/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/",
  "content_type": "content",
  "position": 8,
  "text_review": "Three stars. Very average"
}

DELETE/api/sets/{uid}/items/{item}/

Remove a piece of content from a set.

If the given set does not exist, a 404 Not Found response is returned.

Example URI

DELETE /api/sets/user_cae338e801ee4d43aec1ffe7909ad242/items/sche_3962a8d61de940c19b1a9f1e1e04dd23/
URI Parameters
HideShow
uid
string (required) Example: user_cae338e801ee4d43aec1ffe7909ad242
item
string (required) Example: sche_3962a8d61de940c19b1a9f1e1e04dd23
Response  204

Sets:uid:versions

GET/api/sets/{uid}/versions/

Get a list of all versions of the given set.

Example URI

GET /api/sets/coll_e8400ca3aebb4f70baf74a81aefd5a78/versions/
URI Parameters
HideShow
uid
string (required) Example: coll_e8400ca3aebb4f70baf74a81aefd5a78
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "uid": "coll_88f0f403b71249eb9f255f7df15e14ed",
    "schedule_urls": [
      "/api/schedules/sche_aeba759af1f44c9ca75564c363c870b6/"
    ],
    "expired": false,
    "modified": "2014-10-25T12:45:54.146000+00:00",
    "featured": false,
    "sponsor_urls": [],
    "language_modified_by": null,
    "plans": [],
    "modified_by": null,
    "title": "New",
    "self": "/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/",
    "created_by": "admin@example.com",
    "language_publish_on": "2014-10-24T00:00:00+00:00",
    "language_modified": "2014-10-25T12:45:54.146000+00:00",
    "data_source_fields": [],
    "has_price": false,
    "set_type_url": "/api/set-types/sett_888fea5fb5474ee9aac9416f4fd6bce6/",
    "film_count": 0,
    "data_source_id": "",
    "body": "",
    "language_version_url": "/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/language-versions/0/",
    "image_urls": [],
    "hierarchy_url": null,
    "active": true,
    "slug": "new",
    "last_data_ingest": null,
    "version_number": 0,
    "language_ends_on": "2100-01-01T00:00:00+00:00",
    "created": "2014-10-25T12:45:54+00:00",
    "items": [
      {
        "uid": "sche_5f0cbd046a254e38af98b247f406700f",
        "schedule_urls": [
          "/api/schedules/sche_8ce506da87b64ef0bdb1a1695d013ddd/"
        ],
        "self": "/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/items/sche_5f0cbd046a254e38af98b247f406700f/",
        "content_url": "/api/assets/asse_5007ccdf64234514b63aeb52b20f4ad8/",
        "set_url": "/api/sets/coll_88f0f403b71249eb9f255f7df15e14ed/",
        "content_type": "content",
        "position": 2,
        "text_review": "CURRENT unique ASSET!"
      }
    ],
    "language_version_number": 0,
    "publish_on": "2014-10-24T00:00:00+00:00