Developers
How can we help you?
Credit role
Note: Only Mediagenix On-Demand accounts with this feature enabled will expose this API.
A credit role resource represents the role of a credit in a piece of content. E.g. actor, director, producer, etc. Credit roles are created by Mediagenix On-Demand upon request, there’s not UI for that yet.
This is how a credit role resource looks like in the API:
<?xml version="1.0" encoding="UTF-8"?>
<credit-role>
<id type="integer">1</id>
<name>actor</name>
<admits-character-name type="boolean">true</admits-character-name>
<link rel="self" href="https://movida.bebanjo.net/api/credit_roles/1"/>
</credit-role>
{
"resource_type": "credit_role",
"id": 1,
"name": "actor",
"admits_character_name": true,
"self_link": "https://movida.bebanjo.net/api/credit_roles/1"
}
Valid attributes
-
id
: Mediagenix On-Demand’s internal identifier for a credit role. -
name
(optional): a descriptive name for the role. -
admits-character-name
(optional): a boolean (true
/false
) to indicate if a credit with this role may supply or not a character name. Meaningful for actors, but not for directors, technical stuff, etc.
Getting the list of available credit roles
To return a list of all the credit roles available in one account, just send a GET
request like the following:
$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/credit_roles
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/credit_roles
<?xml version="1.0" encoding="UTF-8"?>
<credit-roles type="array">
<credit-role>
<id type="integer">1</id>
<name>actor</name>
<admits-character-name type="boolean">true</admits-character-name>
<link rel="self" href="https://movida.bebanjo.net/api/credit_roles/1"/>
</credit-role>
<credit-role>
<id type="integer">2</id>
<name>director</name>
<admits-character-name type="boolean">false</admits-character-name>
<link rel="self" href="https://movida.bebanjo.net/api/credit_roles/2"/>
</credit-role>
<credit-role>
<id type="integer">3</id>
<name>producer</name>
<admits-character-name type="boolean">false</admits-character-name>
<link rel="self" href="https://movida.bebanjo.net/api/credit_roles/3"/>
</credit-role>
</credit-roles>
{
"entries": [
{
"resource_type": "credit_role",
"id": 1,
"name": "actor",
"admits_character_name": true,
"self_link": "https://movida.bebanjo.net/api/credit_roles/1"
},
{
"resource_type": "credit_role",
"id": 2,
"name": "director",
"admits_character_name": true,
"self_link": "https://movida.bebanjo.net/api/credit_roles/2"
},
{
"resource_type": "credit_role",
"id": 3,
"name": "producer",
"admits_character_name": true,
"self_link": "https://movida.bebanjo.net/api/credit_roles/3"
}
]
}
Getting a specific credit role
This operation allows you to recover information about one specific credit role:
$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/credit_roles/1
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/credit_roles/1
<?xml version="1.0" encoding="UTF-8"?>
<credit-role>
<id type="integer">1</id>
<name>actor</name>
<admits-character-name type="boolean">true</admits-character-name>
<link rel="self" href="https://movida.bebanjo.net/api/credit_roles/1"/>
</credit-role>
{
"resource_type": "credit_role",
"id": 1,
"name": "actor",
"admits_character_name": true,
"self_link": "https://movida.bebanjo.net/api/credit_roles/1"
}