Skip to content

Developers

How can we help you?

← Go back

Platform

Note: This resource links can be expanded using the expand option.

A platform is something like YouTube. Think of it as a place where videos can be published to. Sometimes these platforms are governed by a set of requirements (like under what business models it operates, or for what devices), but it is too early to talk about that.

Note: The metadata link is a deprecated feature, it is no longer supported and it will be removed soon.

In Movida land, a platform looks like this:

<?xml version='1.0' encoding='utf-8' ?>
<platform>
  <name>BeBanjo Movies</name>
  <timezone>London</timezone>
  <external-id>C5080530001</external-id>
  <link rel="self" href="https://movida.bebanjo.net/api/platforms/1"/>
  <link rel="schedule" href="https://movida.bebanjo.net/api/platforms/1/schedule" />
  <link rel="draft_schedules" href="https://movida.bebanjo.net/api/platforms/1/draft_schedules"/>
  <link rel="requirements" href="https://movida.bebanjo.net/api/platforms/1/requirements"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/platforms/1/metadata"/>
  <link rel="outlet" href="https://movida.bebanjo.nett/api/outlets/2"/>
</platform>
{
  "resource_type": "platform",
  "id": 1,
  "name": "BeBanjo Movies",
  "timezone": "London",
  "external_id": "C5080530001",
  "self_link": "https://movida.bebanjo.net/api/platforms/1",
  "schedule_link": "https://movida.bebanjo.net/api/platforms/1/schedule",
  "draft_schedules_link": "https://movida.bebanjo.net/api/platforms/1/draft_schedules",
  "requirements_link": "https://movida.bebanjo.net/api/platforms/1/requirements",
  "metadata_link": "https://movida.bebanjo.net/api/platforms/1/metadata",
  "outlet_link": "https://movida.bebanjo.net/api/outlets/2"
}

Get a list of all platforms

As you would expect, just do a GET /api/platforms:

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/platforms?pagination=true&per_page=10&page=1
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/platforms?pagination=true&per_page=10&page=1

And:

<?xml version='1.0' encoding='utf-8' ?>
<platforms type='array'>
  <total-entries>328</total-entries>
  <link rel="next" href="https://movida.bebanjo.net/api/platforms?page=2&amp;pagination=true&amp;per_page=10"/>
  <platform>
    <id type="integer">1</id>
    <name>BeBanjo Movies</name>
    <timezone>London</timezone>
    <external-id>C5080530001</external-id>
    <link rel="self" href="https://movida.bebanjo.net/api/platforms/1"/>
    <link rel="schedule" href="https://movida.bebanjo.net/api/platforms/1/schedule"/>
    <link rel="draft_schedules" href="https://movida.bebanjo.net/api/platforms/1/draft_schedules"/>
    <link rel="requirements" href="https://movida.bebanjo.net/api/platforms/1/requirements"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/platforms/1/metadata"/>
    <link rel="outlet" href="https://movida.bebanjo.nett/api/outlets/2"/>
  </platform>
  <platform>
    <id type="integer">2</id>
    <name>YouTube</name>
    <timezone>London</timezone>
    <external-id>C5080530002</external-id>
    <link rel="self" href="https://movida.bebanjo.net/api/platforms/2"/>
    <link rel="schedule" href="https://movida.bebanjo.net/api/platforms/2/schedule"/>
    <link rel="draft_schedules" href="https://movida.bebanjo.net/api/platforms/2/draft_schedules"/>
    <link rel="requirements" href="https://movida.bebanjo.net/api/platforms/2/requirements"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/platforms/2/metadata"/>
    <link rel="outlet" href="https://movida.bebanjo.nett/api/outlets/3"/>
  </platform>
  <!-- ... -->
</platforms>
{
  "total_entries": 328,
  "next_link": "https://movida.bebanjo.net/api/platforms?page=2&pagination=true&per_page=10",
  "entries": [
    {
      "resource_type": "platform",
      "id": 1,
      "name": "BeBanjo Movies",
      "timezone": "London",
      "external_id": "C5080530001",
      "self_link": "https://movida.bebanjo.net/api/platforms/1",
      "schedule_link": "https://movida.bebanjo.net/api/platforms/1/schedule",
      "draft_schedules_link": "https://movida.bebanjo.net/api/platforms/1/draft_schedules",
      "requirements_link": "https://movida.bebanjo.net/api/platforms/1/requirements",
      "metadata_link": "https://movida.bebanjo.net/api/platforms/1/metadata"
      "outlet_link": "https://movida.bebanjo.net/api/outlets/2"
    },
    {
      "resource_type": "platform",
      "id": 2,
      "name": "YouTube",
      "timezone": "London",
      "external_id": null,
      "self_link": "https://movida.bebanjo.net/api/platforms/2",
      "schedule_link": "https://movida.bebanjo.net/api/platforms/2/schedule",
      "draft_schedules_link": "https://movida.bebanjo.net/api/platforms/2/draft_schedules",
      "requirements_link": "https://movida.bebanjo.net/api/platforms/2/requirements",
      "metadata_link": "https://movida.bebanjo.net/api/platforms/2/metadata"
    },
    // ...
  ]
}

You can then follow the links to access their respective schedules.

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

Valid attributes

  • external_id: You can filter the list of platforms by passing in an external_id. Because Movida was designed to integrate with external content management system, it has an attribute called external_id for every platform. This attribute can be used to store the ID of that specific item in an external system.

  • pagination: If you want to enable pagination you need to provide a pagination parameter with a value of true. Note that by default, pagination is not enabled for this endpoint.

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

  • page: The number of the page you want to get. Only effective with pagination enabled.

Get a platform by external_id

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

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

Which would filter by the passed external_id like:

<?xml version="1.0" encoding="UTF-8"?>
<platforms type="array">
  <platform>
    <id type="integer">1</id>
    <name>BeBanjo Movies</name>
    <timezone>London</timezone>
    <external-id>C5080530001</external-id>
    <link rel="self" href="https://movida.bebanjo.net/api/platforms/1"/>
    <link rel="schedule" href="https://movida.bebanjo.net/api/platforms/1/schedule" />
    <link rel="draft_schedules" href="https://movida.bebanjo.net/api/platforms/1/draft_schedules"/>
    <link rel="requirements" href="https://movida.bebanjo.net/api/platforms/1/requirements"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/platforms/1/metadata"/>
    <link rel="outlet" href="https://movida.bebanjo.nett/api/outlets/2"/>
  </platform>
</platforms>
{
  "entries": [
    {
      "resource_type": "platform",
      "id": 1,
      "name": "BeBanjo Movies",
      "timezone": "London",
      "external_id": "C5080530001",
      "self_link": "https://movida.bebanjo.net/api/platforms/1",
      "schedule_link": "https://movida.bebanjo.net/api/platforms/1/schedule",
      "draft_schedules_link": "https://movida.bebanjo.net/api/platforms/1/draft_schedules",
      "requirements_link": "https://movida.bebanjo.net/api/platforms/1/requirements",
      "metadata_link": "https://movida.bebanjo.net/api/platforms/1/metadata",
      "outlet_link": "https://movida.bebanjo.net/api/outlets/2"
    }
  ]
}