Skip to content

Developers

How can we help you?

← Go back

Availability window

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

An Availability Window, a.k.a Right Window, is the period where the current company has granted rights to schedule a title in one or several Platforms. Availability Windows are the result of applying a Right to each of its affected titles.

This is how an Availability Window looks through the API:

<?xml version="1.0" encoding="UTF-8"?>
<availability-window>
  <id type="integer">7381</id>
  <from type="datetime">2008-10-01T00:00:00+01:00</from>
  <to type="datetime">2013-09-30T23:59:59+01:00</to>
  <link rel="self" href="https://movida.bebanjo.net/api/availability_windows/7381"/>
  <link rel="title" href="https://movida.bebanjo.net/api/titles/10"/>
  <link rel="platforms" href="https://movida.bebanjo.net/api/availability_windows/7381/platforms"/>
  <link rel="right" href="https://movida.bebanjo.net/api/rights/4561"/>
</availability-window>
{
  "resource_type": "availability_window",
  "id": 7381,
  "from": "2008-10-01T00:00:00+01:00",
  "to": "2013-09-30T23:59:59+01:00",
  "self_link": "https://movida.bebanjo.net/api/availability_windows/7381",
  "title_link": "https://movida.bebanjo.net/api/titles/10",
  "platforms_link": "https://movida.bebanjo.net/api/availability_windows/7381/platforms",
  "right_link": "https://movida.bebanjo.net/api/right/4561"
}

Get the list of availability windows of a title

Availability windows are accessed via a title. Refer to the title page to find out how to access a title. Inside a title, one of the related link nodes is the availability windows node, identified by the rel attribute. Like here:

<?xml version="1.0" encoding="UTF-8"?>
<title>
  <!-- ... -->
  <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/10/availability_windows"/>
  <!-- ... -->
</title>
{
  "resource_type": "title",
  // ...
  "availability_windows_link": "https://movida.bebanjo.net/api/titles/10/availability_windows",
  // ...
}

If we follow that link, we’d fetch the list of all availability windows for that title.

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/titles/10/availability_windows
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/titles/10/availability_windows
<availability-windows type="array">
  <availability-window>
    <id type="integer">7381</id>
    <from type="datetime">2008-10-01T00:00:00+01:00</from>
    <to type="datetime">2013-09-30T23:59:59+01:00</to>
    <link rel="self" href="https://movida.bebanjo.net/api/availability_windows/7381"/>
    <link rel="title" href="https://movida.bebanjo.net/api/titles/10"/>
    <link rel="platforms" href="https://movida.bebanjo.net/api/availability_windows/7381/platforms"/>
    <link rel="right" href="https://movida.bebanjo.net/api/rights/4561"/>
  </availability-window>
  <availability-window>
    <id type="integer">7382</id>
    <from type="datetime">2010-11-01T00:00:00+01:00</from>
    <to type="datetime">2011-11-30T23:59:59+01:00</to>
    <link rel="self" href="https://movida.bebanjo.net/api/availability_windows/7382"/>
    <link rel="title" href="https://movida.bebanjo.net/api/titles/10"/>
    <link rel="platforms" href="https://movida.bebanjo.net/api/availability_windows/7382/platforms"/>
    <link rel="right" href="https://movida.bebanjo.net/api/rights/4561"/>
  </availability-window>
</availability-windows>
{
  "entries": [
    {
      "resource_type": "availability_window",
      "id": 7381,
      "from": "2008-10-01T00:00:00+01:00",
      "to": "2013-09-30T23:59:59+01:00",
      "self_link": "https://movida.bebanjo.net/api/availability_windows/7381",
      "title_link": "https://movida.bebanjo.net/api/titles/10",
      "platforms_link": "https://movida.bebanjo.net/api/availability_windows/7381/platforms",
      "right_link": "https://movida.bebanjo.net/api/right/4561"
    },
    {
      "resource_type": "availability_window",
      "id": 7382,
      "from": "2010-11-01T00:00:00+01:00",
      "to": "2011-11-30T23:59:59+01:00",
      "self_link": "https://movida.bebanjo.net/api/availability_windows/7382",
      "title_link": "https://movida.bebanjo.net/api/titles/10",
      "platforms_link": "https://movida.bebanjo.net/api/availability_windows/7382/platforms",
      "right_link": "https://movida.bebanjo.net/api/right/4561"
    }
  ]
}

Get a specific availability window

We can also fetch a specific window if we have its URL:

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/availability_windows/7381
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/availability_windows/7381
<availability-window>
  <id type="integer">7381</id>
  <from type="datetime">2008-10-01T00:00:00+01:00</from>
  <to type="datetime">2013-09-30T23:59:59+01:00</to>
  <link rel="self" href="https://movida.bebanjo.net/api/availability_windows/7381"/>
  <link rel="title" href="https://movida.bebanjo.net/api/titles/10"/>
  <link rel="platforms" href="https://movida.bebanjo.net/api/availability_windows/7381/platforms"/>
  <link rel="right" href="https://movida.bebanjo.net/api/rights/4561"/>
</availability-window>
{
  "resource_type": "availability_window",
  "id": 7381,
  "from": "2008-10-01T00:00:00+01:00",
  "to": "2013-09-30T23:59:59+01:00",
  "self_link": "https://movida.bebanjo.net/api/availability_windows/7381",
  "title_link": "https://movida.bebanjo.net/api/titles/10",
  "platforms_link": "https://movida.bebanjo.net/api/availability_windows/7381/platforms",
  "right_link": "https://movida.bebanjo.net/api/right/4561"
}