Skip to content

Developers

How can we help you?

← Go back

Title

Note: This resource links can be expanded using the expand option except blackout, right, trailer and promoted_content links.

A title is an individual title, like a specific program or movie, or an episode of a series.

It looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<title>
  <id type="integer">1</id>
  <name>Forrest Gump</name>
  <title>Forrest Gump</title>
  <external-id>C5080530001</external-id>
  <title-type>feature</title-type>
  <tags>Action,Drama</tags>
  <acl-hash>&lt;view@everyone&gt; &lt;edit@team#141&gt; &lt;contribute@user#38&gt;</acl-hash>
  <link rel="self" href="https://movida.bebanjo.net/api/titles/1"/>
  <link rel="schedule" href="https://movida.bebanjo.net/api/titles/1/schedule"/>
  <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/titles/1/linear_schedulings"/>
  <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/1/availability_windows"/>
  <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/1/title_groups"/>
  <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/114"/>
  <link rel="images" href="https://movida.bebanjo.net/api/titles/1/images"/>
  <link rel="assets" href="https://movida.bebanjo.net/api/titles/1/assets"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/titles/1/metadata"/>
  <link rel="blackouts" href="https://movida.bebanjo.net/api/titles/1/blackouts"/>
  <link rel="rights" href="https://movida.bebanjo.net/api/titles/1/rights"/>
  <link rel="denied_rights" href="https://movida.bebanjo.net/api/titles/1/denied_rights"/>
  <link rel="rules" href="https://movida.bebanjo.net/api/titles/1/rules"/>
  <link rel="clips" href="https://movida.bebanjo.net/api/titles/1/clips"/>
  <link rel="note" href="https://movida.bebanjo.net/api/titles/1/note"/>
  <link rel="creator" href="https://movida.bebanjo.net/api/users/38"/>
</title>
{
  "resource_type": "title",
  "id": 1,
  "name": "Forrest Gump",
  "title": "Forrest Gump",
  "external_id": "C5080530001",
  "title_type": "feature",
  "tags": "Action,Drama",
  "acl_hash": "<view@everyone> <edit@team#141> <contribute@user#38>",
  "self_link": "https://movida.bebanjo.net/api/titles/1",
  "schedule_link": "https://movida.bebanjo.net/api/titles/1/schedule",
  "linear_schedulings_link": "https://movida.bebanjo.net/api/titles/1/linear_schedulings",
  "availability_windows_link": "https://movida.bebanjo.net/api/titles/1/availability_windows",
  "title_groups_link": "https://movida.bebanjo.net/api/titles/1/title_groups",
  "licensor_link": "https://movida.bebanjo.net/api/licensors/114",
  "images_link": "https://movida.bebanjo.net/api/titles/1/images",
  "assets_link": "https://movida.bebanjo.net/api/titles/1/assets",
  "metadata_link": "https://movida.bebanjo.net/api/titles/1/metadata",
  "blackouts_link": "https://movida.bebanjo.net/api/titles/1/blackouts",
  "rights_link": "https://movida.bebanjo.net/api/titles/1/rights",
  "denied_rights_link": "https://movida.bebanjo.net/api/titles/1/denied_rights",
  "rules_link": "https://movida.bebanjo.net/api/titles/1/rules",
  "clips_link": "https://movida.bebanjo.net/api/titles/1/clips",
  "note_link": "https://movida.bebanjo.net/api/titles/1/note",
  "creator_link": "https://movida.bebanjo.net/api/users/38"
}

As you can see, a title has a schedule (which will contain all of the instances of that title in any of the available VoD platforms), and it also references its series, its licensor, its metadata, its images, and, if it’s a feature, it’s blackouts and it’s trailers.

The self link is pointing to the title itself, and it is a unique URL that will not change overtime.

The creator link represents the user creator of the title, and it will be present only when the title is created by a regular user, and not by an API user. This link is visible only for Mediagenix On-Demand accounts configured for User Permissions.

Valid attributes

  • id (required): Mediagenix On-Demand internal identifier of the title. It shouldn’t be provided in the creation of the resource, because Mediagenix On-Demand will assign that value.
  • external-id (optional): the identifier of the title in the external system. If provided, it has to be unique in the scope of the company.
  • title-type (required): the type of title. Possible values are episode, feature, open, promo, ad, bumper and trailer.
  • episode-number (optional): the number of episode. This attribute only makes sense when the title is an episode and belongs to a series.
  • episode-reference-id (optional): the reference ID of episode. This attribute only makes sense when the title is an episode and belongs to a series. It is used to specify alphanumeric values that will be used instead of the episode number on the episode’s title. It is an alphanumeric value that allows non-unique and non sequential episode numbering, for example “1b” or “0”. When a value is present, it is used for episode naming, like “E1b” or “E0”, instead of the normal “E01” that makes use of the episode_number value.
  • name (required): the name of the title.
  • title (read-only): the full name of the title. In the case of an episode, it includes both the episode reference ID (or episode number, if ID is not present) and the title name. This is a read-only attribute, PUT or POST requests including this attribute will fail.
  • tags (optional): the list of tags separated by commas of the title.

  • acl-hash (optional): a string representation of user permissions assigned to the title. This property can be updated only by API users, adding or removing permissions from the list as needed.
    • Pattern: <permissionName@subjectType#subjectId>
    • Example: <contribute@team#101> <edit@everyone> <view@user#123>

    Each user permission representation const of 3 parts:

    • permissionName: the name of the Permission resource.
    • subjectType: the type of the subject being granted with permissions. Allowed values: “user” for User, “team” for Team and “everyone” when it makes reference to all users of the BeBnanjo account.
    • subjectId: the Mediagenix On-Demand internal identifier of the subject.

    This attribute is only present for Mediagenix On-Demand accounts configured for User Permissions.

Get a list of all titles in the current account

Assets are linked from the root of the API, through the link identified with the rel="titles" attribute:

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/titles
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/titles

And would yield something like:

<?xml version='1.0' encoding='utf-8' ?>
<titles type="array">
  <total-entries>2</total-entries>
  <link rel="next" href="https://movida.bebanjo.net/api/titles?page=2"/>
  <title>
    <id type="integer">73</id>
    <name>Episode 1</name>
    <episode-number type="integer">1</episode-number>
    <episode-reference-id>1b</episode-reference-id>
    <title>E01, Episode 1</title>
    <external-id>C5147630001</external-id>
    <title-type>episode</title-type>
    <tags>Action,Drama</tags>
    <acl-hash>&lt;view@everyone&gt; &lt;edit@team#141&gt; &lt;contribute@user#38&gt;</acl-hash>
    <link rel="self" href="https://movida.bebanjo.net/api/titles/73"/>
    <link rel="schedule" href="https://movida.bebanjo.net/api/titles/73/schedule"/>
    <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/titles/73/linear_schedulings"/>
    <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/73/availability_windows"/>
    <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/73/title_groups"/>
    <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/114"/>
    <link rel="images" href="https://movida.bebanjo.net/api/titles/73/images"/>
    <link rel="assets" href="https://movida.bebanjo.net/api/titles/73/assets"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/titles/73/metadata"/>
    <link rel="blackouts" href="https://movida.bebanjo.net/api/titles/73/blackouts"/>
    <link rel="rights" href="https://movida.bebanjo.net/api/titles/73/rights"/>
    <link rel="denied_rights" href="https://movida.bebanjo.net/api/titles/73/denied_rights"/>
    <link rel="rules" href="https://movida.bebanjo.net/api/titles/73/rules"/>
    <link rel="clips" href="https://movida.bebanjo.net/api/titles/73/clips"/>
    <link rel="note" href="https://movida.bebanjo.net/api/titles/73/note"/>
    <link rel="creator" href="https://movida.bebanjo.net/api/users/38"/>
  </title>
  <title>
    <id type="integer">30391</id>
    <name>The Green Lantern</name>
    <title>The Green Lantern</title>
    <external-id>C5150630007</external-id>
    <title-type>feature</title-type>
    <tags>Action,Drama</tags>
    <acl-hash>&lt;view@everyone&gt; &lt;edit@team#141&gt; &lt;contribute@user#38&gt;</acl-hash>
    <link rel="self" href="https://movida.bebanjo.net/api/titles/30391"/>
    <link rel="schedule" href="https://movida.bebanjo.net/api/titles/30391/schedule"/>
    <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/titles/30391/linear_schedulings"/>
    <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/30391/availability_windows"/>
    <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/30391/title_groups"/>
    <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/114"/>
    <link rel="images" href="https://movida.bebanjo.net/api/titles/30391/images"/>
    <link rel="assets" href="https://movida.bebanjo.net/api/titles/30391/assets"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/titles/30391/metadata"/>
    <link rel="blackouts" href="https://movida.bebanjo.net/api/titles/30391/blackouts"/>
    <link rel="rights" href="https://movida.bebanjo.net/api/titles/30391/rights"/>
    <link rel="denied_rights" href="https://movida.bebanjo.net/api/titles/30391/denied_rights"/>
    <link rel="rules" href="https://movida.bebanjo.net/api/titles/30391/rules"/>
    <link rel="clips" href="https://movida.bebanjo.net/api/titles/30391/clips"/>
    <link rel="note" href="https://movida.bebanjo.net/api/titles/30391/note"/>
    <link rel="creator" href="https://movida.bebanjo.net/api/users/43"/>
  </title>
</titles>
{
  "total_entries": 2,
  "next_link": "https://movida.bebanjo.net/api/titles?page=2",
  "entries": [
    {
      "resource_type": "title",
      "id": 73,
      "name": "Episode 1",
      "episode_number": 1,
      "episode_reference_id": "1b",
      "title": "E01, Episode 1",
      "external_id": "C5147630001",
      "title_type": "episode",
      "tags": "Action,Drama",
      "acl_hash": "<view@everyone> <edit@team#141> <contribute@user#38>",
      "self_link": "https://movida.bebanjo.net/api/titles/73",
      "schedule_link": "https://movida.bebanjo.net/api/titles/73/schedule",
      "linear_schedulings_link": "https://movida.bebanjo.net/api/titles/73/linear_schedulings",
      "availability_windows_link": "https://movida.bebanjo.net/api/titles/73/availability_windows",
      "title_groups_link": "https://movida.bebanjo.net/api/titles/73/title_groups",
      "licensor_link": "https://movida.bebanjo.net/api/licensors/29",
      "images_link": "https://movida.bebanjo.net/api/titles/73/images",
      "assets_link": "https://movida.bebanjo.net/api/titles/73/assets",
      "metadata_link": "https://movida.bebanjo.net/api/titles/73/metadata",
      "blackouts_link": "https://movida.bebanjo.net/api/titles/73/blackouts",
      "rights_link": "https://movida.bebanjo.net/api/titles/73/rights",
      "denied_rights_link": "https://movida.bebanjo.net/api/titles/73/denied_rights",
      "rules_link": "https://movida.bebanjo.net/api/titles/73/rules",
      "clips_link": "https://movida.bebanjo.net/api/titles/73/clips",
      "note_link": "https://movida.bebanjo.net/api/titles/73/note",
      "creator_link": "https://movida.bebanjo.net/api/users/38"
    },
    {
      "resource_type": "title",
      "id": 30391,
      "name": "The Green Lantern",
      "title": "The Green Lantern",
      "external_id": "C5150630007",
      "title_type": "feature",
      "tags": "Action,Drama",
      "acl_hash": "<view@everyone> <edit@team#141> <contribute@user#43>",
      "self_link": "https://movida.bebanjo.net/api/titles/30391",
      "schedule_link": "https://movida.bebanjo.net/api/titles/30391/schedule",
      "linear_schedulings_link": "https://movida.bebanjo.net/api/titles/30391/linear_schedulings",
      "availability_windows_link": "https://movida.bebanjo.net/api/titles/30391/availability_windows",
      "title_groups_link": "https://movida.bebanjo.net/api/titles/30391/title_groups",
      "licensor_link": "https://movida.bebanjo.net/api/licensors/114",
      "images_link": "https://movida.bebanjo.net/api/titles/30391/images",
      "assets_link": "https://movida.bebanjo.net/api/titles/30391/assets",
      "metadata_link": "https://movida.bebanjo.net/api/titles/30391/metadata",
      "blackouts_link": "https://movida.bebanjo.net/api/titles/30391/blackouts",
      "rights_link": "https://movida.bebanjo.net/api/titles/30391/rights",
      "denied_rights_link": "https://movida.bebanjo.net/api/titles/30391/denied_rights",
      "rules_link": "https://movida.bebanjo.net/api/titles/30391/rules",
      "clips_link": "https://movida.bebanjo.net/api/titles/30391/clips",
      "note_link": "https://movida.bebanjo.net/api/titles/30391/note",
      "creator_link": "https://movida.bebanjo.net/api/users/43"
    }
  ]
}

Note: only 50 titles will be included in each page by default. But you can override this by using the per_page parameter. The total-entries attribute will indicate the total number of entries and the links rel="next" and rel="prev" should be used to get the next and the previous pages so you can navigate for all the Titles of your account.

Valid attributes

  • external_id: You can filter the list of titles by passing in an external_id. Because Mediagenix On-Demand was designed to integrate with external content management system, it has an attribute called external_id for every series and every title. This attribute can be used to store the ID of that specific item in an external system.

  • pagination - Note that by default, this is not paginated endpoint for the Title resource. If you want to enable pagination you need to provide the pagination parameter with a value of “true”.

  • per_page – Number of elements returned in each page. The maximum value allowed is 200 and the default is 50. Only effective with enabled pagination.

  • page – Number of the page you want to be returner. Only effective with enabled pagination.

Get a title by external_id

If you needed to access a title by external_id, you can do so by passing the parameter external_id to the list of titles, like this:

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/titles?external_id=C5147630001
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/titles?external_id=C5147630001

Which would filter by the passed external_id like:

<?xml version="1.0" encoding="UTF-8"?>
<titles type="array">
  <total-entries>1</total-entries>
  <title>
    <id type="integer">73</id>
    <name>Episode 1</name>
    <episode-number type="integer">1</episode-number>
    <episode-reference-id>1b</episode-reference-id>
    <title>E01, Episode 1</title>
    <external-id>C5147630001</external-id>
    <title-type>episode</title-type>
    <tags>Action,Drama</tags>
    <acl-hash>&lt;view@everyone&gt; &lt;edit@team#141&gt; &lt;contribute@user#38&gt;</acl-hash>
    <link rel="self" href="https://movida.bebanjo.net/api/titles/73"/>
    <link rel="schedule" href="https://movida.bebanjo.net/api/titles/73/schedule"/>
    <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/titles/73/linear_schedulings"/>
    <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/73/availability_windows"/>
    <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/73/title_groups"/>
    <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/114"/>
    <link rel="images" href="https://movida.bebanjo.net/api/titles/73/images"/>
    <link rel="assets" href="https://movida.bebanjo.net/api/titles/73/assets"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/titles/73/metadata"/>
    <link rel="blackouts" href="https://movida.bebanjo.net/api/titles/73/blackouts"/>
    <link rel="rights" href="https://movida.bebanjo.net/api/titles/73/rights"/>
    <link rel="denied_rights" href="https://movida.bebanjo.net/api/titles/73/denied_rights"/>
    <link rel="rules" href="https://movida.bebanjo.net/api/titles/73/rules"/>
    <link rel="clips" href="https://movida.bebanjo.net/api/titles/73/clips"/>
    <link rel="note" href="https://movida.bebanjo.net/api/titles/73/note"/>
    <link rel="creator" href="https://movida.bebanjo.net/api/users/38"/>
  </title>
</titles>
{
  "total_entries": 1,
  "entries": [
    {
      "resource_type": "title",
      "id": 73,
      "name": "Episode 1",
      "episode_number": 1,
      "episode_reference_id": "1b",
      "title": "E01, Episode 1",
      "external_id": "C5147630001",
      "title_type": "episode",
      "tags": "Action,Drama",
      "acl_hash": "<view@everyone> <edit@team#141> <contribute@user#38>",
      "self_link": "https://movida.bebanjo.net/api/titles/73",
      "schedule_link": "https://movida.bebanjo.net/api/titles/73/schedule",
      "linear_schedulings_link": "https://movida.bebanjo.net/api/titles/73/linear_schedulings",
      "availability_windows_link": "https://movida.bebanjo.net/api/titles/73/availability_windows",
      "title_groups_link": "https://movida.bebanjo.net/api/titles/73/title_groups",
      "licensor_link": "https://movida.bebanjo.net/api/licensors/29",
      "images_link": "https://movida.bebanjo.net/api/titles/73/images",
      "assets_link": "https://movida.bebanjo.net/api/titles/73/assets",
      "metadata_link": "https://movida.bebanjo.net/api/titles/73/metadata",
      "blackouts_link": "https://movida.bebanjo.net/api/titles/73/blackouts",
      "rights_link": "https://movida.bebanjo.net/api/titles/73/rights",
      "denied_rights_link": "https://movida.bebanjo.net/api/titles/73/denied_rights",
      "rules_link": "https://movida.bebanjo.net/api/titles/73/rules",
      "clips_link": "https://movida.bebanjo.net/api/titles/73/clips",
      "note_link": "https://movida.bebanjo.net/api/titles/73/note",
      "creator_link": "https://movida.bebanjo.net/api/users/38"
    }
  ]
}

Get a list of all trailers on a title

Note: Deprecated feature.

To return a list of all trailers for a title, it would go like this (please note that at the moment pagination is not default):

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/titles/30391/trailers?pagination=true
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/titles/30391/trailers?pagination=true

And would yield something like:

<?xml version='1.0' encoding='utf-8' ?>
<titles type="array">
  <total-entries>2</total-entries>
  <link rel="next" href="https://movida.bebanjo.net/api/titles/30391/trailers?pagination=true&page=2"/>
  <title>
    <id type="integer">73</id>
    <name>Trailer 1</name>
    <title>Trailer 1</title>
    <external-id>C5147630001</external-id>
    <title-type>trailer</title-type>
    <tags>Action,Drama</tags>
    <acl-hash>&lt;view@everyone&gt; &lt;edit@team#141&gt; &lt;contribute@user#38&gt;</acl-hash>
    <link rel="self" href="https://movida.bebanjo.net/api/titles/73"/>
    <link rel="schedule" href="https://movida.bebanjo.net/api/titles/73/schedule"/>
    <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/73/availability_windows"/>
    <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/73/title_groups"/>
    <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/753"/>
    <link rel="images" href="https://movida.bebanjo.net/api/titles/73/images"/>
    <link rel="assets" href="https://movida.bebanjo.net/api/titles/73/assets"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/titles/73/metadata"/>
    <link rel="blackouts" href="https://movida.bebanjo.net/api/titles/73/blackouts"/>
    <link rel="rights" href="https://movida.bebanjo.net/api/titles/73/rights"/>
    <link rel="denied_rights" href="https://movida.bebanjo.net/api/titles/73/denied_rights"/>
    <link rel="promoted_content" href="https://movida.bebanjo.net/api/titles/3175124"/>
    <link rel="content_promotions" href="https://movida.bebanjo.net/api/titles/73/content_promotions"/>
    <link rel="note" href="https://movida.bebanjo.net/api/titles/73/note"/>
    <link rel="creator" href="https://movida.bebanjo.net/api/users/38"/>
  </title>
  <title>
    <id type="integer">74</id>
    <title>Trailer 2</title>
    <name>Trailer 2</name>
    <external-id>C5147630002</external-id>
    <title-type>trailer</title-type>
    <tags>Action,Drama</tags>
    <acl-hash>&lt;view@everyone&gt; &lt;edit@team#141&gt; &lt;contribute@user#43&gt;</acl-hash>
    <link rel="self" href="https://movida.bebanjo.net/api/titles/74"/>
    <link rel="schedule" href="https://movida.bebanjo.net/api/titles/74/schedule"/>
    <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/74/availability_windows"/>
    <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/74/title_groups"/>
    <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/114"/>
    <link rel="images" href="https://movida.bebanjo.net/api/titles/74/images"/>
    <link rel="assets" href="https://movida.bebanjo.net/api/titles/74/assets"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/titles/74/metadata"/>
    <link rel="blackouts" href="https://movida.bebanjo.net/api/titles/74/blackouts"/>
    <link rel="rights" href="https://movida.bebanjo.net/api/titles/74/rights"/>
    <link rel="denied_rights" href="https://movida.bebanjo.net/api/titles/74/denied_rights"/>
    <link rel="promoted_content" href="https://movida.bebanjo.net/api/titles/3175124"/>
    <link rel="content_promotions" href="https://movida.bebanjo.net/api/titles/74/content_promotions"/>
    <link rel="note" href="https://movida.bebanjo.net/api/titles/74/note"/>
    <link rel="creator" href="https://movida.bebanjo.net/api/users/43"/>
  </title>
</titles>
{
  "total_entries": 2,
  "next_link": "https://movida.bebanjo.net/api/titles/30391/trailers?pagination=true&page=2",
  "entries": [
    {
      "resource_type": "title",
      "id": 73,
      "name": "Trailer 1",
      "title": "Trailer 1",
      "external_id": "C5147630001",
      "title_type": "trailer",
      "tags": "Action,Drama",
      "acl_hash": "<view@everyone> <edit@team#141> <contribute@user#38>",
      "self_link": "https://movida.bebanjo.net/api/titles/73",
      "schedule_link": "https://movida.bebanjo.net/api/titles/73/schedule",
      "availability_windows_link": "https://movida.bebanjo.net/api/titles/73/availability_windows",
      "title_groups_link": "https://movida.bebanjo.net/api/titles/73/title_groups",
      "licensor_link": "https://movida.bebanjo.net/api/licensors/753",
      "images_link": "https://movida.bebanjo.net/api/titles/73/images",
      "assets_link": "https://movida.bebanjo.net/api/titles/73/assets",
      "metadata_link": "https://movida.bebanjo.net/api/titles/73/metadata",
      "blackouts_link": "https://movida.bebanjo.net/api/titles/73/blackouts",
      "rights_link": "https://movida.bebanjo.net/api/titles/73/rights",
      "denied_rights_link": "https://movida.bebanjo.net/api/titles/73/denied_rights",
      "promoted_content_link": "https://movida.bebanjo.net/api/titles/3175124",
      "content_promotions_link": "https://movida.bebanjo.net/api/titles/73/content_promotions",
      "note_link": "https://movida.bebanjo.net/api/titles/73/note",
      "creator_link": "https://movida.bebanjo.net/api/users/38"
    },
    {
      "resource_type": "title",
      "id": 74,
      "name": "Trailer 2",
      "title": "Trailer 2",
      "external_id": "C5147630002",
      "title_type": "trailer",
      "tags": "Action,Drama",
      "acl_hash": "<view@everyone> <edit@team#141> <contribute@user#43>",
      "self_link": "https://movida.bebanjo.net/api/titles/74",
      "schedule_link": "https://movida.bebanjo.net/api/titles/74/schedule",
      "availability_windows_link": "https://movida.bebanjo.net/api/titles/74/availability_windows",
      "title_groups_link": "https://movida.bebanjo.net/api/titles/74/title_groups",
      "licensor_link": "https://movida.bebanjo.net/api/licensors/114",
      "images_link": "https://movida.bebanjo.net/api/titles/74/images",
      "assets_link": "https://movida.bebanjo.net/api/titles/74/assets",
      "metadata_link": "https://movida.bebanjo.net/api/titles/74/metadata",
      "blackouts_link": "https://movida.bebanjo.net/api/titles/74/blackouts",
      "rights_link": "https://movida.bebanjo.net/api/titles/74/rights",
      "denied_rights_link": "https://movida.bebanjo.net/api/titles/74/denied_rights",
      "promoted_content_link": "https://movida.bebanjo.net/api/titles/3175124",
      "content_promotions_link": "https://movida.bebanjo.net/api/titles/74/content_promotions",
      "note_link": "https://movida.bebanjo.net/api/titles/74/note",
      "creator_link": "https://movida.bebanjo.net/api/users/43"
    }
  ]
}

Please note that this behaviour is deprecated, and you shouldn’t rely on it in your integration. In the future, you will get an error when accessing the trailers URL, instead you should use the URL associated to the clips link. For more information you can check the Content promotion resource (see section Get a list of all clips on a title).

Note: With enabled pagination, only 50 titles will be included in each page. But you can override this default by using the per_page parameter. The total-entries attribute will indicate the total number of entries and the links rel="next" and rel="prev" should be used to get the next and the previous pages so you can navigate for all the trailers for a title.

Get a list of all promotions on a clip

Note: Deprecated feature.

If the title is a clip (i.e. title-type takes one of the following values: ad, promo, open, bumper, or trailer), it can also have a link to the title it promotes with a rel of promoted_content.

Please note that this behaviour is deprecated, and you shouldn’t rely on it in your integration. In the future, the link promoted_content will not be present. Instead you should use the URL associated to the content_promotions link.

To return a list of all clips for a title, it would go like this:

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/titles/30391/content_promotions
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/titles/30391/content_promotions

And would yield something like:

<?xml version="1.0" encoding="UTF-8"?>
<content-promotions type="array">
  <content-promotion>
    <id type="integer">4</id>
    <link rel="self" href="https://movida.bebanjo.net/api/content_promotions/4"/>
    <link rel="clip" href="https://movida.bebanjo.net/api/titles/30391"/>
    <link rel="promoted_content" href="https://movida.bebanjo.net/api/titles/18"/>
  </content-promotion>
  <content-promotion>
    <id type="integer">5</id>
    <link rel="self" href="https://movida.bebanjo.net/api/content_promotions/5"/>
    <link rel="clip" href="https://movida.bebanjo.net/api/titles/30391"/>
    <link rel="promoted_content" href="https://movida.bebanjo.net/api/title_groups/23"/>
  </content-promotion>
  <content-promotion>
    <id type="integer">6</id>
    <link rel="self" href="https://movida.bebanjo.net/api/content_promotions/6"/>
    <link rel="clip" href="https://movida.bebanjo.net/api/titles/30391"/>
    <link rel="promoted_content" href="https://movida.bebanjo.net/api/brands/4"/>
  </content-promotion>
</content-promotions>
{
  "entries": [
    {
      "resource_type": "content_promotion",
      "id": 4,
      "self_link": "https://movida.bebanjo.net/api/content_promotions/4",
      "clip_link": "https://movida.bebanjo.net/api/titles/30391",
      "promoted_content_link": "https://movida.bebanjo.net/api/titles/18"
    },
    {
      "resource_type": "content_promotion",
      "id": 5,
      "self_link": "https://movida.bebanjo.net/api/content_promotions/5",
      "clip_link": "https://movida.bebanjo.net/api/titles/30391",
      "promoted_content_link": "https://movida.bebanjo.net/api/title_groups/23"
    },
    {
      "resource_type": "content_promotion",
      "id": 6,
      "self_link": "https://movida.bebanjo.net/api/content_promotions/6",
      "clip_link": "https://movida.bebanjo.net/api/titles/30391",
      "promoted_content_link": "https://movida.bebanjo.net/api/brands/4"
    }
  ]
}

The promotions associated to this clip are referenced in the promoted_content node, identified by the rel attribute. As you can see in the previous example, the URL associated to the promoted_content node can be related to any of the promotable entities (i.e. Title, Title group and Brand).

For more information you can check the Content promotion resource.

Adding new promotions to a clip

To add a promotion, you just need to POST a proper XML/JSON content promotion representation (similar to the ones you get when fetching the promotions for a clip) to the content_promotions URL of a title resource. That URL can be found in a link which rel attribute equals ‘content_promotions’. The only required attribute is the clip.

For example, this POST would add a promotion to a clip (we’ll use curl’s @ option, which reads data to be posted from a file):

$ cat content-promotion.xml
$ cat content-promotion.json
<content-promotion>
  <link rel="promoted_content" href="https://movida.bebanjo.net/api/series/21"/>
</content-promotion>
{
  "promoted_content_link": "https://movida.bebanjo.net/api/series/21"
}
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @content-promotion.xml "https://movida.bebanjo.net/api/titles/10/content_promotions"
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d @content-promotion.json "https://movida.bebanjo.net/api/titles/10/content_promotions"

Mediagenix On-Demand will return the full XML/JSON of the content promotion just created:

<?xml version="1.0" encoding="UTF-8"?>
<content-promotion>
  <id>10</id>
  <link rel="self" href="https://movida.bebanjo.net/api/content_promotions/10"/>
  <link rel="clip" href="https://movida.bebanjo.net/api/titles/10"/>
  <link rel="promoted_content" href="https://movida.bebanjo.net/api/series/21"/>
</content-promotion>
{
  "resource_type": "content_promotion",
  "id": 10,
  "self_link": "https://movida.bebanjo.net/api/content_promotions/10",
  "clip_link": "https://movida.bebanjo.net/api/titles/10",
  "promoted_content_link": "https://movida.bebanjo.net/api/series/21"
}

Valid attributes

You can filter the list of titles returned using the following attributes:

  • per_page: Number of elements returned in each page. The maximum value allowed is 200 and the default is 50.

Get a specific title

This is a good way to recover information about a specific title. We recommend that you use its full URL as the ID that you store in your systems, if you ever need to re-access it. Following the previous example:

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/titles/73
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/titles/73
<?xml version='1.0' encoding='utf-8' ?>
<title>
  <id type="integer">73</id>
  <name>Episode 1</name>
  <episode-number type="integer">1</episode-number>
  <episode-reference-id>1b</episode-reference-id>
  <title>E01, Episode 1</title>
  <external-id>C5147630001</external-id>
  <title-type>episode</title-type>
  <tags>Action,Drama</tags>
  <acl-hash>&lt;view@everyone&gt; &lt;edit@team#141&gt; &lt;contribute@user#38&gt;</acl-hash>
  <link rel="self" href="https://movida.bebanjo.net/api/titles/73"/>
  <link rel="schedule" href="https://movida.bebanjo.net/api/titles/73/schedule"/>
  <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/titles/73/linear_schedulings"/>
  <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/73/availability_windows"/>
  <link rel="series" href="https://movida.bebanjo.net/api/title_groups/41"/>
  <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/73/title_groups"/>
  <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/29"/>
  <link rel="images" href="https://movida.bebanjo.net/api/titles/73/images"/>
  <link rel="assets" href="https://movida.bebanjo.net/api/titles/73/assets"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/titles/73/metadata"/>
  <link rel="clips" href="https://movida.bebanjo.net/api/titles/73/clips"/>
  <link rel="note" href="https://movida.bebanjo.net/api/titles/73/note"/>
  <link rel="creator" href="https://movida.bebanjo.net/api/users/38"/>
</title>
{
  "resource_type": "title",
  "id": 73,
  "name": "Untitled",
  "episode_number": 1,
  "episode_reference_id": "1b",
  "title": "E01, Episode 1",
  "external_id": "C5147630001",
  "title_type": "episode",
  "tags": "Action,Drama",
  "acl_hash": "<view@everyone> <edit@team#141> <contribute@user#38>",
  "self_link": "https://movida.bebanjo.net/api/titles/73",
  "schedule_link": "https://movida.bebanjo.net/api/titles/73/schedule",
  "linear_schedulings_link": "https://movida.bebanjo.net/api/titles/73/linear_schedulings",
  "availability_windows_link": "https://movida.bebanjo.net/api/titles/73/availability_windows",
  "series_link": "https://movida.bebanjo.net/api/title_groups/10113965",
  "title_groups_link": "https://movida.bebanjo.net/api/titles/73/title_groups",
  "licensor_link": "https://movida.bebanjo.net/api/licensors/114",
  "images_link": "https://movida.bebanjo.net/api/titles/73/images",
  "assets_link": "https://movida.bebanjo.net/api/titles/73/assets",
  "metadata_link": "https://movida.bebanjo.net/api/titles/73/metadata",
  "clips_link": "https://movida.bebanjo.net/api/titles/73/clips",
  "note_link": "https://movida.bebanjo.net/api/titles/73/note",
  "creator_link": "https://movida.bebanjo.net/api/users/38"
}

Remember you can use the expand me some nodes trick if you want to, for instance, find out what is the schedule of a particular title.

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/titles/73?expand=schedule,schedulings
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/titles/73?expand=schedule,schedulings

This would expand the rel="schedule" link, and then would also expand the rel="schedulings" link inside the schedule, yielding something like:

<?xml version="1.0" encoding="UTF-8"?>
<title>
  <id type="integer">73</id>
  <name>Episode 1</name>
  <episode-number type="integer">1</episode-number>
  <episode-reference-id>1b</episode-reference-id>
  <title>E01, Episode 1</title>
  <external-id>C5147630001</external-id>
  <title-type>episode</title-type>
  <tags>Action,Drama</tags>
  <acl-hash>&lt;view@everyone&gt; &lt;edit@team#141&gt; &lt;contribute@user#38&gt;</acl-hash>
  <link rel="self" href="https://movida.bebanjo.net/api/titles/73"/>
  <link rel="schedule" href="https://movida.bebanjo.net/api/titles/73/schedule">
    <schedule>
      <link rel="schedulings" href="https://movida.bebanjo.net/api/titles/73/schedule/schedulings">
        <schedulings type="array">
          <scheduling>
            <id type="integer">23817</id>
            <put-up type="datetime">2009-10-01T00:00:00+01:00</put-up>
            <take-down type="datetime">2010-12-22T23:59:59+00:00</take-down>
            <scheduling-type>archive</scheduling-type>
            <rights-status>cleared</rights-status>
            <rights-status-calculating type="boolean">false</rights-status-calculating>
            <workflow-status>completed</workflow-status>
            <tags>Action,Drama</tags>
            <external-id nil="true"/>
            <automatic-asset-selection type="boolean">false</automatic-asset-selection>
            <link rel="self" href="https://movida.bebanjo.net/api/schedulings/23817"/>
            <link rel="title_group" href="https://movida.bebanjo.net/api/title_groups/41"/>
            <link rel="title" href="https://movida.bebanjo.net/api/titles/73"/>
            <link rel="asset" href="https://movida.bebanjo.net/api/assets/3858938"/>
            <link rel="platform" href="https://movida.bebanjo.net/api/platforms/1"/>
            <link rel="conflicts" href="https://movida.bebanjo.net/api/schedulings/23817/conflicts"/>
            <link rel="platform" href="https://movida.bebanjo.net/api/platforms/4770"/>
            <link rel="workflow" href="https://movida.bebanjo.net/api/schedulings/23817/workflow"/>
            <link rel="metadata" href="https://movida.bebanjo.net/api/schedulings/23817/metadata"/>
          </scheduling>
        </schedulings>
      </link>
      <link rel="title" href="https://movida.bebanjo.net/api/titles/73"/>
    </schedule>
  </link>
  <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/titles/73/linear_schedulings"/>
  <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/73/availability_windows"/>
  <link rel="series" href="https://movida.bebanjo.net/api/title_groups/10113965"/>
  <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/73/title_groups"/>
  <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/114"/>
  <link rel="images" href="https://movida.bebanjo.net/api/titles/73/images"/>
  <link rel="assets" href="https://movida.bebanjo.net/api/titles/73/assets"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/titles/73/metadata"/>
  <link rel="clips" href="https://movida.bebanjo.net/api/titles/73/clips"/>
  <link rel="note" href="https://movida.bebanjo.net/api/titles/73/note"/>
  <link rel="creator" href="https://movida.bebanjo.net/api/users/38"/>
</title>
{
  "resource_type": "title",
  "id": 73,
  "name": "Episode 1",
  "episode_number": 1,
  "episode_reference_id": "1b",
  "title": "E01, Episode 1",
  "external_id": "C5147630001",
  "title_type": "episode",
  "tags": "Action,Drama",
  "acl_hash": "<view@everyone> <edit@team#141> <contribute@user#38>",
  "self_link": "https://movida.bebanjo.net/api/titles/73",
  "schedule_link": "https://movida.bebanjo.net/api/titles/73/schedule",
  "schedule": {
    "resource_type": "schedule",
    "schedulings_link": "https://movida.bebanjo.net/api/titles/73/schedule/schedulings",
    "schedulings": {
      "entries": [
        {
          "resource_type": "scheduling",
          "id": 23817,
          "put_up": "2009-10-01T00:00:00+01:00",
          "take_down": "2010-12-22T23:59:59+00:00",
          "scheduling_type": "archive",
          "rights_status": "cleared",
          "rights_status_calculating": false,
          "workflow_status": "completed",
          "tags": "Action,Drama",
          "external_id": null,
          "automatic_asset_selection": false,
          "self_link": "https://movida.bebanjo.net/api/schedulings/23817",
          "title_group_link": "https://movida.bebanjo.net/api/title_groups/10113965",
          "title_link": "https://movida.bebanjo.net/api/titles/73",
          "asset_link": "https://movida.bebanjo.net/api/assets/3858938",
          "conflicts_link": "https://movida.bebanjo.net/api/schedulings/23817/conflicts",
          "platform_link": "https://movida.bebanjo.net/api/platforms/4770",
          "workflow_link": "https://movida.bebanjo.net/api/schedulings/23817/workflow",
          "metadata_link": "https://movida.bebanjo.net/api/schedulings/23817/metadata"
        }
      ]
    },
    "title_link": "https://movida.bebanjo.net/api/titles/73"
  },
  "linear_schedulings_link": "https://movida.bebanjo.net/api/titles/73/linear_schedulings",
  "availability_windows_link": "https://movida.bebanjo.net/api/titles/73/availability_windows",
  "series_link": "https://movida.bebanjo.net/api/title_groups/10113965",
  "title_groups_link": "https://movida.bebanjo.net/api/titles/73/title_groups",
  "licensor_link": "https://movida.bebanjo.net/api/licensors/114",
  "images_link": "https://movida.bebanjo.net/api/titles/73/images",
  "assets_link": "https://movida.bebanjo.net/api/titles/73/assets",
  "metadata_link": "https://movida.bebanjo.net/api/titles/73/metadata",
  "clips_link": "https://movida.bebanjo.net/api/titles/73/clips",
  "note_link": "https://movida.bebanjo.net/api/titles/73/note",
  "creator_link": "https://movida.bebanjo.net/api/users/38"
}

Creating titles

For creating titles, you just need to POST a proper XML/JSON title representation (similar to the ones you get when fetching a title) to the proper URL. That URL can be found in a link whose rel is titles, like the one found in the API root (for creating titles which don’t belong to any series) or in any series (for creating titles belonging to that series). The only required field is the name, the rest are optional.

Creating a standalone title AKA feature

For example, this POST would create a film (we’ll use curl’s @ option, which reads data to be posted from a file):

$ cat title.xml
$ cat title.json
<title>
  <name>13 Assassins</name>
  <external-id>123456</external-id>
  <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/4"/>
  <title-type>feature</title-type>
  <tags>Action,Drama</tags>
</title>
{
  "name": "13 Assassins",
  "external_id": "123456",
  "licensor_link": "https://movida.bebanjo.net/api/licensors/4",
  "title_type": "feature",
  "tags": "Action,Drama"
}

Note: The licensor URL must be of one licensor that already exists in the system, otherwise it will default to “No Licensor”, since it is optional. See how to create licensors in the licensor page.

$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @title.xml "https://movida.bebanjo.net/api/titles"
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d @title.json "https://movida.bebanjo.net/api/titles"

Mediagenix On-Demand will return the full XML/JSON of the title just created:

<?xml version="1.0" encoding="UTF-8"?>
<title>
  <id type="integer">4</id>
  <name>13 Assassins</name>
  <title>13 Assassins</title>
  <external-id>123456</external-id>
  <title-type>feature</title-type>
  <tags>Action,Drama</tags>
  <acl-hash nil="true"/>
  <link rel="self" href="https://movida.bebanjo.net/api/titles/4"/>
  <link rel="schedule" href="https://movida.bebanjo.net/api/titles/4/schedule"/>
  <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/titles/4/linear_schedulings"/>
  <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/4/availability_windows"/>
  <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/4/title_groups"/>
  <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/4"/>
  <link rel="images" href="https://movida.bebanjo.net/api/titles/4/images"/>
  <link rel="assets" href="https://movida.bebanjo.net/api/titles/4/assets"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/titles/4/metadata"/>
  <link rel="blackouts" href="https://movida.bebanjo.net/api/titles/4/blackouts"/>
  <link rel="rights" href="https://movida.bebanjo.net/api/titles/4/rights"/>
  <link rel="denied_rights" href="https://movida.bebanjo.net/api/titles/4/denied_rights"/>
  <link rel="rules" href="https://movida.bebanjo.net/api/titles/4/rules"/>
  <link rel="clips" href="https://movida.bebanjo.net/api/titles/4/clips"/>
  <link rel="note" href="https://movida.bebanjo.net/api/titles/4/note"/>
  <link rel="creator" href="https://movida.bebanjo.net/api/users/38"/>
</title>
{
  "resource_type": "title",
  "id": 4,
  "name": "13 Assassins",
  "title": "13 Assassins",
  "external_id": "123456",
  "title_type": "feature",
  "tags": "Action,Drama",
  "acl_hash": null,
  "self_link": "https://movida.bebanjo.net/api/titles/4",
  "schedule_link": "https://movida.bebanjo.net/api/titles/4/schedule",
  "linear_schedulings_link": "https://movida.bebanjo.net/api/titles/4/linear_schedulings",
  "availability_windows_link": "https://movida.bebanjo.net/api/titles/4/availability_windows",
  "title_groups_link": "https://movida.bebanjo.net/api/titles/4/title_groups",
  "licensor_link": "https://movida.bebanjo.net/api/licensors/4",
  "images_link": "https://movida.bebanjo.net/api/titles/4/images",
  "assets_link": "https://movida.bebanjo.net/api/titles/4/assets",
  "metadata_link": "https://movida.bebanjo.net/api/titles/4/metadata",
  "blackouts_link": "https://movida.bebanjo.net/api/titles/4/blackouts",
  "rights_link": "https://movida.bebanjo.net/api/titles/4/rights",
  "denied_rights_link": "https://movida.bebanjo.net/api/titles/4/denied_rights",
  "rules_link": "https://movida.bebanjo.net/api/titles/4/rules",
  "clips_link": "https://movida.bebanjo.net/api/titles/4/clips",
  "note_link": "https://movida.bebanjo.net/api/titles/4/note",
  "creator_link": "https://movida.bebanjo.net/api/users/38"
}

Creating a trailer

For example, this POST would create a trailer for the title created above (we’ll again use $ curl’s @ option, which reads data to be posted from a file):

$ cat trailer.xml
$ cat trailer.json
<title>
  <name>13 Assassins (Trailer)</name>
  <external-id>TR123456</external-id>
  <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/4"/>
  <title-type>trailer</title-type>
  <tags>Action,Drama</tags>
  <link rel="promoted_content" href="https://movida.bebanjo.net/api/titles/4"/>
</title>
{
  "name": "13 Assassins (Trailer)",
  "external_id": "TR123456",
  "licensor_link": "https://movida.bebanjo.net/api/licensors/4",
  "title_type": "trailer",
  "tags": "Action,Drama",
  "promoted_content_link": "https://movida.bebanjo.net/api/titles/4"
}

Note: The promoted_content URL must be of one title that already exists in the system.

Note: The licensor URL must be of one licensor that already exists in the system, otherwise it will default to “No Licensor”, since it is optional. See how to create licensors in the licensor page.

$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @trailer.xml "https://movida.bebanjo.net/api/titles"
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d @trailer.json "https://movida.bebanjo.net/api/titles"

Mediagenix On-Demand will return the full XML/JSON of the trailer just created:

<?xml version="1.0" encoding="UTF-8"?>
<title>
  <id type="integer">5</id>
  <name>13 Assassins (Trailer)</name>
  <title>13 Assassins (Trailer)</title>
  <external-id>TR1234567</external-id>
  <title-type>trailer</title-type>
  <tags>Action,Drama</tags>
  <acl-hash nil="true"/>
  <link rel="self" href="https://movida.bebanjo.net/api/titles/5"/>
  <link rel="schedule" href="https://movida.bebanjo.net/api/titles/5/schedule"/>
  <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/5/availability_windows"/>
  <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/5/title_groups"/>
  <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/4"/>
  <link rel="images" href="https://movida.bebanjo.net/api/titles/5/images"/>
  <link rel="assets" href="https://movida.bebanjo.net/api/titles/5/assets"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/titles/5/metadata"/>
  <link rel="blackouts" href="https://movida.bebanjo.net/api/titles/5/blackouts"/>
  <link rel="rights" href="https://movida.bebanjo.net/api/titles/5/rights"/>
  <link rel="denied_rights" href="https://movida.bebanjo.net/api/titles/5/denied_rights"/>
  <link rel="promoted_content" href="https://movida.bebanjo.net/api/titles/4"/>
  <link rel="content_promotions" href="https://movida.bebanjo.net/api/titles/5/content_promotions"/>
  <link rel="note" href="https://movida.bebanjo.net/api/titles/5/note"/>
  <link rel="creator" href="https://movida.bebanjo.net/api/users/38"/>
</title>
{
  "resource_type": "title",
  "id": 5,
  "name": "13 Assassins (Trailer)",
  "title": "13 Assassins (Trailer)",
  "external_id": "TR123456",
  "title_type": "trailer",
  "tags": "Action,Drama",
  "acl_hash": null,
  "self_link": "https://movida.bebanjo.net/api/titles/5",
  "schedule_link": "https://movida.bebanjo.net/api/titles/5/schedule",
  "availability_windows_link": "https://movida.bebanjo.net/api/titles/5/availability_windows",
  "title_groups_link": "https://movida.bebanjo.net/api/titles/5/title_groups",
  "licensor_link": "https://movida.bebanjo.net/api/licensors/4",
  "images_link": "https://movida.bebanjo.net/api/titles/5/images",
  "assets_link": "https://movida.bebanjo.net/api/titles/5/assets",
  "metadata_link": "https://movida.bebanjo.net/api/titles/5/metadata",
  "blackouts_link": "https://movida.bebanjo.net/api/titles/5/blackouts",
  "rights_link": "https://movida.bebanjo.net/api/titles/5/rights",
  "denied_rights_link": "https://movida.bebanjo.net/api/titles/5/denied_rights",
  "promoted_content_link": "https://movida.bebanjo.net/api/titles/4",
  "content_promotions_link": "https://movida.bebanjo.net/api/titles/5/content_promotions",
  "note_link": "https://movida.bebanjo.net/api/titles/5/note",
  "creator_link": "https://movida.bebanjo.net/api/users/38"
}

Creating an episode to an existing series

To create an episode of a series, you only need to POST the title XML/JSON to the URL in the link rel=titles of the series you want to add the episode to.

Assuming the URL for the episodes of a series is https://movida.bebanjo.net/api/title_groups/1/titles and the following XML/JSON:

$ cat episode.xml
$ cat episode.json
<title>
  <name>Episode 1</name>
  <external-id>123456</external-id>
  <episode-number>1</episode-number>
  <episode-reference-id>1b</episode-reference-id>
  <title-type>episode</title-type>
  <tags>Action,Drama</tags>
  <acl-hash><view@everyone> <edit@team#141></acl-hash>
</title>
{
  "name": "Episode 1",
  "external_id": "123456",
  "episode_number": 1,
  "episode_reference_id": "1b",
  "title_type": "episode",
  "tags": "Action,Drama"
  "acl_hash": "<view@everyone> <edit@team#141>",
}

The following command would create it as part of the series’ episodes:

$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @episode.xml "https://movida.bebanjo.net/api/title_groups/1/titles"
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d @episode.json "https://movida.bebanjo.net/api/title_groups/1/titles"

This would return the XML/JSON of the new episode, note how it references the series we’ve just associated it to:

<?xml version="1.0" encoding="UTF-8"?>
<title>
  <id type="integer">30392</id>
  <name>Episode 1</name>
  <name-en>Episode 1</name-en>
  <episode-number type="integer">1</episode-number>
  <episode-reference-id>1b</episode-reference-id>
  <title>E1b: Episode 1</title>
  <external-id>123456</external-id>
  <title-type>episode</title-type>
  <tags>Action,Drama</tags>
  <acl-hash>&lt;view@everyone&gt; &lt;edit@team#141&gt;</acl-hash>
  <link rel="self" href="https://movida.bebanjo.net/api/titles/30392"/>
  <link rel="schedule" href="https://movida.bebanjo.net/api/titles/30392/schedule"/>
  <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/titles/30392/linear_schedulings"/>
  <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/30392/availability_windows"/>
  <link rel="series" href="https://movida.bebanjo.net/api/title_groups/1"/>
  <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/30392/title_groups"/>
  <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/114"/>
  <link rel="images" href="https://movida.bebanjo.net/api/titles/30392/images"/>
  <link rel="assets" href="https://movida.bebanjo.net/api/titles/30392/assets"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/titles/30392/metadata"/>
  <link rel="clips" href="https://movida.bebanjo.net/api/titles/30392/clips"/>
  <link rel="note" href="https://movida.bebanjo.net/api/titles/30392/note"/>
  <link rel="creator" href="https://movida.bebanjo.net/api/users/38"/>
</title>
{
  "resource_type": "title",
  "id": 30392,
  "name": "Episode 1",
  "episode_number": 1,
  "episode_reference_id": "1b",
  "title": "E1b: Episode 1",
  "external_id": "123456789",
  "title_type": "episode",
  "tags": "Action,Drama",
  "acl_hash": "<view@everyone> <edit@team#141>",
  "self_link": "https://movida.bebanjo.net/api/titles/30392",
  "schedule_link": "https://movida.bebanjo.net/api/titles/30392/schedule",
  "linear_schedulings_link": "https://movida.bebanjo.net/api/titles/30392/linear_schedulings",
  "availability_windows_link": "https://movida.bebanjo.net/api/titles/30392/availability_windows",
  "series_link": "https://movida.bebanjo.net/api/title_groups/1",
  "title_groups_link": "https://movida.bebanjo.net/api/titles/30392/title_groups",
  "licensor_link": "https://movida.bebanjo.net/api/licensors/114",
  "images_link": "https://movida.bebanjo.net/api/titles/30392/images",
  "assets_link": "https://movida.bebanjo.net/api/titles/30392/assets",
  "metadata_link": "https://movida.bebanjo.net/api/titles/30392/metadata",
  "clips_link": "https://movida.bebanjo.net/api/titles/30392/clips",
  "note_link": "https://movida.bebanjo.net/api/titles/30392/note",
  "creator_link": "https://movida.bebanjo.net/api/users/38"
}

Updating titles

You can update titles issuing a PUT request to the URL of a given title, as the following example illustrates. This example only updates the title’s name, but also the external-id, the licensor, the promoted_content and the episode number can be updated.

Note: The external ID can be updated only if it’s blank, if it already has a value it can’t be changed.

$ cat title.xml
$ cat title.json
<title>
  <name>13 Assassins (English version)</name>
</title>
{
  "name": "13 Assassins (English version)"
}

Now we send the XML/JSON as the body of a PUT request to the title’s URL:

$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X PUT -d @title.xml "https://movida.bebanjo.net/api/titles/4"
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d @title.json "https://movida.bebanjo.net/api/titles/4"

The PUT request would return the updated XML/JSON of the title:

<title>
  <id type="integer">4</id>
  <name>13 Assassins (English version)</name>
  <title>13 Assassins (English version)</title>
  <external-id>C5144140351</external-id>
  <title-type>feature</title-type>
  <tags>Action,Drama</tags>
  <acl-hash nil="true"/>
  <link rel="self" href="https://movida.bebanjo.net/api/titles/4"/>
  <link rel="schedule" href="https://movida.bebanjo.net/api/titles/4/schedule"/>
  <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/titles/4/linear_schedulings"/>
  <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/4/availability_windows"/>
  <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/4/title_groups"/>
  <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/4"/>
  <link rel="images" href="https://movida.bebanjo.net/api/titles/4/images"/>
  <link rel="assets" href="https://movida.bebanjo.net/api/titles/4/assets"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/titles/4/metadata"/>
  <link rel="blackouts" href="https://movida.bebanjo.net/api/titles/4/blackouts"/>
  <link rel="rights" href="https://movida.bebanjo.net/api/titles/4/rights"/>
  <link rel="denied_rights" href="https://movida.bebanjo.net/api/titles/4/denied_rights"/>
  <link rel="rules" href="https://movida.bebanjo.net/api/titles/4/rules"/>
  <link rel="content_promotions" href="https://movida.bebanjo.net/api/titles/4/content_promotions"/>
  <link rel="note" href="https://movida.bebanjo.net/api/titles/4/note"/>
  <link rel="creator" href="https://movida.bebanjo.net/api/users/38"/>
</title>
{
  "resource_type": "title",
  "id": 4,
  "name": "13 Assassins (English version)",
  "title": "13 Assassins (English version)",
  "external_id": "C5144140351",
  "title_type": "feature",
  "tags": "Action,Drama",
  "acl_hash": null,
  "self_link": "https://movida.bebanjo.net/api/titles/4",
  "schedule_link": "https://movida.bebanjo.net/api/titles/4/schedule",
  "linear_schedulings_link": "https://movida.bebanjo.net/api/titles/4/linear_schedulings",
  "availability_windows_link": "https://movida.bebanjo.net/api/titles/4/availability_windows",
  "title_groups_link": "https://movida.bebanjo.net/api/titles/4/title_groups",
  "licensor_link": "https://movida.bebanjo.net/api/licensors/4",
  "images_link": "https://movida.bebanjo.net/api/titles/4/images",
  "assets_link": "https://movida.bebanjo.net/api/titles/4/assets",
  "metadata_link": "https://movida.bebanjo.net/api/titles/4/metadata",
  "blackouts_link": "https://movida.bebanjo.net/api/titles/4/blackouts",
  "rights_link": "https://movida.bebanjo.net/api/titles/4/rights",
  "denied_rights_link": "https://movida.bebanjo.net/api/titles/4/denied_rights",
  "rules_link": "https://movida.bebanjo.net/api/titles/4/rules",
  "content_promotions_link": "https://movida.bebanjo.net/api/titles/4/content_promotions",
  "note_link": "https://movida.bebanjo.net/api/titles/4/note",
  "creator_link": "https://movida.bebanjo.net/api/users/38"
}

Deleting titles

The following example shows how to destroy a particular title. Only a DELETE HTTP request to its URL is required:

$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X DELETE "https://movida.bebanjo.net/api/titles/4"
$ curl --digest -u robot_user:password -H "Accept: application/json" -X DELETE "https://movida.bebanjo.net/api/titles/4"

The DELETE request doesn’t return anything, as that title is now gone.

Deleting a title causes some of its related resources to be removed:

  • Assets
  • Availability windows
  • Linear schedulings
  • Schedulings