Developers
How can we help you?
Specific platform
The specific platform resource is used to specify the specific platforms blackout/deal/right/denied right/rule applies to. If the relationship is empty, the blackout/deal/right/denied right/rule applies to all the platforms of the company.
In Mediagenix On-Demand, a specific platform will look like this:
<?xml version="1.0" encoding="UTF-8"?>
<specific-platform>
<id type="integer">1</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platforms/1"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/3"/>
</specific-platform>
{
"resource_type": "specific_platform",
"id": 1,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/1",
"platform_link": "https://movida.bebanjo.net/api/platforms/3"
}
Create a specific platform
As our introduction to REST APIs page suggests, you can create a specific platform issuing a POST
request to each blackout/deal/right/denied right/rule URI:
$ cat specific_platform.xml
$ cat specific_platform.json
<specific-platform>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/3"/>
</specific-platform>
{
"platform_link": "https://movida.bebanjo.net/api/platforms/3"
}
For blackouts:
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @specific_platform.xml "https://movida.bebanjo.net/api/blackouts/13/specific_platforms"
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d @specific_platform.json "https://movida.bebanjo.net/api/blackouts/13/specific_platforms"
For deals:
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @specific_platform.xml "https://movida.bebanjo.net/api/deals/13/specific_platforms"
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d @specific_platform.json "https://movida.bebanjo.net/api/deals/13/specific_platforms"
For rights:
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @specific_platform.xml "https://movida.bebanjo.net/api/rights/13/specific_platforms"
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d @specific_platform.json "https://movida.bebanjo.net/api/rights/13/specific_platforms"
For denied rights:
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @specific_platform.xml "https://movida.bebanjo.net/api/denied_rights/13/specific_platforms"
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d @specific_platform.json "https://movida.bebanjo.net/api/denied_rights/13/specific_platforms"
For rules:
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @specific_platform.xml "https://movida.bebanjo.net/api/rules/13/specific_platforms"
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d @specific_platform.json "https://movida.bebanjo.net/api/rules/13/specific_platforms"
As always Mediagenix On-Demand will return the full XML/JSON of the specific platform just created:
<?xml version="1.0" encoding="UTF-8"?>
<specific-platform>
<id type="integer">1</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platforms/1"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/3"/>
</specific-platform>
{
"resource_type": "specific_platform",
"id": 1,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/1",
"platform_link": "https://movida.bebanjo.net/api/platforms/3"
}
Listing all specific platforms of a blackout
Specific platforms are accessed via the blackout they belong to. Refer to the corresponding resource page, i.e blackout resource page to find out how to access a blackout.
Inside a blackout, one of the related link nodes is the specific_platforms
node, identified by the rel
attribute.
Example for a blackout:
<?xml version='1.0' encoding='utf-8' ?>
<blackout>
<!-- ... -->
<link rel="specific_platforms" href="https://movida.bebanjo.net/api/blackouts/13/specific_platforms"/>
<!-- ... -->
</blackout>
{
"resource_type": "blackout",
// ...
"specific_platforms_link": "https://movida.bebanjo.net/api/blackouts/13/specific_platforms",
// ...
}
If we follow that link we can fetch the list of all specific platforms for that blackout.
$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/blackouts/13/specific_platforms
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/blackouts/13/specific_platforms
<specific_platforms type="array">
<specific_platform>
<id type="integer">10</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platforms/10"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/3"/>
</specific_platform>
<specific_platform>
<id type="integer">11</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platforms/11"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/2"/>
</specific_platform>
</specific_platforms>
{
"entries": [
{
"resource_type": "specific_platform",
"id": 2183092,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/10",
"platform_link": "https://movida.bebanjo.net/api/platforms/3"
},
{
"resource_type": "specific_platform",
"id": 2183092,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/11",
"platform_link": "https://movida.bebanjo.net/api/platforms/2"
}
]
}
Listing all specific platforms of a deal
Specific platforms are accessed via the deal they belong to. Refer to the corresponding resource page, i.e deal resource page to find out how to access a deal.
Inside a deal, one of the related link nodes is the specific_platforms
node, identified by the rel
attribute.
Example for a deal:
<?xml version='1.0' encoding='utf-8' ?>
<deal>
<!-- ... -->
<link rel="specific_platforms" href="https://movida.bebanjo.net/api/deals/13/specific_platforms"/>
<!-- ... -->
</deal>
{
"resource_type": "deal",
// ...
"specific_platforms_link": "https://movida.bebanjo.net/api/deals/13/specific_platforms",
// ...
}
If we follow that link we can fetch the list of all specific platforms for that deal.
$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/deals/13/specific_platforms
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/deals/13/specific_platforms
<specific_platforms type="array">
<specific_platform>
<id type="integer">10</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platforms/10"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/3"/>
</specific_platform>
<specific_platform>
<id type="integer">11</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platforms/11"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/2"/>
</specific_platform>
</specific_platforms>
{
"entries": [
{
"resource_type": "specific_platform",
"id": 2183093,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/10",
"platform_link": "https://movida.bebanjo.net/api/platforms/3"
},
{
"resource_type": "specific_platform",
"id": 2183093,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/11",
"platform_link": "https://movida.bebanjo.net/api/platforms/2"
}
]
}
Listing all specific platforms of a right
Specific platforms are accessed via the right they belong to. Refer to the corresponding resource page, i.e right resource page to find out how to access a right.
Inside a right, one of the related link nodes is the specific_platforms
node, identified by the rel
attribute.
Example for a right:
<?xml version='1.0' encoding='utf-8' ?>
<right>
<!-- ... -->
<link rel="specific_platforms" href="https://movida.bebanjo.net/api/rights/13/specific_platforms"/>
<!-- ... -->
</right>
{
"resource_type": "right",
// ...
"specific_platforms_link": "https://movida.bebanjo.net/api/rights/13/specific_platforms",
// ...
}
If we follow that link we can fetch the list of all specific platforms for that right.
$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/rights/13/specific_platforms
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/rights/13/specific_platforms
<specific_platforms type="array">
<specific_platform>
<id type="integer">10</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platforms/10"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/3"/>
</specific_platform>
<specific_platform>
<id type="integer">11</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platforms/11"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/2"/>
</specific_platform>
</specific_platforms>
{
"entries": [
{
"resource_type": "specific_platform",
"id": 2183093,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/10",
"platform_link": "https://movida.bebanjo.net/api/platforms/3"
},
{
"resource_type": "specific_platform",
"id": 2183093,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/11",
"platform_link": "https://movida.bebanjo.net/api/platforms/2"
}
]
}
Listing all specific platforms of a denied right
Specific platforms are accessed via the denied right they belong to. Refer to the corresponding resource page, i.e denied right resource page to find out how to access a denied right.
Inside a denied right, one of the related link nodes is the specific_platforms
node, identified by the rel
attribute.
Example for a denied right:
<?xml version='1.0' encoding='utf-8' ?>
<denied-right>
<!-- ... -->
<link rel="specific_platforms" href="https://movida.bebanjo.net/api/denied_rights/13/specific_platforms"/>
<!-- ... -->
</denied-right>
{
"resource_type": "denied_right",
// ...
"specific_platforms_link": "https://movida.bebanjo.net/api/denied_rights/13/specific_platforms",
// ...
}
If we follow that link we can fetch the list of all specific platforms for that denied right.
$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/denied_rights/13/specific_platforms
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/denied_rights/13/specific_platforms
<specific_platforms type="array">
<specific_platform>
<id type="integer">10</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platforms/10"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/3"/>
</specific_platform>
<specific_platform>
<id type="integer">11</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platforms/11"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/2"/>
</specific_platform>
</specific_platforms>
{
"entries": [
{
"resource_type": "specific_platform",
"id": 2183093,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/10",
"platform_link": "https://movida.bebanjo.net/api/platforms/3"
},
{
"resource_type": "specific_platform",
"id": 2183093,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/11",
"platform_link": "https://movida.bebanjo.net/api/platforms/2"
}
]
}
Listing all specific platforms of a rule
Specific platforms are accessed via the rule they belong to. Refer to the corresponding resource page, i.e rule resource page to find out how to access a rule.
Inside a rule, one of the related link nodes is the specific_platforms
node, identified by the rel
attribute.
Example for a rule:
<?xml version='1.0' encoding='utf-8' ?>
<rule>
<!-- ... -->
<link rel="specific_platforms" href="https://movida.bebanjo.net/api/rules/13/specific_platforms"/>
<!-- ... -->
</rule>
{
"resource_type": "rule",
// ...
"specific_platforms_link": "https://movida.bebanjo.net/api/rules/13/specific_platforms",
// ...
}
If we follow that link we can fetch the list of all specific platforms for that rule.
$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/rules/13/specific_platforms
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/rules/13/specific_platforms
<specific_platforms type="array">
<specific_platform>
<id type="integer">10</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platforms/10"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/3"/>
</specific_platform>
<specific_platform>
<id type="integer">11</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platforms/11"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/2"/>
</specific_platform>
</specific_platforms>
{
"entries": [
{
"resource_type": "specific_platform",
"id": 2183092,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/10",
"platform_link": "https://movida.bebanjo.net/api/platforms/3"
},
{
"resource_type": "specific_platform",
"id": 2183092,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/11",
"platform_link": "https://movida.bebanjo.net/api/platforms/2"
}
]
}
Updating a specific platform
You can update specific platforms using a PUT
request to the URL of a given specific platform, as the following example illustrates.
$ cat specific_platform.xml
$ cat specific_platform.json
<specific-platform>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/4"/>
</specific-platform>
{
"platform_link": "https://movida.bebanjo.net/api/platforms/4"
}
Now we send the XML/JSON as the body of a PUT
request to the specific platform’s URL
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X PUT -d @specific_platform.xml "https://movida.bebanjo.net/api/specific_platforms/10"
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d @specific_platform.json "https://movida.bebanjo.net/api/specific_platforms/10"
The PUT
request would return the updated XML/JSON of the specific platform:
<specific-platform>
<id type="integer">10</id>
<link rel="self" href="https://movida.bebanjo.net/api/specific_platform/10"/>
<link rel="platform" href="https://movida.bebanjo.net/api/platforms/4"/>
</specific-platform>
{
"resource_type": "specific_platform",
"id": 2183097,
"self_link": "https://movida.bebanjo.net/api/specific_platforms/2183097",
"platform_link": "https://movida.bebanjo.net/api/platforms/4770"
}
Deleting a specific platform
The following example shows how to destroy a particular specific platform. Only a DELETE
HTTP request to its URL is required:
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X DELETE "https://movida.bebanjo.net/api/specific_platforms/10"
$ curl --digest -u robot_user:password -H "Accept: application/json" -X DELETE "https://movida.bebanjo.net/api/specific_platforms/10"
The DELETE
request doesn’t return anything, as that specific platform now is gone.
Deleting a specific platforms doesn’t delete the parent (blackout, deal, right or rule) nor the platform.