Get Started
Studio API
- Introduction
- Streaming
- Live Streams
- Simulcasts
- Clips
- Videos
- Video Protection
- Configurations
- Assets
- CMS
- OTT
- Monetization
- IAM
- Integration
- Analytics
Content Delivery API
Deep dive
List rulesets
ListVideoProtectionRulesets
Return list of video_protections.
curl --request GET \
--url https://api.mottostreaming.com/streaming/video_protection/v1/rulesets \
--header 'Authorization: Bearer <token>'
{
"video_protection_rulesets": [
{
"id": "<string>",
"project_id": "<string>",
"name": "<string>",
"geo_restrictions_disallow": {
"country_codes": [
"<string>"
]
},
"geo_restrictions_allow": {
"country_codes": [
"<string>"
]
},
"disallow_vpn_usage": true,
"disallow_hotlinking": true,
"allowed_domains": [
"<string>"
],
"require_authentication": true,
"disabled": true,
"require_entitlement": true,
"geo_applicability_exempt": {
"country_codes": [
"<string>"
]
},
"geo_applicability_apply": {
"country_codes": [
"<string>"
]
},
"applies_to_all": true,
"target": {
"entity_ids": [
"<string>"
],
"event_ids": [
"<string>"
],
"creative_work_ids": [
"<string>"
],
"content_start_time": "2023-11-07T05:31:56Z",
"content_end_time": "2023-11-07T05:31:56Z"
},
"priority": "<string>"
}
],
"next_page_token": "<string>"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
Maximum number of records to return
If this field is not empty then it must contain the next_page_token
value
returned by a previous call to this method. Using this field causes the
method to return additional results from the previous method call.
You can filter the list of video_protections by the following fields:
disabled
: Whether the ruleset is disabled or not.
Response
The ID of the project that the VideoProtectionRuleset belongs to.
Name of the Ruleset
Viewers are disallowed to consume the video from these countries (and allowed from all others)
A country code (ISO 3316-1 alpha-2: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
Viewers are allowed to consume the video from these countries (and disallowed from all others)
A country code (ISO 3316-1 alpha-2: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
Disallow viewers from using a VPN to consume the video
Disallow viewers from sharing a playlist URL with others (i.e. hotlink protection). This is done by binding the viewer's IP address to the playlist URL.
A list of domains that are allowed to playback the video. An empty list implies all domains are valid. This uses the HTTP referrer, which can be spoofed and as such is not a strong protection mechanism.
Note: this uses the HTTP referrer. As native apps do not send any HTTP referrer, any client that does not send a referrer will be allowed.
Require viewers to be signed in. This requires the viewer to have a valid JWT, signed by the Motto identity service. The JWT should be passed either via the Authorization header or as a Cookie.
Disables the ruleset. This is useful for ensuring the ruleset no longer shows up as an option in the UI. It will continue to apply to any videos that already have this ruleseet applied (unlike a deleted ruleset).
Instruct the Motto content-delivery API to do an entitlement lookup for the user ID that the viewer is providing in
a JWT when trying to access the content.
This works in tandem with the Entitlement
and Offer
types in Motto's monetization
section.
Note: This requires require_authentication
to be set to true
.
Viewers from these countries will not have this ruleset applied.
A country code (ISO 3316-1 alpha-2: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
Viewers from these countries will have this ruleset applied.
A country code (ISO 3316-1 alpha-2: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
This ruleset applies to all videos in the project.
This ruleset applies to a specific set of videos, as defined by the target.
The entities with which this ruleset is associated. If provided, all videos that are associated with these entities will be included in the ruleset.
The events with which this ruleset is associated. If provided, all videos that are associated with these events will be included in the ruleset.
The creative works with which this ruleset is associated. If provided, all videos that are associated with these creative works will be included in the ruleset.
Any content defined by entity_ids
, event_ids
and creative_work_ids
after content_start_time
will be considered as part of the ruleset (as long as it is before content_end_time
).
If not provided, there is no lower time bound on the content.
Any content defined by entity_ids
, event_ids
and creative_work_ids
before content_end_time
will be considered as part of the ruleset (as long as it is after content_start_time
).
If not provided, there is no upper time bound on the content.
The priority of the ruleset. If multiple rulesets apply to a video, the ruleset with the highest priority will be used.
If there are more results than have been returned, then this field is set
to a non-empty value. To see the additional results,
use that value as page_token
in the next call to this method.
curl --request GET \
--url https://api.mottostreaming.com/streaming/video_protection/v1/rulesets \
--header 'Authorization: Bearer <token>'
{
"video_protection_rulesets": [
{
"id": "<string>",
"project_id": "<string>",
"name": "<string>",
"geo_restrictions_disallow": {
"country_codes": [
"<string>"
]
},
"geo_restrictions_allow": {
"country_codes": [
"<string>"
]
},
"disallow_vpn_usage": true,
"disallow_hotlinking": true,
"allowed_domains": [
"<string>"
],
"require_authentication": true,
"disabled": true,
"require_entitlement": true,
"geo_applicability_exempt": {
"country_codes": [
"<string>"
]
},
"geo_applicability_apply": {
"country_codes": [
"<string>"
]
},
"applies_to_all": true,
"target": {
"entity_ids": [
"<string>"
],
"event_ids": [
"<string>"
],
"creative_work_ids": [
"<string>"
],
"content_start_time": "2023-11-07T05:31:56Z",
"content_end_time": "2023-11-07T05:31:56Z"
},
"priority": "<string>"
}
],
"next_page_token": "<string>"
}