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

Denied right

Movida’s denied rights represent a set of conditions on a content for which rights are not available. They apply on a feature, a clip or a series.

This is how a denied right looks like:

<denied-right>
  <id type="integer">4</id>
  <external-id>C5080530001</external-id>
  <name>DeniedRight #1</name>
  <enabled type="boolean">true</enabled>
  <link rel="self" href="https://movida.bebanjo.net/denied_rights/4"/>
  <link rel="licensable" href="https://movida.bebanjo.net/title_groups/1"/>
  <link rel="specific_platforms" href="https://movida.bebanjo.net/denied_rights/4/specific_platforms"/>
</denied-right>

Valid attributes

  • id (required): Movida internal identifier of the denied right.
  • external-id (optional): the identifier of the denied right in the external system. If provided, it has to be unique in the scope of the company.
  • name (optional): name of the denied right, or a denial reason, meaningful to the user. When no value is provided, Movida will store a generic name based on number of denied rights in the licensable, such as DeniedRight #1.

Get a list of all denied rights in the current account

Denied rights are linked from the root of the API, through the link identified with the rel="denied_rights" attribute:

<?xml version="1.0" encoding="UTF-8"?>
<movida>
  <!-- ... -->
  <link rel="denied_rights" href="https://movida.bebanjo.net/api/denied_rights">
</movida>

Following that link, we can fetch the list of denied rights in the current account.

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/denied_rights
<?xml version="1.0" encoding="UTF-8"?>
<denied-rights>
  <total-entries>113</total-entries>
  <link rel="next" href="https://movida.bebanjo.net/api/denied_rights?page=1"/>
  <link rel="prev" href="https://movida.bebanjo.net/api/denied_rights?page=3"/>
  <denied-right>
    <id type="integer">5</id>
    <external-id nil="true"/>
    <name>DeniedRight #1</name>
    <!-- ... -->
  </denied-right>
  <denied-right>
    <id type="integer">6</id>
    <external-id nil="true"/>
    <name>DeniedRight #2</name>
    <!-- ... -->
  </denied-right>
  <!-- ... -->
</denied-rights>

Note: This is a paginated resource. By default, only 50 denied rights will be included in each page but you can override this default by using the per_page parameter described in the next section. 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.

Valid attributes

You can filter the list of denied rights returned using the following parameters:

  • external_id: It will return only the Denied right with the exact given external_id (if any).

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

  • page: Number of the page you want to be returned.

Get a list of denied rights from a feature or series

Given an existing feature, for example:

  <title>
    <id type="integer">12</id>
    <name>Silicon Computers</name>
    <title>Silicon Computers</title>
    <external-id nil="true"/>
    <title-type>feature</title-type>
    <tags></tags>
    <link rel="self" href="https://movida.bebanjo.net/api/titles/12"/>
    <link rel="schedule" href="https://movida.bebanjo.net/api/titles/12/schedule"/>
    <link rel="availability_windows" href="https://movida.bebanjo.net/api/titles/12/availability_windows"/>
    <link rel="title_groups" href="https://movida.bebanjo.net/api/titles/12/title_groups"/>
    <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/114"/>
    <link rel="images" href="https://movida.bebanjo.net/api/titles/12/images"/>
    <link rel="assets" href="https://movida.bebanjo.net/api/titles/12/assets"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/titles/12/metadata"/>
    <link rel="blackouts" href="https://movida.bebanjo.net/api/titles/12/blackouts"/>
    <link rel="rights" href="https://movida.bebanjo.net/api/titles/12/rights"/>
    <link rel="denied_rights" href="https://movida.bebanjo.net/api/titles/12/denied_rights"/>
    <link rel="trailers" href="https://movida.bebanjo.net/api/titles/12/trailers"/>
  </title>

All the denied rights of that feature can be obtained by following the link rel="denied_rights":

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/titles/12/denied_rights
<denied-rights type="array">
  <denied-right>
    <id type="integer">7</id>
    <external-id>C5080530001</external-id>
    <name>DeniedRight #1</name>
    <enabled type="boolean">true</enabled>
    <link rel="self" href="https://movida.bebanjo.net/api/denied_rights/7"/>
    <link rel="licensable" href="https://movida.bebanjo.net/api/titles/12"/>
    <link rel="specific_platforms" href="https://movida.bebanjo.net/denied_rights/7/specific_platforms"/>
  </denied-right>
  <denied-right>
    <id type="integer">8</id>
    <external-id>C5080530002</external-id>
    <name>DeniedRight #2</name>
    <enabled type="boolean">true</enabled>
    <link rel="self" href="https://movida.bebanjo.net/denied_rights/8"/>
    <link rel="licensable" href="https://movida.bebanjo.net/api/titles/12"/>
    <link rel="specific_platforms" href="https://movida.bebanjo.net/denied_rights/8/specific_platforms"/>
  </denied-right>
</denied-rights>

Get a single denied right

Just do a GET to the URI of the denied right (the one in the attribute rel="self"):

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/denied_rights/6
<denied-right>
  <id type="integer">6</id>
  <external-id>C5080530003</external-id>
  <name>DeniedRight #5</name>
  <enabled type="boolean">true</enabled>
  <link rel="self" href="https://movida.bebanjo.net/denied_rights/6"/>
  <link rel="licensable" href="https://movida.bebanjo.net/titles/3"/>
  <link rel="specific_platforms" href="https://movida.bebanjo.net/denied_rights/6/specific_platforms"/>
</right>

Creating a denied right inside a feature

As our introduction to REST APIs page suggests, you can create a denied right issuing a POST request to each denied right URI:

cat denied_right.xml
<denied-right>
  <external-id>C5080530004</external-id>
  <name>Denial reason</name>
</denied-right>
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @denied_right.xml "https://movida.bebanjo.net/api/titles/1/denied_rights"

As always Movida will return the full XML of the denied right just created:

<?xml version="1.0" encoding="UTF-8"?>
<denied-right>
  <id type="integer">13</id>
  <external-id>C5080530004</external-id>
  <name>Denial reason</name>
  <link rel="self" href="https://movida.bebanjo.net/api/denied_rights/13"/>
  <link rel="licensable" href="https://movida.bebanjo.net/titles/1"/>
  <link rel="specific_platforms" href="https://movida.bebanjo.net/denied_rights/13/specific_platforms"/>
</denied-right>

Creating a denied right inside a series

As our introduction to REST APIs page suggests, you can create a denied right issuing a POST request to each denied right URI:

cat denied_right.xml
<denied-right>
  <external-id>C5080530006</external-id>
  <name>Denial reason</name>
</denied-right>
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @denied_right.xml "https://movida.bebanjo.net/api/title_groups/9/denied_rights"

Movida will return the full XML of the denied right just created:

<?xml version="1.0" encoding="UTF-8"?>
<denied-right>
  <id>14</id>
  <external-id>C5080530006</external-id>
  <name>Denial reason</name>
  <link rel="self" href="https://movida.bebanjo.net/api/denied_rights/13"/>
  <link rel="licensable" href="https://movida.bebanjo.net/title_groups/1"/>
  <link rel="specific_platforms" href="https://movida.bebanjo.net/denied_rights/13/specific_platforms"/>
</right>

Updating a denied right

As our introduction to REST APIs page suggests, you can update a denied right issuing a PUT request to each denied right URI:

cat denied_right_update.xml
<denied-right>
  <name>Another denial reason</name>
</denied-right>
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X PUT -d @denied_right_update.xml "https://movida.bebanjo.net/api/denied_rights/13"

As always Movida will return the full XML of the denied right just updated:

<?xml version="1.0" encoding="UTF-8"?>
<denied-right>
  <id>13</id>
  <external-id>C5080530004</external-id>
  <name>Another denial reason</name>
  <link rel="self" href="https://movida.bebanjo.net/api/denied_rights/13"/>
  <link rel="licensable" href="https://movida.bebanjo.net/api/title_groups/1"/>
  <link rel="specific_platforms" href="https://movida.bebanjo.net/denied_rights/13/specific_platforms"/>
</denied-right>

Deleting a denied right

Also you can delete a denied right using DELETE request to each denied right URI:

$ curl --digest -u robot_user:password -X DELETE "https://movida.bebanjo.net/api/denied_rights/13"

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

Conflicts with existing rights

It is not possible to create a denied right for a content which already has at least one right configured. Such creation attempt will result in an error response:

<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error>There are rights recorded for the platforms you have just selected. You must remove them before you can deny rights</error>
</errors>

Last updated November 23rd, 2021.