We use cookies (just for analytics) on this website. If you continue we will assume you are happy with it. ok

BeBanjo

Back to index

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>
  <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>

Get a list of all platforms

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

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

And:

<?xml version='1.0' encoding='utf-8' ?>
<platforms type='array'>
  <platform>
    <name>BeBanjo Movies</name>
    <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>
    <name>YouTube</name>
    <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>

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 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>
    <name>BeBanjo Movies</name>
    <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>

Last updated October 10th, 2017.