Developers
How can we help you?
External id type
⚠️ This feature is coming soon! Reach out to your CSM if you would like more information
This is how an external id might look through the API:
An external id type is a resource that allows companies to define and manage different categories of external identifiers. These types can then be used to associate specific external ids with various entities within Mediagenix On-Demand (such as Features, Series, etc.).
This is how an external id type might look through the API:
<?xml version="1.0" encoding="UTF-8"?>
<external_id_type>
<resource_type>external_id_type</resource_type>
<id type="integer">42</id>
<name>Provider X ID</name>
<keyword>provider_x_id</keyword>
<default type="boolean">false</default>
<unique type="boolean">true</unique>
<main type="boolean">false</main>
<applicable-entities-scope>specific</applicable-entities-scope>
<link rel="self" href="https://movida.bebanjo.net/api/external_id_types/12"/>
<link rel="applicable_entities" href="https://movida.bebanjo.net/api/external_id_types/12/applicable_entities"/>
</external_id_type>
{
"resource_type": "external_id_type",
"id": 42,
"name": "Provider X ID",
"keyword": "provider_x_id",
"default": false,
"unique": true,
"main": false,
"applicable_entities_scope": "specific",
"self_link": "https://movida.bebanjo.net/api/external_id_types/12"
"applicable_entities_link": "https://movida.bebanjo.net/api/external_id_types/12/applicable_entities"
}
Note: currently external id types cannot be created/updated/destroyed through the API. Please, contact your Customer Success Manager in order to define the list of external ids suitable for your company.
External id type attributes
id
(read_only): Mediagenix On-Demand’s internal unique identifier for the external id type. This value is assigned by Mediagenix On-Demand and cannot be changed.name
(read_only): The human-readable label used in the User Interface (UI) for external ids of this type.keyword
(read_only): An automatically generated, unique string value used in the API to identify the external id type. It’s derived from the originalname
at the time of creation.default
(read_only): A boolean value indicating if this is the company’s default external id type. The default type usually corresponds to the primary external id historically used. Only one external id type can be thedefault
per company.unique
(read_only): A boolean value indicating if external ids assigned under this type must be unique across all items they apply to within the company.main
(read_only): A boolean value. Iftrue
, this external id type will be prioritized in UI displays (e.g., shown first) when an entity has multiple external ids.-
applicable-entities-scope
(read_only): This attribute can take two different values:-
all
: the external ID type applies to all available entities. -
specific
: the external ID type applies to the entities specified throw the link<applicable-entities-link>
.
-
Get a list of all external id types in the account
External id types are linked from the root of the API, through the link identified with the rel=”external_id_types” attribute:
<?xml version="1.0" encoding="UTF-8"?>
<movida>
<!-- ... -->
<link rel="external_id_types" href="https://movida.bebanjo.net/api/external_id_types"/>
<!-- ... -->
</movida>
{
"resource_type": "movida",
// ...
"external_id_types_link": "https://movida.bebanjo.net/api/external_id_types",
// ...
}
Following that link, we can fetch the list of external id types:
$ curl --digest -u robot_user:password -H "Accept: application/xml" https://movida.bebanjo.net/api/external_id_types
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/external_id_types
This would return a list of all external id types for the account:
<?xml version="1.0" encoding="UTF-8"?>
<external_id_types>
<entries>
<external_id_type>
<id type="integer">42</id>
<name>Provider X ID</name>
<keyword>provider_x_id</keyword>
<default type="boolean">false</default>
<unique type="boolean">true</unique>
<main type="boolean">false</main>
<applicable-entities-scope>specific</applicable-entities-scope>
<link rel="self" href="[https://movida.bebanjo.net/api/external_id_types/42](https://movida.bebanjo.net/api/external_id_types/42)"/>
<link rel="applicable_entities" href="[https://movida.bebanjo.net/api/external_id_types/42/applicable_entities](https://movida.bebanjo.net/api/external_id_types/42/applicable_entities)"/>
</external_id_type>
<external_id_type>
<id type="integer">57</id>
<name>Regional EIDR</name>
<keyword>regional_eidr</keyword>
<default type="boolean">false</default>
<unique type="boolean">false</unique>
<main type="boolean">false</main>
<applicable-entities-scope>all</applicable-entities-scope>
<link rel="self" href="[https://movida.bebanjo.net/api/external_id_types/57](https://movida.bebanjo.net/api/external_id_types/57)"/>
</external_id_type>
</entries>
</external_id_types>
{
"entries": [
{
"resource_type": "external_id_type",
"id": 42,
"name": "Provider X ID",
"keyword": "provider_x_id",
"default": false,
"unique": true,
"main": false,
"applicable_entities_scope": "specific",
"self_link": "https://movida.bebanjo.net/api/external_id_types/42",
"applicable_entities_link": "https://movida.bebanjo.net/api/external_id_types/42/applicable_entities"
},
{
"resource_type": "external_id_type",
"id": 57,
"name": "Regional EIDR",
"keyword": "regional_eidr",
"default": false,
"unique": false,
"main": false,
"applicable_entities_scope": "all",
"self_link": "https://movida.bebanjo.net/api/external_id_types/57"
}
]
}
Get a single external id type
You can retrieve a single external id type by doing a GET
to its URI (found in the self_link
or link rel="self"
attribute of an external id type).
$ curl --digest -u your_api_user:your_password -H "Accept: application/xml" https://movida.bebanjo.net/api/external_id_types/42
$ curl --digest -u your_api_user:your_password -H "Accept: application/json" https://movida.bebanjo.net/api/external_id_types/42
This will return the full representation of the specific external id type:
<?xml version="1.0" encoding="UTF-8"?>
<external_id_type>
<id type="integer">42</id>
<name>Provider X ID</name>
<keyword>provider_x_id</keyword>
<default type="boolean">false</default>
<uniqueness type="boolean">true</uniqueness>
<main type="boolean">false</main>
<applicable-entities-scope>specific</applicable-entities-scope>
<link rel="self" href="[https://movida.bebanjo.net/api/external_id_types/42](https://movida.bebanjo.net/api/external_id_types/42)"/>
<link rel="applicable_entities" href="[https://movida.bebanjo.net/api/external_id_types/42/applicable_entities](https://movida.bebanjo.net/api/external_id_types/42/applicable_entities)"/>
</external_id_type>
{
"resource_type": "external_id_type",
"id": 42,
"name": "Provider X ID",
"keyword": "provider_x_id",
"default": false,
"uniqueness": true,
"main": false,
"applicable_entities_scope": "specific",
"self_link": "https://movida.bebanjo.net/api/external_id_types/42",
"applicable_entities_link": "https://movida.bebanjo.net/api/external_id_types/42/applicable_entities"
}
Applicable entities
The applicable_entities_link
found on an external id type resource points to a list of entity types that this particular external id type can be associated with. An “Applicable Entity” resource represents one such association.
This is how an applicable entity might look through the API:
<?xml version="1.0" encoding="UTF-8"?>
<applicable_entity>
<id type="integer">1</id>
<entity_type>Brand</entity_type>
<link rel="self" href="https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/1"/>
<link rel="external_id_type" href="https://movida.bebanjo.net/api/external_id_types/1"/>
</applicable_entity>
{
"resource_type": "applicable_entity",
"id": 1,
"entity_type": "Brand",
"self_link": "https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/1",
"external_id_type_link": "https://movida.bebanjo.net/api/external_id_types/1"
}
Applicable entity attributes
id
(read_only): Mediagenix On-Demand’s internal unique identifier for the applicable entity record.entity_type
(read_only): The name of the entity type this external id type applies to (e.g., “Brand”, “Series”, “Title”).
Get a list of all applicable entities for an external id type
To get the list of entities an external id type applies to, follow the applicable_entities_link
(or <link rel="applicable_entities" href="URL"/>
in XML) from the parent external id type resource.
$ curl --digest -u your_api_user:your_password -H "Accept: application/xml" https://movida.bebanjo.net/api/external_id_types/1/applicable_entities
$ curl --digest -u your_api_user:your_password -H "Accept: application/json" https://movida.bebanjo.net/api/external_id_types/1/applicable_entities
This would return a list of all applicable entity records for that external id type:
<?xml version="1.0" encoding="UTF-8"?>
<applicable_entities>
<entries>
<applicable_entity>
<id type="integer">1</id>
<entity_type>Brand</entity_type>
<link rel="self" href="https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/1"/>
<link rel="external_id_type" href="https://movida.bebanjo.net/api/external_id_types/1"/>
</applicable_entity>
<applicable_entity>
<id type="integer">6</id>
<entity_type>Clip</entity_type>
<link rel="self" href="https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/6"/>
<link rel="external_id_type" href="https://movida.bebanjo.net/api/external_id_types/1"/>
</applicable_entity>
<applicable_entity>
<id type="integer">3</id>
<entity_type>Collection</entity_type>
<link rel="self" href="https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/3"/>
<link rel="external_id_type" href="https://movida.bebanjo.net/api/external_id_types/1"/>
</applicable_entity>
</entries>
</applicable_entities>
{
"entries": [
{
"resource_type": "applicable_entity",
"id": 1,
"entity_type": "Brand",
"self_link": "[https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/1](https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/1)",
"external_id_type_link": "[https://movida.bebanjo.net/api/external_id_types/1](https://movida.bebanjo.net/api/external_id_types/1)"
},
{
"resource_type": "applicable_entity",
"id": 6,
"entity_type": "Clip",
"self_link": "[https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/6](https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/6)",
"external_id_type_link": "[https://movida.bebanjo.net/api/external_id_types/1](https://movida.bebanjo.net/api/external_id_types/1)"
},
{
"resource_type": "applicable_entity",
"id": 3,
"entity_type": "Collection",
"self_link": "[https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/3](https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/3)",
"external_id_type_link": "[https://movida.bebanjo.net/api/external_id_types/1](https://movida.bebanjo.net/api/external_id_types/1)"
}
]
}
Get a single applicable entity
You can retrieve a single applicable entity record by doing a GET
to its URI.
$ curl --digest -u your_api_user:your_password -H "Accept: application/xml" [https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/1](https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/1)
$ curl --digest -u your_api_user:your_password -H "Accept: application/json" https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/1
This will return the full representation of the specific applicable entity:
<?xml version="1.0" encoding="UTF-8"?>
<applicable_entity>
<id type="integer">1</id>
<entity_type>Brand</entity_type>
<link rel="self" href="https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/1"/>
<link rel="external_id_type" href="https://movida.bebanjo.net/api/external_id_types/1"/>
</applicable_entity>
{
"resource_type": "applicable_entity",
"id": 1,
"entity_type": "Brand",
"self_link": "[https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/1](https://movida.bebanjo.net/api/external_id_types/1/applicable_entities/1)",
"external_id_type_link": "[https://movida.bebanjo.net/api/external_id_types/1](https://movida.bebanjo.net/api/external_id_types/1)"
}