Platform version v1
https://platform-api.magine.com/api/{version}
- version: required(v1)
Version of the API
Glossary
Partner Partner is a term used throughout the documentation to indicate a customer of Magine Pro Platform.
Reseller A reseller is a third-party to the partner. A reseller has access to a subset of the functionality available in this API.
Introduction
The vision for this API is to give full access to the Magine Pro Platform.
Authentication
To be able to call the platform API the first step is to generate a RS512 key-pair. The private key of the pair should be kept secure and never communicated to Magine Pro. The public key of the pair should be sent to Magine Pro.
To generate the key-pair the following command can be used:
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS512.key # Don't add passphrase
openssl rsa -in jwtRS512.key -pubout -outform PEM -out jwtRS512.key.pub
Magine Pro will associate the public key with certain permissions in the platform. Those permissions are either scoped for a reseller or full platform access.
To call the API a JSON Web Token (JWT from now on) should be created with at the following attributes defined (see https://tools.ietf.org/html/rfc7519#section-4.1):
iss
A value that is communicated to you from Magine Pro at the hand over of the public key, this value is validated and must match
iat
A UNIX timestamp (in seconds) for when the JWT was issued.
exp
A UNIX timestamp (in seconds) for when the JWT will expire, this cannot be more than 30 days into the future.
The JWT should then be supplied in the Authorization header in all API calls.
Our recommendation is that the JWT is created with short expiration timestamps and not persisted at all. Preferably it should be created on the fly before API calls and potentially cached in memory only.
Error Handling
All endpoints may return 4xx and 5xx HTTP status codes to indicate client and server errors, respectively.
It may not be sufficient to match on the HTTP status code since e.g. a 400 can occur for multiple reasons. In addition to the HTTP status code, the endpoints share a format for the body of error responses.
The error responses are JSON and have schema { "errorCode": string, "messages": [string] }
.
The errorCode
is meant to be a program readable identification of the error that can be used by clients to detect specific issues. If you for example want to entitle a user to an offer and ignore the error if the user is entitled you can do (pseudo code):
if (statusCode >= 200 && < 300) {
// ok
} else if (statusCode >= 400 && < 500) {
if (body.errorCode == "offerEntitledAlready") {
// choose how to handle this.
} else {
// Client error, look into this.
}
} else if (statusCode >= 500) {
// Please contact Magine Pro about this, including the Trace ID in body.messages.
}
PLEASE NOTE: The contents of messages
is only meant to be a human readable explanation, please do not match on it programmatically as it will change if we decide to clarify the message.
See the documentation for each endpoint for the specific errorCode
s that apply to it. Completing this documentation is a work in progress.
If you get a 5xx response then messages
will include a Trace ID. This is present to make debugging simpler for Magine Pro. If possible, please provide it when reporting issues.
Reseller API
The Reseller API implements a subset of the available functionality. As a reseller you can provision users. You can and add and remove entitlements only on the users that has been previously provisioned by your reseller account.
If you try to use the Reseller API on a user that has not been provisioned through the API the request will fail. Authentication and authorization for API call still applies in the same way for resellers.
For a reseller to be able to add an entitlement to a user, a resellerOfferId needs to be provided in the URL. A partner should provide this identifier to the reseller as the reseller cannot create offers by themselves. A partner needs to create a third party offer for it to work with a reseller, no other offer types will work at this moment.
Note that the entitlement will be active on the user until it is removed. It is the reseller's responsibility to build support for removing the entitlement when it is appropriate.
Get Started
To make the first API call against the Magine Pro Platform follow the steps below:
- As a Partner or Reseller, generate a key-pair by running the following commands (command assumes
openssl
andssh-keygen
is installed):
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS512.key # Don't add passphrase
openssl rsa -in jwtRS512.key -pubout -outform PEM -out jwtRS512.key.pub
Store the
jwtRS512.key
in a safe place such as your key management system. It is a private key and should not be shared. Provide only the public keyjwtRS512.key.pub
to your contact person at Magine Pro and proceed to the next step.Magine Pro will upon receiving the public key provide back the following values required to call the API:
Issuer
Value used in the JWT field
iss
to validate ownershipAccess Token
The Access Token value is used in the header
Magine-AccessToken
in all API calls to Magine Pro Platform. It is used to select the correct partner universe on the Magine Pro Platform.
- Generate a JWT (example below is written for Node but any programming language can be used)
Run
npm init
and follow the instructions in the terminalInstall
jsonwebtoken
as a node dependency usingnpm install --save jsonwebtoken
Create a javascript file (index.js) with the following content
var jwt = require('jsonwebtoken'); var fs = require('fs'); var privateKey = fs.readFileSync('jwtRS512.key'); // Private key generated in step 1 var token = jwt.sign({ iss: 'PROVIDED_BY_MAGINE_PRO_IN_STEP_3', iat: Math.floor(Date.now() / 1000) - (60 * 60), exp: Math.floor(Date.now() / 1000) + (60 * 60 * 24) }, privateKey, { algorithm: 'RS512'}); console.log(token);
Run the file with
node index.js
and the output in the terminal should be a valid JWT
- Call test API using the JWT (please note that a JWT can have a maximum expiration time of 30 days)
If you are a partner:
curl -v \
-H "Magine-AccessToken: MAGINE_PRO_PROVIDED_VALUE_FROM_STEP_3" \
-H "Authorization: Bearer NEWLY_GENERATED_JWT" \
https://platform-api.magine.com/api/v1/partner/test
If you are a reseller:
curl -v \
-H "Magine-AccessToken: MAGINE_PRO_PROVIDED_VALUE_FROM_STEP_3" \
-H "Authorization: Bearer NEWLY_GENERATED_JWT" \
https://platform-api.magine.com/api/v1/reseller/test
A 200 OK response should be returned in both cases.
You have now successfully interacted with the Magine Pro Platform API either as a Partner or Reseller.
Versioning
- The entire API is versioned in the URL
- Any breaking changes (see below) will be made as a new version.
- Existing endpoints will not incorporate breaking changes, instead the changes will be present in the new version.
- Existing endpoints will be present in newer versions even if they have not been modified.
Versioning Scheme
We distinguish between breaking and non-breaking changes to the API. Non-breaking changes are not expected to affect any current clients so they will not incur a new API version. Breaking changes, on the other hand, may require clients to update their integration so for them the version number in the URL will be increased.
Classification
Hypothetically any API changes could break a client, but we have classified some as less harmful. Please make sure to take this into account.
Below property
refers to endpoints, headers, request/response bodies, query parameters, JSON object properties, and possibly more.
Examples of breaking changes:
- Changing the format of a property (e.g. a JSON list becoming an object)
- Adding or renaming a required input property (e.g. requiring a new header to be passed)
- Removing or renaming a required output property (e.g. renaming
name
tofirstName
in a JSON object) - Restricting the format of an input parameter
- Widening the format of an output parameter
Examples of non-breaking changes:
- Adding a new optional input property
- Adding a new output property (for client implementations, see Tolerant Reader)
- Widening the format of of an input parameter
- Restricting the format of an output parameter
Reseller API
get /reseller/test
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Body
Media type: application/json;charset=utf-8
Type: string
HTTP status code 401
Body
Media type: application/json;charset=utf-8
Type: object
Properties- errorCode: required(string)
- messages: required(array of string)
HTTP status code 404
Body
Media type: application/json;charset=utf-8
Type: object
Properties- errorCode: required(string)
- messages: required(array of string)
Use this route to provision a new user using their email
post /reseller/users
Use this route to provision a new user using their email
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Body
Media type: application/json
Type: object
Properties- email: required(string)
Should be a valid email address. The user uses this e-mail address to log in through Magine Pro clients. It is also used by Magine Pro for e-mail send outs.
- countryCode: required(string)
An ISO 3166-1 alpha-2 country code. Uppercase is preferred but the property is case-insensitive.
Example:
Sweden:
SE
- name: (string)
Free-form text for the user's name. It is used in the applications and when communicating with the user (such as through email).
Example:
{
"email": "example@maginepro.com",
"countryCode": "SE",
"name": "John Doe"
}
HTTP status code 200
User was already created (provisioned) in the platform, and can now be used by this reseller account.
Body
Media type: application/json
Type: object
Properties- userId: required(string)
- resellerClaimDate: required(date-only)
Example:
2019-02-23
Example:
{
"userId": "1YJO25UNWH2UZB6K9BRWQMECQUSR", "resellerClaimDate": "2019-02-02"
}
HTTP status code 201
User was created (provisioned) in the platform.
Body
Media type: application/json
Type: object
Properties- userId: required(string)
- resellerClaimDate: required(date-only)
Example:
2019-02-23
Example:
{
"userId": "1YJO25UNWH2UZB6K9BRWQMECQUSR", "resellerClaimDate": "2019-02-02"
}
HTTP status code 400
Bad request, either fields are missing or badly formatted.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
Create a login JWT to authorize requests with the Magine Client API.
post /reseller/users/{userId}/auth
Create a login JWT to authorize requests with the Magine Client API.
URI Parameters
- userId: required(string)
ID of the user to authenticate as
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Successfully created a user JWT.
Body
Media type: application/json
Type: object
Properties- token: required(string)
JWT proof that a user is signed in. The default TTL is 72 hours. This is used to authenticate requests to the Magine Pro Client API by passing the Authorization header with the contents
Bearer <JWT>
.
HTTP status code 400
Bad request, either fields are missing or badly formatted, or the user is not provisioned by this reseller.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User not found
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
Use this route to entitle a user to an offer (a group of items that you can watch in the service).
Use this route to remove entitlement for an offer from a user.
put /reseller/users/{userId}/entitlements/{resellerOfferId}
Use this route to entitle a user to an offer (a group of items that you can watch in the service).
URI Parameters
- userId: required(string)
User ID is created and returned in the response when provisioning a user.
- resellerOfferId: required(string)
Reseller Offer ID is provided manually to a reseller.
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Success, user is now entitled
Body
Media type: application/json
Type: object
HTTP status code 400
Bad request, either fields are missing, body is badly formatted or user was already entitled.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
Not found, user or offer id does not exists.
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
delete /reseller/users/{userId}/entitlements/{resellerOfferId}
Use this route to remove entitlement for an offer from a user.
URI Parameters
- userId: required(string)
User ID is created and returned in the response when provisioning a user.
- resellerOfferId: required(string)
Reseller Offer ID is provided manually to a reseller.
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
User entitlement to the specified offer was deleted
Body
Media type: application/json
Type: object
HTTP status code 400
Bad request, either fields are missing or badly formatted.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
Not found, user or offer id does not exists.
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
Partner API
get /partner/test
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Body
Media type: application/json;charset=utf-8
Type: string
HTTP status code 401
Body
Media type: application/json;charset=utf-8
Type: object
Properties- errorCode: required(string)
- messages: required(array of string)
HTTP status code 404
Body
Media type: application/json;charset=utf-8
Type: object
Properties- errorCode: required(string)
- messages: required(array of string)
Get paginated list of viewables
Create a new asset in the metadata system
get /partner/viewables
Get paginated list of viewables
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Query Parameters
- size: (number)
Page size
- cursor: (string)
Pagination cursor
Example:
WzE1NTI2NDQ0MDgsIjc1YzdjZjk4LTNlOGMtNGU4NC05M2I5LTE5ZmI2ZWExM2U5NCJd
- title: (string)
Fetch the viewable by title
Example:
Superman%20returns
- sourceId: (string)
Fetch all viewables where sourceId is present in any object in the VODs list
Example:
test_0005
- assetId: (string)
Fetch the viewable that have AssetId as one of it’s VOD’s
Example:
e2d7ece-c6b2-4ed6-b7e9-530fe69a397b
- createdAfter: (number)
filter on createdAt for the transcoded asset.
Example:
1671112297
- modifiedAfter: (number)
filter on modifiedAt for the transcoded asset.
Example:
1671112297
HTTP status code 200
Got a list of viewables with optional cursor and filters
Body
Media type: application/json
Type: object
Properties- viewables: required(array of Viewable)
Items: Viewable
- id: required(string)
- partnerId: required(string)
ID of partner
Example:
magine-pro-demo
- metadata: required(object)
Additional properties can be included beyond the ones listed below.
- kind: required(one of movie, program, episode, show, trailer, channel)
- title: required(string)
Master copy title
- synopsis: (string)
Master copy synopsis
- genres: (array of string)
Master copy genres, an array of strings
Example:
[ "Drama", "Romance", "Action" ]
- labels: (array of string)
An array of string labels, certain labels are added to the viewable automatically on update, such as pack/offer related labels.
- viewableWindowStart: (number)
Number of seconds since the epoch. Viewable will be available in the service from this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- viewableWindowEnd: (number)
Number of seconds since the epoch. Viewable will be available in the service until this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- countryBlacklist: (array of string)
A list of countries where this assset will not be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase.
Example:
[ "se", "dk", "fr", "us" ]
- countryWhitelist: (array of string)
A list of countries where this assset will be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase
Example:
[ "se", "dk", "fr", "us" ]
- showId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
In an episode viewable, you add this parameter to link the episode to the show viewable, that is how we find episodes connected to a Show. This is required for a viewable of kind 'episode'
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- season: (number)
On an episode viewable, you specify what season number this particular episode belongs to.
- episode: (number)
On an episode viewable, you specify what episode number this particular viewable has in the season specified.
- ratings: (array of ContentRating)
A list of content ratings connected to this viewable, one per rating system applicable
Items: ContentRating
- system: required(string)
- rating: required(string)
- reasons: (array of string)
- createdAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- publish: required(boolean)
- vods: (array of Vod)
Items: Vod
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for the transcoded asset.
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- source: required(string)
ID of partner
Example:
magine-pro-demo
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- status: required(one of imported, transcoding, transcoded, transcoding_error, import_error, deleted)
Status of the vod transcoding
- createdAt: (number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: (number)
Number of seconds since the epoch
Example:
1623920603
- rights: (object)
Special rights for the vod asset
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- offlineAvailable: required(boolean)
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
- publish: (boolean)
- vodPipeline: required(one of inhouse, mediaconvert)
What pipeline is responsible for the vod transcoding
- duration: (number)
Video duration in seconds
- viewableId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for a metadata asset.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- drmActivated: required(boolean)
- drmType: (one of normal, enhanced)
Describes which type of DRM should be used to do transcoding, if not set, defaults to normal.
Example:
normal
- subtitleLanguages: (array of string)
- subtitleTracks: (array of SubtitleTrack)
Items: SubtitleTrack
- language: required(string)
Three letter representation of language
Example:
swe
- subtitleType: required(one of normal, cc, forced_narrative)
The type of subtitle track
- language: required(string)
- audioLanguages: (array of string)
- sourceResolution: (object)
Dimensions of the video frame.
- width: required(integer - minimum: 640)
Width in pixels.
- height: required(integer - minimum: 480)
Height in pixels.
- width: required(integer - minimum: 640)
- audioChansPerLang: (array of object)
Items: items
- channels: required(number)
- language: required(string)
Example:
{ "assetId": "cac10231-b376-4493-b5ad-f27d95d9b8b3", "source": "magine-pro-demo", "sourceId": "mpl-moe-aac-platform-test-001", "status": "transcoded", "createdAt": 1623854732, "modifiedAt": 1623854927, "vodPipeline": "mediaconvert", "viewableId": "60bbb98e-2794-450b-9c8c-b1f022db7a60", "drmActivated": true, "drmType": "normal", "subtitleLanguages": [ "eng", "ell" ], "subtitleTracks": [ { "language": "eng", "subtitleType": "normal" }, { "language": "ell", "subtitleType": "normal" } ], "audioLanguages": [ "eng", "eng", "eng" ], "sourceResolution": { "width": 1920, "height": 1080 }, "audioChansPerLang": [ { "channels": 6, "language": "eng" } ] }
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- liveEvents: (array of LiveEvent)
Items: LiveEvent
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
Example:
{ "id": "afaa73a9-6891-4810-a66a-97d949275ce5", "startTimeUtc": 1568903400 }
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- broadcasts: (array of Broadcast)
Items: Broadcast
- id: required(string)
- sourceId: required(string)
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- stopTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupFrom: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupTo: required(number)
Number of seconds since the epoch
Example:
1623920603
- channelViewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
Unique id for a metadata asset. Most of the time it's a UUID, but for the live channels, the id consists of only digits for legacy reasons.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
- duration: required(number)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "sourceId": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "startTimeUtc": 1630542000, "stopTimeUtc": 1630545000, "catchupFrom": 1630542000, "catchupTo": 1631149800, "channelViewableId": "200064", "extendedRights": { "pause": true, "rewind": true, "fastForward": true }, "duration": 3000 }
- channelPlayable: (object)
- id: required(string)
- streamId: required(string)
- duration: required(number)
- verifyAge: required(boolean)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "200064", "streamId": "200064", "duration": 7200, "verifyAge": false, "extendedRights": { "pause": true, "rewind": true, "fastForward": true } }
Example:
{ "id": "60bbb98e-2794-450b-9c8c-b1f022db7a60", "partnerId": "magine-pro-demo", "metadata": { "kind": "movie", "title": "Demo movie", "images": [ { "type": "poster", "filename": "https://images.eu-west-1.test.tvoli.com/i/magine-pro-demo/v/c346d955-3834-4d9e-a2d4-09a183328969.jpg" } ], "synopsis": "Descriptive text about the movie" }, "createdAt": 1623853814, "modifiedAt": 1623853814, "publish": true }
- cursor: (string)
HTTP status code 400
Body
Media type: application/json;charset=utf-8
Type: object
Properties- errorCode: required(string)
- messages: required(array of string)
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
post /partner/viewables
Create a new asset in the metadata system
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Body
Media type: application/json
Type: object
Properties- metadata: required(object)
Additional properties can be included beyond the ones listed below.
- kind: required(one of movie, program, episode, show, trailer, channel)
- title: required(string)
Master copy title
- synopsis: (string)
Master copy synopsis
- genres: (array of string)
Master copy genres, an array of strings
Example:
[ "Drama", "Romance", "Action" ]
- labels: (array of string)
An array of string labels, certain labels are added to the viewable automatically on update, such as pack/offer related labels.
- viewableWindowStart: (number)
Number of seconds since the epoch. Viewable will be available in the service from this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- viewableWindowEnd: (number)
Number of seconds since the epoch. Viewable will be available in the service until this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- countryBlacklist: (array of string)
A list of countries where this assset will not be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase.
Example:
[ "se", "dk", "fr", "us" ]
- countryWhitelist: (array of string)
A list of countries where this assset will be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase
Example:
[ "se", "dk", "fr", "us" ]
- showId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
In an episode viewable, you add this parameter to link the episode to the show viewable, that is how we find episodes connected to a Show. This is required for a viewable of kind 'episode'
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- season: (number)
On an episode viewable, you specify what season number this particular episode belongs to.
- episode: (number)
On an episode viewable, you specify what episode number this particular viewable has in the season specified.
- ratings: (array of ContentRating)
A list of content ratings connected to this viewable, one per rating system applicable
Items: ContentRating
- system: required(string)
- rating: required(string)
- reasons: (array of string)
- publish: (boolean)
Example:
{
"metadata": {
"kind": "movie",
"title": "Terminator"
},
"publish": false
}
HTTP status code 201
Viewable was successfully created
Body
Media type: application/json
Type: object
Properties- id: required(string)
- partnerId: required(string)
ID of partner
Example:
magine-pro-demo
- metadata: required(object)
Additional properties can be included beyond the ones listed below.
- kind: required(one of movie, program, episode, show, trailer, channel)
- title: required(string)
Master copy title
- synopsis: (string)
Master copy synopsis
- genres: (array of string)
Master copy genres, an array of strings
Example:
[ "Drama", "Romance", "Action" ]
- labels: (array of string)
An array of string labels, certain labels are added to the viewable automatically on update, such as pack/offer related labels.
- viewableWindowStart: (number)
Number of seconds since the epoch. Viewable will be available in the service from this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- viewableWindowEnd: (number)
Number of seconds since the epoch. Viewable will be available in the service until this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- countryBlacklist: (array of string)
A list of countries where this assset will not be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase.
Example:
[ "se", "dk", "fr", "us" ]
- countryWhitelist: (array of string)
A list of countries where this assset will be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase
Example:
[ "se", "dk", "fr", "us" ]
- showId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
In an episode viewable, you add this parameter to link the episode to the show viewable, that is how we find episodes connected to a Show. This is required for a viewable of kind 'episode'
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- season: (number)
On an episode viewable, you specify what season number this particular episode belongs to.
- episode: (number)
On an episode viewable, you specify what episode number this particular viewable has in the season specified.
- ratings: (array of ContentRating)
A list of content ratings connected to this viewable, one per rating system applicable
Items: ContentRating
- system: required(string)
- rating: required(string)
- reasons: (array of string)
- createdAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- publish: required(boolean)
- vods: (array of Vod)
Items: Vod
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for the transcoded asset.
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- source: required(string)
ID of partner
Example:
magine-pro-demo
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- status: required(one of imported, transcoding, transcoded, transcoding_error, import_error, deleted)
Status of the vod transcoding
- createdAt: (number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: (number)
Number of seconds since the epoch
Example:
1623920603
- rights: (object)
Special rights for the vod asset
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- offlineAvailable: required(boolean)
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
- publish: (boolean)
- vodPipeline: required(one of inhouse, mediaconvert)
What pipeline is responsible for the vod transcoding
- duration: (number)
Video duration in seconds
- viewableId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for a metadata asset.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- drmActivated: required(boolean)
- drmType: (one of normal, enhanced)
Describes which type of DRM should be used to do transcoding, if not set, defaults to normal.
Example:
normal
- subtitleLanguages: (array of string)
- subtitleTracks: (array of SubtitleTrack)
Items: SubtitleTrack
- language: required(string)
Three letter representation of language
Example:
swe
- subtitleType: required(one of normal, cc, forced_narrative)
The type of subtitle track
- language: required(string)
- audioLanguages: (array of string)
- sourceResolution: (object)
Dimensions of the video frame.
- width: required(integer - minimum: 640)
Width in pixels.
- height: required(integer - minimum: 480)
Height in pixels.
- width: required(integer - minimum: 640)
- audioChansPerLang: (array of object)
Items: items
- channels: required(number)
- language: required(string)
Example:
{ "assetId": "cac10231-b376-4493-b5ad-f27d95d9b8b3", "source": "magine-pro-demo", "sourceId": "mpl-moe-aac-platform-test-001", "status": "transcoded", "createdAt": 1623854732, "modifiedAt": 1623854927, "vodPipeline": "mediaconvert", "viewableId": "60bbb98e-2794-450b-9c8c-b1f022db7a60", "drmActivated": true, "drmType": "normal", "subtitleLanguages": [ "eng", "ell" ], "subtitleTracks": [ { "language": "eng", "subtitleType": "normal" }, { "language": "ell", "subtitleType": "normal" } ], "audioLanguages": [ "eng", "eng", "eng" ], "sourceResolution": { "width": 1920, "height": 1080 }, "audioChansPerLang": [ { "channels": 6, "language": "eng" } ] }
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- liveEvents: (array of LiveEvent)
Items: LiveEvent
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
Example:
{ "id": "afaa73a9-6891-4810-a66a-97d949275ce5", "startTimeUtc": 1568903400 }
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- broadcasts: (array of Broadcast)
Items: Broadcast
- id: required(string)
- sourceId: required(string)
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- stopTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupFrom: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupTo: required(number)
Number of seconds since the epoch
Example:
1623920603
- channelViewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
Unique id for a metadata asset. Most of the time it's a UUID, but for the live channels, the id consists of only digits for legacy reasons.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
- duration: required(number)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "sourceId": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "startTimeUtc": 1630542000, "stopTimeUtc": 1630545000, "catchupFrom": 1630542000, "catchupTo": 1631149800, "channelViewableId": "200064", "extendedRights": { "pause": true, "rewind": true, "fastForward": true }, "duration": 3000 }
- channelPlayable: (object)
- id: required(string)
- streamId: required(string)
- duration: required(number)
- verifyAge: required(boolean)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "200064", "streamId": "200064", "duration": 7200, "verifyAge": false, "extendedRights": { "pause": true, "rewind": true, "fastForward": true } }
Example:
{
"id": "60bbb98e-2794-450b-9c8c-b1f022db7a60",
"partnerId": "magine-pro-demo",
"metadata": {
"kind": "movie",
"title": "Demo movie",
"images": [
{
"type": "poster",
"filename": "https://images.eu-west-1.test.tvoli.com/i/magine-pro-demo/v/c346d955-3834-4d9e-a2d4-09a183328969.jpg"
}
],
"synopsis": "Descriptive text about the movie"
},
"createdAt": 1623853814,
"modifiedAt": 1623853814,
"publish": true
}
HTTP status code 409
Conflict on customId in Viewable metadata already exist in another viewable
Get a viewable
get /partner/viewables/custom/{customId}
Get a viewable
URI Parameters
- customId: required(string)
The custom id of the viewable
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Got a viewable back
Body
Media type: application/json
Type: object
Properties- id: required(string)
- partnerId: required(string)
ID of partner
Example:
magine-pro-demo
- metadata: required(object)
Additional properties can be included beyond the ones listed below.
- kind: required(one of movie, program, episode, show, trailer, channel)
- title: required(string)
Master copy title
- synopsis: (string)
Master copy synopsis
- genres: (array of string)
Master copy genres, an array of strings
Example:
[ "Drama", "Romance", "Action" ]
- labels: (array of string)
An array of string labels, certain labels are added to the viewable automatically on update, such as pack/offer related labels.
- viewableWindowStart: (number)
Number of seconds since the epoch. Viewable will be available in the service from this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- viewableWindowEnd: (number)
Number of seconds since the epoch. Viewable will be available in the service until this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- countryBlacklist: (array of string)
A list of countries where this assset will not be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase.
Example:
[ "se", "dk", "fr", "us" ]
- countryWhitelist: (array of string)
A list of countries where this assset will be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase
Example:
[ "se", "dk", "fr", "us" ]
- showId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
In an episode viewable, you add this parameter to link the episode to the show viewable, that is how we find episodes connected to a Show. This is required for a viewable of kind 'episode'
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- season: (number)
On an episode viewable, you specify what season number this particular episode belongs to.
- episode: (number)
On an episode viewable, you specify what episode number this particular viewable has in the season specified.
- ratings: (array of ContentRating)
A list of content ratings connected to this viewable, one per rating system applicable
Items: ContentRating
- system: required(string)
- rating: required(string)
- reasons: (array of string)
- createdAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- publish: required(boolean)
- vods: (array of Vod)
Items: Vod
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for the transcoded asset.
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- source: required(string)
ID of partner
Example:
magine-pro-demo
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- status: required(one of imported, transcoding, transcoded, transcoding_error, import_error, deleted)
Status of the vod transcoding
- createdAt: (number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: (number)
Number of seconds since the epoch
Example:
1623920603
- rights: (object)
Special rights for the vod asset
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- offlineAvailable: required(boolean)
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
- publish: (boolean)
- vodPipeline: required(one of inhouse, mediaconvert)
What pipeline is responsible for the vod transcoding
- duration: (number)
Video duration in seconds
- viewableId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for a metadata asset.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- drmActivated: required(boolean)
- drmType: (one of normal, enhanced)
Describes which type of DRM should be used to do transcoding, if not set, defaults to normal.
Example:
normal
- subtitleLanguages: (array of string)
- subtitleTracks: (array of SubtitleTrack)
Items: SubtitleTrack
- language: required(string)
Three letter representation of language
Example:
swe
- subtitleType: required(one of normal, cc, forced_narrative)
The type of subtitle track
- language: required(string)
- audioLanguages: (array of string)
- sourceResolution: (object)
Dimensions of the video frame.
- width: required(integer - minimum: 640)
Width in pixels.
- height: required(integer - minimum: 480)
Height in pixels.
- width: required(integer - minimum: 640)
- audioChansPerLang: (array of object)
Items: items
- channels: required(number)
- language: required(string)
Example:
{ "assetId": "cac10231-b376-4493-b5ad-f27d95d9b8b3", "source": "magine-pro-demo", "sourceId": "mpl-moe-aac-platform-test-001", "status": "transcoded", "createdAt": 1623854732, "modifiedAt": 1623854927, "vodPipeline": "mediaconvert", "viewableId": "60bbb98e-2794-450b-9c8c-b1f022db7a60", "drmActivated": true, "drmType": "normal", "subtitleLanguages": [ "eng", "ell" ], "subtitleTracks": [ { "language": "eng", "subtitleType": "normal" }, { "language": "ell", "subtitleType": "normal" } ], "audioLanguages": [ "eng", "eng", "eng" ], "sourceResolution": { "width": 1920, "height": 1080 }, "audioChansPerLang": [ { "channels": 6, "language": "eng" } ] }
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- liveEvents: (array of LiveEvent)
Items: LiveEvent
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
Example:
{ "id": "afaa73a9-6891-4810-a66a-97d949275ce5", "startTimeUtc": 1568903400 }
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- broadcasts: (array of Broadcast)
Items: Broadcast
- id: required(string)
- sourceId: required(string)
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- stopTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupFrom: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupTo: required(number)
Number of seconds since the epoch
Example:
1623920603
- channelViewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
Unique id for a metadata asset. Most of the time it's a UUID, but for the live channels, the id consists of only digits for legacy reasons.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
- duration: required(number)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "sourceId": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "startTimeUtc": 1630542000, "stopTimeUtc": 1630545000, "catchupFrom": 1630542000, "catchupTo": 1631149800, "channelViewableId": "200064", "extendedRights": { "pause": true, "rewind": true, "fastForward": true }, "duration": 3000 }
- channelPlayable: (object)
- id: required(string)
- streamId: required(string)
- duration: required(number)
- verifyAge: required(boolean)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "200064", "streamId": "200064", "duration": 7200, "verifyAge": false, "extendedRights": { "pause": true, "rewind": true, "fastForward": true } }
Example:
{
"id": "60bbb98e-2794-450b-9c8c-b1f022db7a60",
"partnerId": "magine-pro-demo",
"metadata": {
"kind": "movie",
"title": "Demo movie",
"images": [
{
"type": "poster",
"filename": "https://images.eu-west-1.test.tvoli.com/i/magine-pro-demo/v/c346d955-3834-4d9e-a2d4-09a183328969.jpg"
}
],
"synopsis": "Descriptive text about the movie"
},
"createdAt": 1623853814,
"modifiedAt": 1623853814,
"publish": true
}
HTTP status code 404
Viewable not found
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
Get a viewable
Update viewable metadata, metadata is fully replaced so include all fields in an update.
Update partial viewable metadata, the metadata sent in is completely replaced, values omitted are ignored. Images cant be updated with PATCH, instead use endpoint: /partner/viewables/{viewableId}/images/{imageType}
get /partner/viewables/{viewableId}
Get a viewable
URI Parameters
- viewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
The id of the viewable
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Got a viewable back
Body
Media type: application/json
Type: object
Properties- id: required(string)
- partnerId: required(string)
ID of partner
Example:
magine-pro-demo
- metadata: required(object)
Additional properties can be included beyond the ones listed below.
- kind: required(one of movie, program, episode, show, trailer, channel)
- title: required(string)
Master copy title
- synopsis: (string)
Master copy synopsis
- genres: (array of string)
Master copy genres, an array of strings
Example:
[ "Drama", "Romance", "Action" ]
- labels: (array of string)
An array of string labels, certain labels are added to the viewable automatically on update, such as pack/offer related labels.
- viewableWindowStart: (number)
Number of seconds since the epoch. Viewable will be available in the service from this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- viewableWindowEnd: (number)
Number of seconds since the epoch. Viewable will be available in the service until this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- countryBlacklist: (array of string)
A list of countries where this assset will not be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase.
Example:
[ "se", "dk", "fr", "us" ]
- countryWhitelist: (array of string)
A list of countries where this assset will be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase
Example:
[ "se", "dk", "fr", "us" ]
- showId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
In an episode viewable, you add this parameter to link the episode to the show viewable, that is how we find episodes connected to a Show. This is required for a viewable of kind 'episode'
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- season: (number)
On an episode viewable, you specify what season number this particular episode belongs to.
- episode: (number)
On an episode viewable, you specify what episode number this particular viewable has in the season specified.
- ratings: (array of ContentRating)
A list of content ratings connected to this viewable, one per rating system applicable
Items: ContentRating
- system: required(string)
- rating: required(string)
- reasons: (array of string)
- createdAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- publish: required(boolean)
- vods: (array of Vod)
Items: Vod
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for the transcoded asset.
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- source: required(string)
ID of partner
Example:
magine-pro-demo
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- status: required(one of imported, transcoding, transcoded, transcoding_error, import_error, deleted)
Status of the vod transcoding
- createdAt: (number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: (number)
Number of seconds since the epoch
Example:
1623920603
- rights: (object)
Special rights for the vod asset
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- offlineAvailable: required(boolean)
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
- publish: (boolean)
- vodPipeline: required(one of inhouse, mediaconvert)
What pipeline is responsible for the vod transcoding
- duration: (number)
Video duration in seconds
- viewableId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for a metadata asset.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- drmActivated: required(boolean)
- drmType: (one of normal, enhanced)
Describes which type of DRM should be used to do transcoding, if not set, defaults to normal.
Example:
normal
- subtitleLanguages: (array of string)
- subtitleTracks: (array of SubtitleTrack)
Items: SubtitleTrack
- language: required(string)
Three letter representation of language
Example:
swe
- subtitleType: required(one of normal, cc, forced_narrative)
The type of subtitle track
- language: required(string)
- audioLanguages: (array of string)
- sourceResolution: (object)
Dimensions of the video frame.
- width: required(integer - minimum: 640)
Width in pixels.
- height: required(integer - minimum: 480)
Height in pixels.
- width: required(integer - minimum: 640)
- audioChansPerLang: (array of object)
Items: items
- channels: required(number)
- language: required(string)
Example:
{ "assetId": "cac10231-b376-4493-b5ad-f27d95d9b8b3", "source": "magine-pro-demo", "sourceId": "mpl-moe-aac-platform-test-001", "status": "transcoded", "createdAt": 1623854732, "modifiedAt": 1623854927, "vodPipeline": "mediaconvert", "viewableId": "60bbb98e-2794-450b-9c8c-b1f022db7a60", "drmActivated": true, "drmType": "normal", "subtitleLanguages": [ "eng", "ell" ], "subtitleTracks": [ { "language": "eng", "subtitleType": "normal" }, { "language": "ell", "subtitleType": "normal" } ], "audioLanguages": [ "eng", "eng", "eng" ], "sourceResolution": { "width": 1920, "height": 1080 }, "audioChansPerLang": [ { "channels": 6, "language": "eng" } ] }
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- liveEvents: (array of LiveEvent)
Items: LiveEvent
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
Example:
{ "id": "afaa73a9-6891-4810-a66a-97d949275ce5", "startTimeUtc": 1568903400 }
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- broadcasts: (array of Broadcast)
Items: Broadcast
- id: required(string)
- sourceId: required(string)
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- stopTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupFrom: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupTo: required(number)
Number of seconds since the epoch
Example:
1623920603
- channelViewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
Unique id for a metadata asset. Most of the time it's a UUID, but for the live channels, the id consists of only digits for legacy reasons.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
- duration: required(number)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "sourceId": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "startTimeUtc": 1630542000, "stopTimeUtc": 1630545000, "catchupFrom": 1630542000, "catchupTo": 1631149800, "channelViewableId": "200064", "extendedRights": { "pause": true, "rewind": true, "fastForward": true }, "duration": 3000 }
- channelPlayable: (object)
- id: required(string)
- streamId: required(string)
- duration: required(number)
- verifyAge: required(boolean)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "200064", "streamId": "200064", "duration": 7200, "verifyAge": false, "extendedRights": { "pause": true, "rewind": true, "fastForward": true } }
Example:
{
"id": "60bbb98e-2794-450b-9c8c-b1f022db7a60",
"partnerId": "magine-pro-demo",
"metadata": {
"kind": "movie",
"title": "Demo movie",
"images": [
{
"type": "poster",
"filename": "https://images.eu-west-1.test.tvoli.com/i/magine-pro-demo/v/c346d955-3834-4d9e-a2d4-09a183328969.jpg"
}
],
"synopsis": "Descriptive text about the movie"
},
"createdAt": 1623853814,
"modifiedAt": 1623853814,
"publish": true
}
HTTP status code 404
Viewable not found
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
put /partner/viewables/{viewableId}
Update viewable metadata, metadata is fully replaced so include all fields in an update.
URI Parameters
- viewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
The id of the viewable
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Body
Media type: application/json
Type: object
Properties- metadata: required(object)
Additional properties can be included beyond the ones listed below.
- kind: required(one of movie, program, episode, show, trailer, channel)
- title: required(string)
Master copy title
- synopsis: (string)
Master copy synopsis
- genres: (array of string)
Master copy genres, an array of strings
Example:
[ "Drama", "Romance", "Action" ]
- labels: (array of string)
An array of string labels, certain labels are added to the viewable automatically on update, such as pack/offer related labels.
- viewableWindowStart: (number)
Number of seconds since the epoch. Viewable will be available in the service from this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- viewableWindowEnd: (number)
Number of seconds since the epoch. Viewable will be available in the service until this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- countryBlacklist: (array of string)
A list of countries where this assset will not be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase.
Example:
[ "se", "dk", "fr", "us" ]
- countryWhitelist: (array of string)
A list of countries where this assset will be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase
Example:
[ "se", "dk", "fr", "us" ]
- showId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
In an episode viewable, you add this parameter to link the episode to the show viewable, that is how we find episodes connected to a Show. This is required for a viewable of kind 'episode'
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- season: (number)
On an episode viewable, you specify what season number this particular episode belongs to.
- episode: (number)
On an episode viewable, you specify what episode number this particular viewable has in the season specified.
- ratings: (array of ContentRating)
A list of content ratings connected to this viewable, one per rating system applicable
Items: ContentRating
- system: required(string)
- rating: required(string)
- reasons: (array of string)
- publish: (boolean)
Example:
{
"metadata": {
"kind": "movie",
"title": "Terminator"
},
"publish": true
}
HTTP status code 200
Viewable was successfully updated
Body
Media type: application/json
Type: object
Properties- id: required(string)
- partnerId: required(string)
ID of partner
Example:
magine-pro-demo
- metadata: required(object)
Additional properties can be included beyond the ones listed below.
- kind: required(one of movie, program, episode, show, trailer, channel)
- title: required(string)
Master copy title
- synopsis: (string)
Master copy synopsis
- genres: (array of string)
Master copy genres, an array of strings
Example:
[ "Drama", "Romance", "Action" ]
- labels: (array of string)
An array of string labels, certain labels are added to the viewable automatically on update, such as pack/offer related labels.
- viewableWindowStart: (number)
Number of seconds since the epoch. Viewable will be available in the service from this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- viewableWindowEnd: (number)
Number of seconds since the epoch. Viewable will be available in the service until this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- countryBlacklist: (array of string)
A list of countries where this assset will not be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase.
Example:
[ "se", "dk", "fr", "us" ]
- countryWhitelist: (array of string)
A list of countries where this assset will be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase
Example:
[ "se", "dk", "fr", "us" ]
- showId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
In an episode viewable, you add this parameter to link the episode to the show viewable, that is how we find episodes connected to a Show. This is required for a viewable of kind 'episode'
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- season: (number)
On an episode viewable, you specify what season number this particular episode belongs to.
- episode: (number)
On an episode viewable, you specify what episode number this particular viewable has in the season specified.
- ratings: (array of ContentRating)
A list of content ratings connected to this viewable, one per rating system applicable
Items: ContentRating
- system: required(string)
- rating: required(string)
- reasons: (array of string)
- createdAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- publish: required(boolean)
- vods: (array of Vod)
Items: Vod
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for the transcoded asset.
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- source: required(string)
ID of partner
Example:
magine-pro-demo
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- status: required(one of imported, transcoding, transcoded, transcoding_error, import_error, deleted)
Status of the vod transcoding
- createdAt: (number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: (number)
Number of seconds since the epoch
Example:
1623920603
- rights: (object)
Special rights for the vod asset
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- offlineAvailable: required(boolean)
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
- publish: (boolean)
- vodPipeline: required(one of inhouse, mediaconvert)
What pipeline is responsible for the vod transcoding
- duration: (number)
Video duration in seconds
- viewableId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for a metadata asset.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- drmActivated: required(boolean)
- drmType: (one of normal, enhanced)
Describes which type of DRM should be used to do transcoding, if not set, defaults to normal.
Example:
normal
- subtitleLanguages: (array of string)
- subtitleTracks: (array of SubtitleTrack)
Items: SubtitleTrack
- language: required(string)
Three letter representation of language
Example:
swe
- subtitleType: required(one of normal, cc, forced_narrative)
The type of subtitle track
- language: required(string)
- audioLanguages: (array of string)
- sourceResolution: (object)
Dimensions of the video frame.
- width: required(integer - minimum: 640)
Width in pixels.
- height: required(integer - minimum: 480)
Height in pixels.
- width: required(integer - minimum: 640)
- audioChansPerLang: (array of object)
Items: items
- channels: required(number)
- language: required(string)
Example:
{ "assetId": "cac10231-b376-4493-b5ad-f27d95d9b8b3", "source": "magine-pro-demo", "sourceId": "mpl-moe-aac-platform-test-001", "status": "transcoded", "createdAt": 1623854732, "modifiedAt": 1623854927, "vodPipeline": "mediaconvert", "viewableId": "60bbb98e-2794-450b-9c8c-b1f022db7a60", "drmActivated": true, "drmType": "normal", "subtitleLanguages": [ "eng", "ell" ], "subtitleTracks": [ { "language": "eng", "subtitleType": "normal" }, { "language": "ell", "subtitleType": "normal" } ], "audioLanguages": [ "eng", "eng", "eng" ], "sourceResolution": { "width": 1920, "height": 1080 }, "audioChansPerLang": [ { "channels": 6, "language": "eng" } ] }
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- liveEvents: (array of LiveEvent)
Items: LiveEvent
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
Example:
{ "id": "afaa73a9-6891-4810-a66a-97d949275ce5", "startTimeUtc": 1568903400 }
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- broadcasts: (array of Broadcast)
Items: Broadcast
- id: required(string)
- sourceId: required(string)
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- stopTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupFrom: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupTo: required(number)
Number of seconds since the epoch
Example:
1623920603
- channelViewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
Unique id for a metadata asset. Most of the time it's a UUID, but for the live channels, the id consists of only digits for legacy reasons.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
- duration: required(number)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "sourceId": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "startTimeUtc": 1630542000, "stopTimeUtc": 1630545000, "catchupFrom": 1630542000, "catchupTo": 1631149800, "channelViewableId": "200064", "extendedRights": { "pause": true, "rewind": true, "fastForward": true }, "duration": 3000 }
- channelPlayable: (object)
- id: required(string)
- streamId: required(string)
- duration: required(number)
- verifyAge: required(boolean)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "200064", "streamId": "200064", "duration": 7200, "verifyAge": false, "extendedRights": { "pause": true, "rewind": true, "fastForward": true } }
Example:
{
"id": "60bbb98e-2794-450b-9c8c-b1f022db7a60",
"partnerId": "magine-pro-demo",
"metadata": {
"kind": "movie",
"title": "Demo movie",
"images": [
{
"type": "poster",
"filename": "https://images.eu-west-1.test.tvoli.com/i/magine-pro-demo/v/c346d955-3834-4d9e-a2d4-09a183328969.jpg"
}
],
"synopsis": "Descriptive text about the movie"
},
"createdAt": 1623853814,
"modifiedAt": 1623853814,
"publish": true
}
HTTP status code 404
Viewable not found
HTTP status code 409
Conflict on customId in Viewable metadata already exist in another viewable
patch /partner/viewables/{viewableId}
Update partial viewable metadata, the metadata sent in is completely replaced, values omitted are ignored. Images cant be updated with PATCH, instead use endpoint: /partner/viewables/{viewableId}/images/{imageType}
URI Parameters
- viewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
The id of the viewable
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Body
Media type: application/json
Type: object
Properties- patch: required(object)
Partial viewable metadata update, to update one or a few of metadata fields in a viewable.
- title: (string)
Master copy title
- synopsis: (string)
Master copy synopsis
- genres: (array of string)
Master copy genres, an array of strings
Example:
[ "Drama", "Romance", "Action" ]
- labels: (array of string)
An array of string labels, certain labels are added to the viewable automatically on update, such as pack/offer related labels.
- viewableWindowStart: (number)
Number of seconds since the epoch. Viewable will be available in the service from this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- viewableWindowEnd: (number)
Number of seconds since the epoch. Viewable will be available in the service until this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- countryBlacklist: (array of string)
A list of countries where this assset will not be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase.
Example:
[ "se", "dk", "fr", "us" ]
- countryWhitelist: (array of string)
A list of countries where this assset will be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase
Example:
[ "se", "dk", "fr", "us" ]
- showId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
In an episode viewable, you add this parameter to link the episode to the show viewable, that is how we find episodes connected to a Show. This is required for a viewable of kind 'episode'
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- season: (number)
On an episode viewable, you specify what season number this particular episode belongs to.
- episode: (number)
On an episode viewable, you specify what episode number this particular viewable has in the season specified.
- ratings: (array of ContentRating)
A list of content ratings connected to this viewable, one per rating system applicable
Items: ContentRating
- system: required(string)
- rating: required(string)
- reasons: (array of string)
- title: (string)
Example:
{
"patch": {
"title": "Terminator",
"synopsis": "A movie about the future",
"labels": ["action", "sci-fi"]
}
}
HTTP status code 200
Viewable was successfully updated
Body
Media type: application/json
Type: object
Properties- id: required(string)
- partnerId: required(string)
ID of partner
Example:
magine-pro-demo
- metadata: required(object)
Additional properties can be included beyond the ones listed below.
- kind: required(one of movie, program, episode, show, trailer, channel)
- title: required(string)
Master copy title
- synopsis: (string)
Master copy synopsis
- genres: (array of string)
Master copy genres, an array of strings
Example:
[ "Drama", "Romance", "Action" ]
- labels: (array of string)
An array of string labels, certain labels are added to the viewable automatically on update, such as pack/offer related labels.
- viewableWindowStart: (number)
Number of seconds since the epoch. Viewable will be available in the service from this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- viewableWindowEnd: (number)
Number of seconds since the epoch. Viewable will be available in the service until this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- countryBlacklist: (array of string)
A list of countries where this assset will not be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase.
Example:
[ "se", "dk", "fr", "us" ]
- countryWhitelist: (array of string)
A list of countries where this assset will be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase
Example:
[ "se", "dk", "fr", "us" ]
- showId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
In an episode viewable, you add this parameter to link the episode to the show viewable, that is how we find episodes connected to a Show. This is required for a viewable of kind 'episode'
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- season: (number)
On an episode viewable, you specify what season number this particular episode belongs to.
- episode: (number)
On an episode viewable, you specify what episode number this particular viewable has in the season specified.
- ratings: (array of ContentRating)
A list of content ratings connected to this viewable, one per rating system applicable
Items: ContentRating
- system: required(string)
- rating: required(string)
- reasons: (array of string)
- createdAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- publish: required(boolean)
- vods: (array of Vod)
Items: Vod
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for the transcoded asset.
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- source: required(string)
ID of partner
Example:
magine-pro-demo
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- status: required(one of imported, transcoding, transcoded, transcoding_error, import_error, deleted)
Status of the vod transcoding
- createdAt: (number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: (number)
Number of seconds since the epoch
Example:
1623920603
- rights: (object)
Special rights for the vod asset
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- offlineAvailable: required(boolean)
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
- publish: (boolean)
- vodPipeline: required(one of inhouse, mediaconvert)
What pipeline is responsible for the vod transcoding
- duration: (number)
Video duration in seconds
- viewableId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for a metadata asset.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- drmActivated: required(boolean)
- drmType: (one of normal, enhanced)
Describes which type of DRM should be used to do transcoding, if not set, defaults to normal.
Example:
normal
- subtitleLanguages: (array of string)
- subtitleTracks: (array of SubtitleTrack)
Items: SubtitleTrack
- language: required(string)
Three letter representation of language
Example:
swe
- subtitleType: required(one of normal, cc, forced_narrative)
The type of subtitle track
- language: required(string)
- audioLanguages: (array of string)
- sourceResolution: (object)
Dimensions of the video frame.
- width: required(integer - minimum: 640)
Width in pixels.
- height: required(integer - minimum: 480)
Height in pixels.
- width: required(integer - minimum: 640)
- audioChansPerLang: (array of object)
Items: items
- channels: required(number)
- language: required(string)
Example:
{ "assetId": "cac10231-b376-4493-b5ad-f27d95d9b8b3", "source": "magine-pro-demo", "sourceId": "mpl-moe-aac-platform-test-001", "status": "transcoded", "createdAt": 1623854732, "modifiedAt": 1623854927, "vodPipeline": "mediaconvert", "viewableId": "60bbb98e-2794-450b-9c8c-b1f022db7a60", "drmActivated": true, "drmType": "normal", "subtitleLanguages": [ "eng", "ell" ], "subtitleTracks": [ { "language": "eng", "subtitleType": "normal" }, { "language": "ell", "subtitleType": "normal" } ], "audioLanguages": [ "eng", "eng", "eng" ], "sourceResolution": { "width": 1920, "height": 1080 }, "audioChansPerLang": [ { "channels": 6, "language": "eng" } ] }
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- liveEvents: (array of LiveEvent)
Items: LiveEvent
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
Example:
{ "id": "afaa73a9-6891-4810-a66a-97d949275ce5", "startTimeUtc": 1568903400 }
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- broadcasts: (array of Broadcast)
Items: Broadcast
- id: required(string)
- sourceId: required(string)
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- stopTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupFrom: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupTo: required(number)
Number of seconds since the epoch
Example:
1623920603
- channelViewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
Unique id for a metadata asset. Most of the time it's a UUID, but for the live channels, the id consists of only digits for legacy reasons.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
- duration: required(number)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "sourceId": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "startTimeUtc": 1630542000, "stopTimeUtc": 1630545000, "catchupFrom": 1630542000, "catchupTo": 1631149800, "channelViewableId": "200064", "extendedRights": { "pause": true, "rewind": true, "fastForward": true }, "duration": 3000 }
- channelPlayable: (object)
- id: required(string)
- streamId: required(string)
- duration: required(number)
- verifyAge: required(boolean)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "200064", "streamId": "200064", "duration": 7200, "verifyAge": false, "extendedRights": { "pause": true, "rewind": true, "fastForward": true } }
Example:
{
"id": "60bbb98e-2794-450b-9c8c-b1f022db7a60",
"partnerId": "magine-pro-demo",
"metadata": {
"kind": "movie",
"title": "Demo movie",
"images": [
{
"type": "poster",
"filename": "https://images.eu-west-1.test.tvoli.com/i/magine-pro-demo/v/c346d955-3834-4d9e-a2d4-09a183328969.jpg"
}
],
"synopsis": "Descriptive text about the movie"
},
"createdAt": 1623853814,
"modifiedAt": 1623853814,
"publish": true
}
HTTP status code 404
Viewable not found
HTTP status code 409
Conflict on customId in Viewable metadata already exist in another viewable
Add or replace image for a viewable
Remove image from viewable
put /partner/viewables/{viewableId}/images/{imageType}
Add or replace image for a viewable
URI Parameters
- viewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
The id of the viewable
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
- imageType: required(string)
The type of image to handle
Examples:
poster:
poster
sixteen-nine:
sixteen-nine
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Body
Media type: application/json
Possible types:
S3ImageSource
- sourceType: required(s3)
- bucket: required(string)
Bucket to download image from
- objectKey: required(string)
Path/filename in bucket to download file from
HttpImageSource
- sourceType: required(http)
- uri: required(string)
Http url to a publicly available image to download
Examples:
Image stored on S3:
{
"sourceType": "s3",
"bucket": "com-magine-partners-my-partner",
"objectKey": "vods/my-movie/poster.jpg"
}
Image at an http url:
{
"sourceType": "http",
"uri": "https://example.com/images/my-movie-poster.jpg"
}
HTTP status code 200
Successfully added image
Body
Media type: application/json
Type: object
Properties- id: required(string)
- partnerId: required(string)
ID of partner
Example:
magine-pro-demo
- metadata: required(object)
Additional properties can be included beyond the ones listed below.
- kind: required(one of movie, program, episode, show, trailer, channel)
- title: required(string)
Master copy title
- synopsis: (string)
Master copy synopsis
- genres: (array of string)
Master copy genres, an array of strings
Example:
[ "Drama", "Romance", "Action" ]
- labels: (array of string)
An array of string labels, certain labels are added to the viewable automatically on update, such as pack/offer related labels.
- viewableWindowStart: (number)
Number of seconds since the epoch. Viewable will be available in the service from this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- viewableWindowEnd: (number)
Number of seconds since the epoch. Viewable will be available in the service until this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- countryBlacklist: (array of string)
A list of countries where this assset will not be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase.
Example:
[ "se", "dk", "fr", "us" ]
- countryWhitelist: (array of string)
A list of countries where this assset will be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase
Example:
[ "se", "dk", "fr", "us" ]
- showId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
In an episode viewable, you add this parameter to link the episode to the show viewable, that is how we find episodes connected to a Show. This is required for a viewable of kind 'episode'
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- season: (number)
On an episode viewable, you specify what season number this particular episode belongs to.
- episode: (number)
On an episode viewable, you specify what episode number this particular viewable has in the season specified.
- ratings: (array of ContentRating)
A list of content ratings connected to this viewable, one per rating system applicable
Items: ContentRating
- system: required(string)
- rating: required(string)
- reasons: (array of string)
- createdAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- publish: required(boolean)
- vods: (array of Vod)
Items: Vod
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for the transcoded asset.
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- source: required(string)
ID of partner
Example:
magine-pro-demo
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- status: required(one of imported, transcoding, transcoded, transcoding_error, import_error, deleted)
Status of the vod transcoding
- createdAt: (number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: (number)
Number of seconds since the epoch
Example:
1623920603
- rights: (object)
Special rights for the vod asset
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- offlineAvailable: required(boolean)
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
- publish: (boolean)
- vodPipeline: required(one of inhouse, mediaconvert)
What pipeline is responsible for the vod transcoding
- duration: (number)
Video duration in seconds
- viewableId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for a metadata asset.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- drmActivated: required(boolean)
- drmType: (one of normal, enhanced)
Describes which type of DRM should be used to do transcoding, if not set, defaults to normal.
Example:
normal
- subtitleLanguages: (array of string)
- subtitleTracks: (array of SubtitleTrack)
Items: SubtitleTrack
- language: required(string)
Three letter representation of language
Example:
swe
- subtitleType: required(one of normal, cc, forced_narrative)
The type of subtitle track
- language: required(string)
- audioLanguages: (array of string)
- sourceResolution: (object)
Dimensions of the video frame.
- width: required(integer - minimum: 640)
Width in pixels.
- height: required(integer - minimum: 480)
Height in pixels.
- width: required(integer - minimum: 640)
- audioChansPerLang: (array of object)
Items: items
- channels: required(number)
- language: required(string)
Example:
{ "assetId": "cac10231-b376-4493-b5ad-f27d95d9b8b3", "source": "magine-pro-demo", "sourceId": "mpl-moe-aac-platform-test-001", "status": "transcoded", "createdAt": 1623854732, "modifiedAt": 1623854927, "vodPipeline": "mediaconvert", "viewableId": "60bbb98e-2794-450b-9c8c-b1f022db7a60", "drmActivated": true, "drmType": "normal", "subtitleLanguages": [ "eng", "ell" ], "subtitleTracks": [ { "language": "eng", "subtitleType": "normal" }, { "language": "ell", "subtitleType": "normal" } ], "audioLanguages": [ "eng", "eng", "eng" ], "sourceResolution": { "width": 1920, "height": 1080 }, "audioChansPerLang": [ { "channels": 6, "language": "eng" } ] }
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- liveEvents: (array of LiveEvent)
Items: LiveEvent
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
Example:
{ "id": "afaa73a9-6891-4810-a66a-97d949275ce5", "startTimeUtc": 1568903400 }
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- broadcasts: (array of Broadcast)
Items: Broadcast
- id: required(string)
- sourceId: required(string)
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- stopTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupFrom: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupTo: required(number)
Number of seconds since the epoch
Example:
1623920603
- channelViewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
Unique id for a metadata asset. Most of the time it's a UUID, but for the live channels, the id consists of only digits for legacy reasons.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
- duration: required(number)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "sourceId": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "startTimeUtc": 1630542000, "stopTimeUtc": 1630545000, "catchupFrom": 1630542000, "catchupTo": 1631149800, "channelViewableId": "200064", "extendedRights": { "pause": true, "rewind": true, "fastForward": true }, "duration": 3000 }
- channelPlayable: (object)
- id: required(string)
- streamId: required(string)
- duration: required(number)
- verifyAge: required(boolean)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "200064", "streamId": "200064", "duration": 7200, "verifyAge": false, "extendedRights": { "pause": true, "rewind": true, "fastForward": true } }
Example:
{
"id": "60bbb98e-2794-450b-9c8c-b1f022db7a60",
"partnerId": "magine-pro-demo",
"metadata": {
"kind": "movie",
"title": "Demo movie",
"images": [
{
"type": "poster",
"filename": "https://images.eu-west-1.test.tvoli.com/i/magine-pro-demo/v/c346d955-3834-4d9e-a2d4-09a183328969.jpg"
}
],
"synopsis": "Descriptive text about the movie"
},
"createdAt": 1623853814,
"modifiedAt": 1623853814,
"publish": true
}
HTTP status code 400
BadRequest - Bad request, the image key does not exist in S3 bucket
HTTP status code 404
Viewable doesn't exist, nothing is done
HTTP status code 500
Internal server error - metadata in present viewable does not validate
delete /partner/viewables/{viewableId}/images/{imageType}
Remove image from viewable
URI Parameters
- viewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
The id of the viewable
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
- imageType: required(string)
The type of image to handle
Examples:
poster:
poster
sixteen-nine:
sixteen-nine
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Successfully removed image from viewable (or if image type dont exist, it will still return 200)
Body
Media type: application/json
Type: object
Properties- id: required(string)
- partnerId: required(string)
ID of partner
Example:
magine-pro-demo
- metadata: required(object)
Additional properties can be included beyond the ones listed below.
- kind: required(one of movie, program, episode, show, trailer, channel)
- title: required(string)
Master copy title
- synopsis: (string)
Master copy synopsis
- genres: (array of string)
Master copy genres, an array of strings
Example:
[ "Drama", "Romance", "Action" ]
- labels: (array of string)
An array of string labels, certain labels are added to the viewable automatically on update, such as pack/offer related labels.
- viewableWindowStart: (number)
Number of seconds since the epoch. Viewable will be available in the service from this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- viewableWindowEnd: (number)
Number of seconds since the epoch. Viewable will be available in the service until this timestamp as long as the publish flag is set to true. If publish flag is set to false this setting is ignored.
Example:
1623920603
- countryBlacklist: (array of string)
A list of countries where this assset will not be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase.
Example:
[ "se", "dk", "fr", "us" ]
- countryWhitelist: (array of string)
A list of countries where this assset will be available in. The check is done using a GeoIP. The country string should be in the ISO 3166-1 alpha-2 format and in lowercase
Example:
[ "se", "dk", "fr", "us" ]
- showId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
In an episode viewable, you add this parameter to link the episode to the show viewable, that is how we find episodes connected to a Show. This is required for a viewable of kind 'episode'
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- season: (number)
On an episode viewable, you specify what season number this particular episode belongs to.
- episode: (number)
On an episode viewable, you specify what episode number this particular viewable has in the season specified.
- ratings: (array of ContentRating)
A list of content ratings connected to this viewable, one per rating system applicable
Items: ContentRating
- system: required(string)
- rating: required(string)
- reasons: (array of string)
- createdAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- publish: required(boolean)
- vods: (array of Vod)
Items: Vod
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for the transcoded asset.
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- source: required(string)
ID of partner
Example:
magine-pro-demo
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- status: required(one of imported, transcoding, transcoded, transcoding_error, import_error, deleted)
Status of the vod transcoding
- createdAt: (number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: (number)
Number of seconds since the epoch
Example:
1623920603
- rights: (object)
Special rights for the vod asset
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- offlineAvailable: required(boolean)
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
- publish: (boolean)
- vodPipeline: required(one of inhouse, mediaconvert)
What pipeline is responsible for the vod transcoding
- duration: (number)
Video duration in seconds
- viewableId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for a metadata asset.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- drmActivated: required(boolean)
- drmType: (one of normal, enhanced)
Describes which type of DRM should be used to do transcoding, if not set, defaults to normal.
Example:
normal
- subtitleLanguages: (array of string)
- subtitleTracks: (array of SubtitleTrack)
Items: SubtitleTrack
- language: required(string)
Three letter representation of language
Example:
swe
- subtitleType: required(one of normal, cc, forced_narrative)
The type of subtitle track
- language: required(string)
- audioLanguages: (array of string)
- sourceResolution: (object)
Dimensions of the video frame.
- width: required(integer - minimum: 640)
Width in pixels.
- height: required(integer - minimum: 480)
Height in pixels.
- width: required(integer - minimum: 640)
- audioChansPerLang: (array of object)
Items: items
- channels: required(number)
- language: required(string)
Example:
{ "assetId": "cac10231-b376-4493-b5ad-f27d95d9b8b3", "source": "magine-pro-demo", "sourceId": "mpl-moe-aac-platform-test-001", "status": "transcoded", "createdAt": 1623854732, "modifiedAt": 1623854927, "vodPipeline": "mediaconvert", "viewableId": "60bbb98e-2794-450b-9c8c-b1f022db7a60", "drmActivated": true, "drmType": "normal", "subtitleLanguages": [ "eng", "ell" ], "subtitleTracks": [ { "language": "eng", "subtitleType": "normal" }, { "language": "ell", "subtitleType": "normal" } ], "audioLanguages": [ "eng", "eng", "eng" ], "sourceResolution": { "width": 1920, "height": 1080 }, "audioChansPerLang": [ { "channels": 6, "language": "eng" } ] }
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- liveEvents: (array of LiveEvent)
Items: LiveEvent
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
Example:
{ "id": "afaa73a9-6891-4810-a66a-97d949275ce5", "startTimeUtc": 1568903400 }
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
- broadcasts: (array of Broadcast)
Items: Broadcast
- id: required(string)
- sourceId: required(string)
- startTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- stopTimeUtc: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupFrom: required(number)
Number of seconds since the epoch
Example:
1623920603
- catchupTo: required(number)
Number of seconds since the epoch
Example:
1623920603
- channelViewableId: required(string - pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9]+)$)
Unique id for a metadata asset. Most of the time it's a UUID, but for the live channels, the id consists of only digits for legacy reasons.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
channel id:
200001
- duration: required(number)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "sourceId": "4c15071e-ff7a-462a-b608-bf1a56c4727f", "startTimeUtc": 1630542000, "stopTimeUtc": 1630545000, "catchupFrom": 1630542000, "catchupTo": 1631149800, "channelViewableId": "200064", "extendedRights": { "pause": true, "rewind": true, "fastForward": true }, "duration": 3000 }
- channelPlayable: (object)
- id: required(string)
- streamId: required(string)
- duration: required(number)
- verifyAge: required(boolean)
- extendedRights: required(object)
- pause: required(boolean)
- rewind: required(boolean)
- fastForward: required(boolean)
Example:
{ "pause": true, "rewind": true, "fastForward": true }
Example:
{ "id": "200064", "streamId": "200064", "duration": 7200, "verifyAge": false, "extendedRights": { "pause": true, "rewind": true, "fastForward": true } }
Example:
{
"id": "60bbb98e-2794-450b-9c8c-b1f022db7a60",
"partnerId": "magine-pro-demo",
"metadata": {
"kind": "movie",
"title": "Demo movie",
"images": [
{
"type": "poster",
"filename": "https://images.eu-west-1.test.tvoli.com/i/magine-pro-demo/v/c346d955-3834-4d9e-a2d4-09a183328969.jpg"
}
],
"synopsis": "Descriptive text about the movie"
},
"createdAt": 1623853814,
"modifiedAt": 1623853814,
"publish": true
}
HTTP status code 404
Viewable doesn't exist, nothing is done
HTTP status code 500
Internal server error - metadata in present viewable does not validate
get partner configured rating systems
get /partner/parental-control/rating-systems
get partner configured rating systems
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
List all rating systems that partner has configured
Body
Media type: application/json
Type: object
Properties- ratingSystems: required(array of RatingSystem)
Items: RatingSystem
- id: required(string)
- name: required(string)
- country: required(string)
An ISO 3166-1 alpha-2 country code. Uppercase is preferred but the property is case-insensitive.
Example:
Sweden:
SE
- ratings: required(array of array)
Example:
{
"ratingSystems": [
{
"id": "sm-sa",
"name": "The Swedish Media Councils classification system ",
"country": "SE",
"ratings": [
[
{
"id": "btl",
"name": "Btl",
"description": "All ages"
}
],
[
{
"id": "7",
"name": "7",
"description": "Recommended from the age of 7"
}
],
[
{
"id": "11",
"name": "11",
"description": "Recommended from the age of 11"
}
],
[
{
"id": "15",
"name": "15",
"description": "Recommended from the age of 15"
}
],
[
{
"id": "18",
"name": "18",
"description": "Not suited for children"
}
]
]
}
]
}
HTTP status code 400
BadRequest - Partner is not configured for parental control
HTTP status code 500
Internal server errror - Internal server error. Trace ID 098765
get rating system by Id
get /partner/parental-control/rating-system/{ratingSystemId}
get rating system by Id
URI Parameters
- ratingSystemId: required(string)
The id of the rating system
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
lookup rating system by Id
Body
Media type: application/json
Type: object
Properties- ratingSystem: required(object)
- id: required(string)
- name: required(string)
- country: required(string)
An ISO 3166-1 alpha-2 country code. Uppercase is preferred but the property is case-insensitive.
Example:
Sweden:
SE
- ratings: required(array of array)
Example:
{
"ratingSystem":
{
"id": "sm-sa",
"name": "The Swedish Media Councils classification system ",
"country": "SE",
"ratings": [
[
{
"id": "btl",
"name": "Btl",
"description": "All ages"
}
],
[
{
"id": "7",
"name": "7",
"description": "Recommended from the age of 7"
}
],
[
{
"id": "11",
"name": "11",
"description": "Recommended from the age of 11"
}
],
[
{
"id": "15",
"name": "15",
"description": "Recommended from the age of 15"
}
],
[
{
"id": "18",
"name": "18",
"description": "Not suited for children"
}
]
]
}
}
HTTP status code 404
NotFound - Rating system not found
HTTP status code 500
Internal server errror - Internal server error. Trace ID 098765
Lookup existing User by email.
post /partner/users/lookup
Lookup existing User by email.
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Body
Media type: application/json
Type: object
Properties- email: required(string)
Should be a valid email address. The user uses this e-mail address to log in through Magine Pro clients.
Example:
{
"email": "example@maginepro.com"
}
HTTP status code 200
Found existing User associated with provided email.
Body
Media type: application/json
Type: object
Properties- userId: required(string)
HTTP status code 400
BadRequest - Bad request, either fields are missing or badly formatted.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User not found
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
Create a User from request body
post /partner/users
Create a User from request body
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Body
Media type: application/json
Type: object
Properties- email: required(string)
Should be a valid email address. The user uses this e-mail address to log in through Magine Pro clients. It is also used by Magine Pro for e-mail send outs.
- countryCode: required(string)
An ISO 3166-1 alpha-2 country code. Uppercase is preferred but the property is case-insensitive.
Example:
Sweden:
SE
- name: (string)
Free-form text for the user's name. It is used in the applications and when communicating with the user (such as through email).
- locale: (string)
- birthDate: (date-only)
Example:
2001-02-23
- zipCode: (string)
- gender: (string)
Example:
{
"email": "example@maginepro.com",
"countryCode": "SE",
"name": "John Doe",
"locale": "sv",
"birthDate": "2001-02-23",
"zipCode": "11106",
"gender": "male"
}
HTTP status code 201
User was created (provisioned) in the platform.
Body
Media type: application/json
Type: object
Properties- userId: required(string)
Example:
{
"userId": "1YJO25UNWH2UZB6K9BRWQMECQUSR"
}
HTTP status code 400
Bad request, either fields are missing or badly formatted.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 409
There already exists a user with the provided email address.
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
Create a login JWT to authorize requests with the Magine Client API.
post /partner/users/{userId}/auth
Create a login JWT to authorize requests with the Magine Client API.
URI Parameters
- userId: required(string)
User ID
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Successfully created a login JWT.
Body
Media type: application/json
Type: object
Properties- token: required(string)
JWT proof that a user is signed in. The default TTL is 72 hours. This is used to authenticate requests to the Magine Pro Client API by passing the Authorization header with the contents
Bearer <JWT>
.
HTTP status code 400
Bad request, either fields are missing or badly formatted.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User not found
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
Invalidate user's all JWTs.
post /partner/users/{userId}/logout-all-devices
Invalidate user's all JWTs.
URI Parameters
- userId: required(string)
ID of the user to authenticate as
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 202
Successfully invalidated user's all JWTs.
HTTP status code 400
Bad request, user Id badly formatted.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User not found
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
Set a password for a user.
put /partner/users/{userId}/password
Set a password for a user.
URI Parameters
- userId: required(string)
User ID
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Body
Media type: application/json
Type: object
Properties- password: required(string)
Example:
{
"password": "atsart$WFQ%artrsat987"
}
HTTP status code 200
Successfully set password.
HTTP status code 400
Bad request, either fields are missing or badly formatted.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User not found
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
Get existing User by UserId.
Patch user properties
Delete a user by ID, any active entitlements will be cancelled..
get /partner/users/{userId}
Get existing User by UserId.
URI Parameters
- userId: required(string)
User ID
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Found existing User with provided user id.
Body
Media type: application/json
Type: object
Properties- user: required(object)
- userId: required(string)
- country: required(string)
An ISO 3166-1 alpha-2 country code. Uppercase is preferred but the property is case-insensitive.
Example:
Sweden:
SE
- createdTimestamp: (number)
Number of seconds since the epoch
Example:
1623920603
- locale: (string)
- email: (string)
- name: (string)
- zipCode: (string)
- gender: (string)
HTTP status code 400
BadRequest - Bad request, either fields are missing or badly formatted.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User not found
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
patch /partner/users/{userId}
Patch user properties
URI Parameters
- userId: required(string)
User ID
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Body
Media type: application/json
Type: object
Properties- email: (string)
- name: (string)
Free-form text for the user's name. It is used in the applications and when communicating with the user (such as through email).
- locale: (string)
- zipCode: (string)
- gender: (string)
Example:
{
"email": "example@maginepro.com",
"name": "John Doe",
"locale": "sv",
"zipCode": "11101",
"gender": "male"
}
HTTP status code 204
User patch was applied successfully.
HTTP status code 400
Bad request, either fields are missing or badly formatted.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User was not found.
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
delete /partner/users/{userId}
Delete a user by ID, any active entitlements will be cancelled..
URI Parameters
- userId: required(string)
User ID
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 204
Successfully deleted specified user.
HTTP status code 400
Bad request, either fields are missing or badly formatted.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User not found
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
List offers to which the user is entitled.
create entitlement according to input
get /partner/users/{userId}/entitlements
List offers to which the user is entitled.
URI Parameters
- userId: required(string)
User ID
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- entitlements: (array of OfferEntitlementOutput)
Items: OfferEntitlementOutput
- offerId: required(string)
- purchasedAt: required(datetime)
- expiry: (datetime)
- offerType: required(string)
- source: (string)
- message: (string)
HTTP status code 400
BadRequest - Bad request, Invalid user id format.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User not found.
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
post /partner/users/{userId}/entitlements
create entitlement according to input
URI Parameters
- userId: required(string)
User ID
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Body
Media type: application/json
Type: array of object
Items: OfferEntitlementCreationInput
- offerId: required(string)
- purchasedAt: (datetime)
if value is provided, it needs to be in the past
- expiry: (datetime)
if value is provided, it needs to be in the future
- message: (string)
HTTP status code 201
entitlement(s) created successfully
Body
Media type: application/json
Type: object
Properties- results: required(array of OfferEntitlementCreationResult)
Items: OfferEntitlementCreationResult
- offerId: required(string)
- successOutput: (object)
- offerId: required(string)
- offerType: required(string)
- purchasedAt: required(datetime)
- expiry: (datetime)
- failureMessage: (string)
HTTP status code 207
Multi-Status - Indicates a mixture of success & failure responses
Body
Media type: application/json
Type: object
Properties- results: required(array of OfferEntitlementCreationResult)
Items: OfferEntitlementCreationResult
- offerId: required(string)
- successOutput: (object)
- offerId: required(string)
- offerType: required(string)
- purchasedAt: required(datetime)
- expiry: (datetime)
- failureMessage: (string)
HTTP status code 400
BadRequest - Bad request, Invalid user id format or Invalid Input or Pack entitled already or Offer entitled already
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User not found or Offer not found
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
Delete user entitlement for the provided offer id.
delete /partner/users/{userId}/entitlements/{offerId}
Delete user entitlement for the provided offer id.
URI Parameters
- userId: required(string)
User ID
- offerId: required(string)
Offer ID
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 204
Offer entitlement deleted, no content.
HTTP status code 400
BadRequest - Bad request, Invalid user id format or Invalid offer id format.
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User not found or Offer not found or Offer Entitlement not found.
HTTP status code 500
Internal server error, expect any 5xx error if something goes badly wrong in the platform.
Add a tag to a user
Remove a tag from a user
put /partner/users/{userId}/tags/{tag}
Add a tag to a user
URI Parameters
- userId: required(string)
User ID
- tag: required(string)
Tag name to add or remove
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
delete /partner/users/{userId}/tags/{tag}
Remove a tag from a user
URI Parameters
- userId: required(string)
User ID
- tag: required(string)
Tag name to add or remove
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Get a list of segment ids to which the user belongs
get /partner/users/{userId}/segments
Get a list of segment ids to which the user belongs
URI Parameters
- userId: required(string)
UserId
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Body
Media type: application/json
Type: array of string
HTTP status code 400
Body
Media type: application/json;charset=utf-8
Type: object
Properties- errorCode: required(string)
- messages: required(array of string)
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User not found.
HTTP status code 500
Internal server error.
Add user to the specified segment
Remove user from the specified segment
put /partner/users/{userId}/segments/{segmentId}
Add user to the specified segment
URI Parameters
- userId: required(string)
UserId
- segmentId: required(string)
SegmentId
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 202
Body
Media type: application/json
Type: object
HTTP status code 400
Body
Media type: application/json;charset=utf-8
Type: object
Properties- errorCode: required(string)
- messages: required(array of string)
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User or segment not found.
HTTP status code 500
Internal server error.
delete /partner/users/{userId}/segments/{segmentId}
Remove user from the specified segment
URI Parameters
- userId: required(string)
UserId
- segmentId: required(string)
SegmentId
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 204
Body
Media type: application/json
Type: object
HTTP status code 400
Body
Media type: application/json;charset=utf-8
Type: object
Properties- errorCode: required(string)
- messages: required(array of string)
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
User or segment not found.
HTTP status code 500
Internal server error.
Fetches the latest play-sessions for a specific user
get /partner/users/{userId}/play-sessions
Fetches the latest play-sessions for a specific user
URI Parameters
- userId: required(string)
ID of the user to authenticate as
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- items: required(array of PlaySession)
Items: PlaySession
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- revoked: required(boolean)
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
HTTP status code 400
Body
Media type: application/json;charset=utf-8
Type: object
Properties- errorCode: required(string)
- messages: required(array of string)
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 500
Internal server error.
patch /partner/users/{userId}/play-sessions/{playSessionId}
URI Parameters
- userId: required(string)
ID of the user to authenticate as
- playSessionId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
ID of the play session
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- revoked: required(boolean)
HTTP status code 400
Body
Media type: application/json;charset=utf-8
Type: object
Properties- errorCode: required(string)
- messages: required(array of string)
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 500
Internal server error.
Upload subtitles for vod
Get all subtitle requests for Vod
post /partner/playables/{assetId}/subtitle-requests
Upload subtitles for vod
URI Parameters
- assetId: required(string)
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Body
Media type: application/json
Type: object
Properties- subtitleData: required(string)
Base64 encoded complete subtitletrack
- subtitleLanguage: required(string - pattern: ^[a-z]{3}$)
ISO639-2 three letter language code.
Example:
eng
- subtitleType: (normal)
HTTP status code 202
Response including the unique id of the request
Body
Media type: application/json
Type: object
Properties- requestId: required(string)
HTTP status code 400
Error adding subtitlerequest, usually missing fields, or subtitleData not properly base64 encoded, or playable is not ready yet
HTTP status code 401
Unauthorized, a bad authorization token was provided.
get /partner/playables/{assetId}/subtitle-requests
Get all subtitle requests for Vod
URI Parameters
- assetId: required(string)
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- subtitleJobs: required(array of object)
Items: SubtitleJob
- requestId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- requestType: required(one of create, delete)
- playableId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- subtitleLanguage: required(string - pattern: ^[a-z]{3}$)
ISO639-2 three letter language code.
Example:
eng
- subtitleType: required(one of normal, cc, forced_narrative)
- createdAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- updatedAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- status: required(one of SUCCEEDED, RUNNING, TIMED_OUT, ABORTED, FAILED)
- errorMessage: (string)
Example:
{ "requestId": "780ac3cd-9207-4cb1-87bf-de36a88ca001", "requestType": "create", "playableId": "4ef23016-e76e-43da-9919-a7654e10ed68", "subtitleLanguage": "eng", "subtitleType": "normal", "createdAt": 1649433033, "updatedAt": 1649433050, "status": "FAILED" }
- requestId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Get a specific subtitle request for a Vod
get /partner/playables/{assetId}/subtitle-requests/{requestId}
Get a specific subtitle request for a Vod
URI Parameters
- assetId: required(string)
- requestId: required(string)
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- subtitleJob: required(object)
- requestId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- requestType: required(one of create, delete)
- playableId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- subtitleLanguage: required(string - pattern: ^[a-z]{3}$)
ISO639-2 three letter language code.
Example:
eng
- subtitleType: required(one of normal, cc, forced_narrative)
- createdAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- updatedAt: required(number)
Number of seconds since the epoch
Example:
1623920603
- status: required(one of SUCCEEDED, RUNNING, TIMED_OUT, ABORTED, FAILED)
- errorMessage: (string)
Example:
{ "requestId": "780ac3cd-9207-4cb1-87bf-de36a88ca001", "requestType": "create", "playableId": "4ef23016-e76e-43da-9919-a7654e10ed68", "subtitleLanguage": "eng", "subtitleType": "normal", "createdAt": 1649433033, "updatedAt": 1649433050, "status": "FAILED" }
- requestId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
HTTP status code 404
Subtitle request not found
Delete subtitle on language and type
delete /partner/playables/{assetId}/subtitle-requests/{subtitleLang}/{subtitleType}
Delete subtitle on language and type
URI Parameters
- assetId: required(string)
- subtitleLang: required(string)
- subtitleType: required(string)
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Transcodes and prepares a source asset for streaming
Transcoding Glossary
Media Audio or video.
Subtitles Also called "captions". Text appearing at bottom of screen for the purpose of translating dialogue or credits. Subtitles are submitted as separate files in SubRip (.srt) format.
Asset A collection of containers and subtitles that form one movie, episode, sports event or other kind of program.
Source A file belonging to an asset.
Container A source conformant with a defined format containing any combination of audio and video. See the supported container formats in the table below.
Subtitle A source containing subtitles.
Input Named reference to a file and its location.
Track Named reference to media or subtitles in source. Associated with an input name.
Output Defines a collection of one or more tracks and performs some operation during transcoding.
Stereo 2-channel audio with channel order
["l", "r"]
.Surround 6-channel audio with channel order
["fl", "fr", "fc", "lfe", "bl", "br"]
.
Supported Media Containers and Codecs
* External reference MOV or MXF files are not supported.
Container | Video Codecs | Audio Codecs |
---|---|---|
Matroska (.mkv) | AVC (H.264), MPEG-2, MPEG-4 Part 2 | AAC, Dolby Digital (AC3) |
MPEG-TS (.m2ts, .ts) | AVC (H.264), HEVC (H.265), MPEG-2 | AAC |
MPEG-4 (.mp4) | AVC (H.264), HEVC (H.265), MPEG-2, MPEG-4 Part 2 | AAC, Dolby Digital (AC3), PCM |
MXF (.mxf) | Apple ProRes, AVC (H.264), MPEG-2 | AAC, PCM |
QuickTime (.mov) | Apple ProRes, AVC (H.264), HEVC (H.265), MPEG-2, MPEG-4 Part 2 | AAC, MP3, PCM |
WebM (.webm) | VP8, VP9 | Opus, Vorbis |
Audio Channel Remapping
Channel Positions
l
stereo leftr
stereo rightfl
front leftfr
front rightfc
front centerlfe
low-frequency effectsbl
back/surround leftbr
back/surround right
An audio track can be mono (1 channel), stereo (2 channels) or surround (6 channels).
The correct channel orders are ["l", "r"]
and ["fl", "fr", "fc", "lfe", "bl", "br"]
for stereo and surround audio respectively. These are the channel orders of our streams to the clients.
To collect mono tracks into a multichannel stream, or correct the order of channels in multichannel tracks, audio outputs are defined.
If no audio outputs are given, they will be automatically generated. Once one audio output is defined, all other audio outputs need to be given as well, even if no further transformations are necessary.
The tracks
list in an audio output specifies the audio tracks associated with that output. This is an ordered list. When listing more than one track, the tracks will be mapped to channel positions.
Listing 2 or 6 mono tracks in the correct order as given above will produce correct stereo or surround output.
The channelOrder
parameter in an audio output can be used to correct the ordering of audio channels in multichannel tracks, for example flipped stereo tracks, or surround tracks with nonstandard channel order.
To correct the ordering, simply specify the channel order of the source track. The audio will be remapped to the correct orders as defined above.
Note that for certain common multichannel track formats such as AAC, the channel order is different from the above but channel ordering is applied automatically right away. It's not necessary to further specify channel order. Any further channel remapping will happen after order is corrected. This can be confusing and small tests are recommended before transcoding production assets to ensure desired result.
For an asset with only well defined multichannel tracks, it's typically not necessary to specify any outputs at all.
Example Use Cases
- More than one audio channel in a single track Given a single six channel audio track ordered
["bl", "br", "fc", "lfe", "fl", "fr"]
i.e. rear and front channels are in wrong position. Specifying thischannelOrder
in the associated output will remap the front and rear channels to correct 5.1 surround["fl", "fr", "fc", "lfe", "bl", "br"]
.
Given a single two channel audio track ordered ["r", "l"]
i.e. left and right are flipped. Specifying this channelOrder
in the associated output flip .
- One audio channel per track Given a list of mono tracks
["2nd", "1st", "3rd", "4th", "5th", "6th"]
,1st
will be moved to thefr
channel and2nd
will be moved to thefl
channel.
Note that it is possible to give a list of mono tracks and then change its ordering using channelOrder
. For most use cases this doesn't make sense, please consider carefully what is needed.
Known Limitations
Currently the tracks in an audio output must all be in the same container file. It's not possible to specify, say, two mono tracks where each mono track is in a separate file. We are working to remove this limitation in a future release.
ContainerIndex for audio tracks is a relative index. Please see ContainerIndex description.
Example Requests
A Typical Example Request
A sample request body can be found at the bottom. In that request an asset with one input is specified. The first index in the input container is for the video track. The second and third index are for the stereo track and 5.1 surround track respectively.
More Complex Example
This is a more complicated request that shows an asset with two containers, several audio tracks and two subtitles.
Container 1 has one video track, one stereo audio track and one 5.1 surround audio track. Stereo has right and left channel flipped which is corrected in the output. The 5.1 surround track already has the expected channel layout so no remapping will be done.
Container 2 has six mono tracks which together form a 5.1 surround audio output in a second language. The tracks are mapped to surround channels.
{
"sourceId": "my_source_id_string_0123",
"inputs": [
{
"name": "my_container_1",
"storage": "s3",
"source": "bucket_1/key_1/file_1.suffix"
},
{
"name": "my_container_2",
"storage": "s3",
"source": "bucket_2/key_2/file_2.suffix"
},
{
"name": "my_container_3",
"storage": "s3",
"source": "bucket_2/key_2/file_3_eng.srt"
},
{
"name": "my_container_4",
"storage": "s3",
"source": "bucket_2/key_2/file_4_ger.srt"
}
],
"tracks": {
"video": {
"name": "my_track_1",
"input": "my_container_1",
"resolution": {
"width": 1920,
"height": 1080
},
"frameRate": {
"numerator": 25,
"denominator": 1
},
"interlaced": false
},
"audio": [
{
"name": "my_track_2",
"input": "my_container_1",
"containerIndex": 1,
"channels": 2,
"language": "eng"
},
{
"name": "my_track_3",
"input": "my_container_1",
"containerIndex": 2,
"channels": 6,
"language": "eng"
},
{
"name": "my_track_4",
"input": "my_container_2",
"containerIndex": 1,
"channels": 1,
"language": "ger"
},
{
"name": "my_track_5",
"input": "my_container_2",
"containerIndex": 2,
"channels": 1,
"language": "ger"
},
{
"name": "my_track_6",
"input": "my_container_2",
"containerIndex": 3,
"channels": 1,
"language": "ger"
},
{
"name": "my_track_7",
"input": "my_container_2",
"containerIndex": 4,
"channels": 1,
"language": "ger"
},
{
"name": "my_track_8",
"input": "my_container_2",
"containerIndex": 5,
"channels": 1,
"language": "ger"
},
{
"name": "my_track_9",
"input": "my_container_2",
"containerIndex": 6,
"channels": 1,
"language": "ger"
}
],
"subtitles": [
{
"name": "my_track_10",
"input": "my_container_3",
"language": "eng"
},
{
"name": "my_track_11",
"input": "my_container_4",
"language": "ger"
}
]
},
"outputs": {
"audio": [
{
"tracks": ["my_track_3"],
"channelOrder": ["r", "l"]
},
{
"tracks": ["my_track_5", "my_track_4"],
},
{
"tracks": [
"my_track_5",
"my_track_4",
"my_track_6",
"my_track_7",
"my_track_8",
"my_track_9"
]
}
]
},
"drm": true,
"drmType": "enhanced",
"experimental": { "a_flag": true}
}
post /partner/transcode/asset
Transcodes and prepares a source asset for streaming
Transcoding Glossary
Media Audio or video.
Subtitles Also called "captions". Text appearing at bottom of screen for the purpose of translating dialogue or credits. Subtitles are submitted as separate files in SubRip (.srt) format.
Asset A collection of containers and subtitles that form one movie, episode, sports event or other kind of program.
Source A file belonging to an asset.
Container A source conformant with a defined format containing any combination of audio and video. See the supported container formats in the table below.
Subtitle A source containing subtitles.
Input Named reference to a file and its location.
Track Named reference to media or subtitles in source. Associated with an input name.
Output Defines a collection of one or more tracks and performs some operation during transcoding.
Stereo 2-channel audio with channel order
["l", "r"]
.Surround 6-channel audio with channel order
["fl", "fr", "fc", "lfe", "bl", "br"]
.
Supported Media Containers and Codecs
* External reference MOV or MXF files are not supported.
Container | Video Codecs | Audio Codecs |
---|---|---|
Matroska (.mkv) | AVC (H.264), MPEG-2, MPEG-4 Part 2 | AAC, Dolby Digital (AC3) |
MPEG-TS (.m2ts, .ts) | AVC (H.264), HEVC (H.265), MPEG-2 | AAC |
MPEG-4 (.mp4) | AVC (H.264), HEVC (H.265), MPEG-2, MPEG-4 Part 2 | AAC, Dolby Digital (AC3), PCM |
MXF (.mxf) | Apple ProRes, AVC (H.264), MPEG-2 | AAC, PCM |
QuickTime (.mov) | Apple ProRes, AVC (H.264), HEVC (H.265), MPEG-2, MPEG-4 Part 2 | AAC, MP3, PCM |
WebM (.webm) | VP8, VP9 | Opus, Vorbis |
Audio Channel Remapping
Channel Positions
l
stereo leftr
stereo rightfl
front leftfr
front rightfc
front centerlfe
low-frequency effectsbl
back/surround leftbr
back/surround right
An audio track can be mono (1 channel), stereo (2 channels) or surround (6 channels).
The correct channel orders are ["l", "r"]
and ["fl", "fr", "fc", "lfe", "bl", "br"]
for stereo and surround audio respectively. These are the channel orders of our streams to the clients.
To collect mono tracks into a multichannel stream, or correct the order of channels in multichannel tracks, audio outputs are defined.
If no audio outputs are given, they will be automatically generated. Once one audio output is defined, all other audio outputs need to be given as well, even if no further transformations are necessary.
The tracks
list in an audio output specifies the audio tracks associated with that output. This is an ordered list. When listing more than one track, the tracks will be mapped to channel positions.
Listing 2 or 6 mono tracks in the correct order as given above will produce correct stereo or surround output.
The channelOrder
parameter in an audio output can be used to correct the ordering of audio channels in multichannel tracks, for example flipped stereo tracks, or surround tracks with nonstandard channel order.
To correct the ordering, simply specify the channel order of the source track. The audio will be remapped to the correct orders as defined above.
Note that for certain common multichannel track formats such as AAC, the channel order is different from the above but channel ordering is applied automatically right away. It's not necessary to further specify channel order. Any further channel remapping will happen after order is corrected. This can be confusing and small tests are recommended before transcoding production assets to ensure desired result.
For an asset with only well defined multichannel tracks, it's typically not necessary to specify any outputs at all.
Example Use Cases
- More than one audio channel in a single track Given a single six channel audio track ordered
["bl", "br", "fc", "lfe", "fl", "fr"]
i.e. rear and front channels are in wrong position. Specifying thischannelOrder
in the associated output will remap the front and rear channels to correct 5.1 surround["fl", "fr", "fc", "lfe", "bl", "br"]
.
Given a single two channel audio track ordered ["r", "l"]
i.e. left and right are flipped. Specifying this channelOrder
in the associated output flip .
- One audio channel per track Given a list of mono tracks
["2nd", "1st", "3rd", "4th", "5th", "6th"]
,1st
will be moved to thefr
channel and2nd
will be moved to thefl
channel.
Note that it is possible to give a list of mono tracks and then change its ordering using channelOrder
. For most use cases this doesn't make sense, please consider carefully what is needed.
Known Limitations
Currently the tracks in an audio output must all be in the same container file. It's not possible to specify, say, two mono tracks where each mono track is in a separate file. We are working to remove this limitation in a future release.
ContainerIndex for audio tracks is a relative index. Please see ContainerIndex description.
Example Requests
A Typical Example Request
A sample request body can be found at the bottom. In that request an asset with one input is specified. The first index in the input container is for the video track. The second and third index are for the stereo track and 5.1 surround track respectively.
More Complex Example
This is a more complicated request that shows an asset with two containers, several audio tracks and two subtitles.
Container 1 has one video track, one stereo audio track and one 5.1 surround audio track. Stereo has right and left channel flipped which is corrected in the output. The 5.1 surround track already has the expected channel layout so no remapping will be done.
Container 2 has six mono tracks which together form a 5.1 surround audio output in a second language. The tracks are mapped to surround channels.
{
"sourceId": "my_source_id_string_0123",
"inputs": [
{
"name": "my_container_1",
"storage": "s3",
"source": "bucket_1/key_1/file_1.suffix"
},
{
"name": "my_container_2",
"storage": "s3",
"source": "bucket_2/key_2/file_2.suffix"
},
{
"name": "my_container_3",
"storage": "s3",
"source": "bucket_2/key_2/file_3_eng.srt"
},
{
"name": "my_container_4",
"storage": "s3",
"source": "bucket_2/key_2/file_4_ger.srt"
}
],
"tracks": {
"video": {
"name": "my_track_1",
"input": "my_container_1",
"resolution": {
"width": 1920,
"height": 1080
},
"frameRate": {
"numerator": 25,
"denominator": 1
},
"interlaced": false
},
"audio": [
{
"name": "my_track_2",
"input": "my_container_1",
"containerIndex": 1,
"channels": 2,
"language": "eng"
},
{
"name": "my_track_3",
"input": "my_container_1",
"containerIndex": 2,
"channels": 6,
"language": "eng"
},
{
"name": "my_track_4",
"input": "my_container_2",
"containerIndex": 1,
"channels": 1,
"language": "ger"
},
{
"name": "my_track_5",
"input": "my_container_2",
"containerIndex": 2,
"channels": 1,
"language": "ger"
},
{
"name": "my_track_6",
"input": "my_container_2",
"containerIndex": 3,
"channels": 1,
"language": "ger"
},
{
"name": "my_track_7",
"input": "my_container_2",
"containerIndex": 4,
"channels": 1,
"language": "ger"
},
{
"name": "my_track_8",
"input": "my_container_2",
"containerIndex": 5,
"channels": 1,
"language": "ger"
},
{
"name": "my_track_9",
"input": "my_container_2",
"containerIndex": 6,
"channels": 1,
"language": "ger"
}
],
"subtitles": [
{
"name": "my_track_10",
"input": "my_container_3",
"language": "eng"
},
{
"name": "my_track_11",
"input": "my_container_4",
"language": "ger"
}
]
},
"outputs": {
"audio": [
{
"tracks": ["my_track_3"],
"channelOrder": ["r", "l"]
},
{
"tracks": ["my_track_5", "my_track_4"],
},
{
"tracks": [
"my_track_5",
"my_track_4",
"my_track_6",
"my_track_7",
"my_track_8",
"my_track_9"
]
}
]
},
"drm": true,
"drmType": "enhanced",
"experimental": { "a_flag": true}
}
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
Body
Media type: application/json
Type: object
Properties- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- inputs: required(array of MediaInput - minItems: 1)
Items: MediaInput
- name: required(string - pattern: ^[A-Za-z0-9\/_-]{2,1000}$)
Unique name.
Example:
my_media_id_0123
- storage: required(s3)
Describes the input storage for the source.
Example:
s3
- source: required(string - pattern: ^(?![\/])[0-9A-Za-z\/._-]{2,1000}$)
A path pointing to a source file, excluding protocol strings such as "s3://". No leading slash.
Example:
bucket/asset/file.suffix
- name: required(string - pattern: ^[A-Za-z0-9\/_-]{2,1000}$)
- tracks: required(object)
- video: required(object)
Exactly one video track is required.
- name: required(string - pattern: ^[A-Za-z0-9\/_-]{2,1000}$)
Name of this track.
Example:
my_media_id_0123
- input: required(string - pattern: ^[A-Za-z0-9\/_-]{2,1000}$)
Name of associated input.
Example:
my_media_id_0123
- resolution: required(object)
Dimensions of the video frame.
- width: required(integer - minimum: 640)
Width in pixels.
- height: required(integer - minimum: 480)
Height in pixels.
- width: required(integer - minimum: 640)
- frameRate: required(object)
Frame rate of video expressed as a fraction. Allowed integer frame rates are
60/1, 50/1, 30/1, 25/1, 24/1
and allowed non-integer frame rates are60000/1001, 30000/1001, 24000/1001
.- numerator: required(integer - minimum: 1)
Numerator of a fraction.
- denominator: required(integer - minimum: 1)
Denominator of a fraction.
- numerator: required(integer - minimum: 1)
- interlaced: required(boolean)
Denotes if video is interlaced.
- formatInfo: (object)
format info
- codec: required(string)
- commercialFormat: required(string)
- hdrInfo: (object)
- format: required(string)
- standard: (string)
- maximumContentLightLevel: (integer)
- maximumFrameaverageLightLevel: (integer)
- colorPrimaries: required(string)
- name: required(string - pattern: ^[A-Za-z0-9\/_-]{2,1000}$)
- audio: required(array of AudioTrack - minItems: 1)
One or more audio tracks.
Items: AudioTrack
- name: required(string - pattern: ^[A-Za-z0-9\/_-]{2,1000}$)
Name of this track.
Example:
my_media_id_0123
- input: required(string - pattern: ^[A-Za-z0-9\/_-]{2,1000}$)
Name of associated input.
Example:
my_media_id_0123
- containerIndex: required(integer - minimum: 1)
Index of audio track in container. Track indices start at 1 and signify order of audio tracks relative to each other, defined as follows.
- Make an ordered list of all audio tracks in a container as reported by for example MediaInfo or ffprobe. 2. For N audio tracks, assign indexes [1,2,..., N]. 3. Specify audio tracks using the assigned indexes. For example, say MediaInfo reports three audio tracks with streamOrder [2,3,5] in a container. Suppose you want to use only the last two. - Assign audio tracks [1,2,3]. - Specify containerIndex 2 and 3 for the last two tracks respectively. The following holds. 1. We currently enforce that all tracks in an output come from the same container. 2. ContainerIndex for those tracks are assumed to be valid according to the above definition. 3. The order of audio tracks is assumed to be the desired order according to the above definition.
- language: required(string - pattern: ^[a-z]{3}$)
ISO639-2 three letter language code.
Example:
eng
- channels: required(integer - minimum: 1)
Number of audio channels in track.
- name: required(string - pattern: ^[A-Za-z0-9\/_-]{2,1000}$)
- subtitles: (array of SubtitlesTrack - minItems: 1)
Optional subtitle tracks.
Items: SubtitlesTrack
- name: required(string - pattern: ^[A-Za-z0-9\/_-]{2,1000}$)
Unique name.
Example:
my_media_id_0123
- input: required(string - pattern: ^[A-Za-z0-9\/_-]{2,1000}$)
Name of associated input.
Example:
my_media_id_0123
- language: required(string - pattern: ^[a-z]{3}$)
ISO639-2 three letter language code.
Example:
eng
- name: required(string - pattern: ^[A-Za-z0-9\/_-]{2,1000}$)
- video: required(object)
- outputs: (object)
- audio: (array of AudioOutput)
One or more audio outputs, each associated with one or more audio tracks.
Items: AudioOutput
- tracks: required(array of MediaId - minItems: 1)
Defines the audio tracks for this output.
- channelOrder: (array of AudioChannelPosition - minItems: 1)
Arrangement of audio channels as an ordered list. Mainly relevant for tracks containing surround audio. Typically given six channels laid out as surround 5.1, recommended order of audio channels is
["fl", "fr", "fc", "lfe", "bl", "br"]
.Example:
[ "fl", "fr", "fc", "lfe", "bl", "br" ]
- layout: (one of stereo, surround51)
Identifier for spatial layout of audio.
Example:
stereo
- tracks: required(array of MediaId - minItems: 1)
- audio: (array of AudioOutput)
- drm: required(boolean)
Specifies whether to use DRM and encrypt the content or not. Uses global settings if not provided.
- drmType: (one of normal, enhanced)
Describes which type of DRM should be used to do transcoding, if not set, defaults to normal.
Example:
normal
- viewableId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for a metadata asset.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- experimental: (object)
Enables access to experimental, potentially unstable features or configurations. Use with caution, as these settings may change or lack documentation.
Example:
{
"sourceId": "my_source_id_string_0123",
"inputs": [
{
"name": "container1",
"storage": "s3",
"source": "bucket/prefix/file_1.suffix"
},
{
"name": "container2",
"storage": "s3",
"source": "bucket/prefix/file_2.srt"
}
],
"tracks": {
"video": {
"name": "video1",
"input": "container1",
"resolution": {
"width": 1920,
"height": 1080
},
"frameRate": {
"numerator": 25,
"denominator": 1
},
"interlaced": false
},
"audio": [
{
"name": "audio1",
"input": "container1",
"containerIndex": 1,
"channels": 2,
"language": "eng"
},
{
"name": "audio2",
"input": "container1",
"containerIndex": 2,
"channels": 6,
"language": "eng"
}
],
"subtitles": [
{
"name": "subtitle1",
"input": "container2",
"language": "nor"
}
]
},
"drm": true,
"drmType": "normal",
"viewableId": "d7347da2-b07a-46f6-b3d3-956fa1326591"
}
HTTP status code 202
Job has been created and placed in the transcoding queue.
Body
Media type: application/json
Type: object
Properties- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for the transcoded asset.
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- viewableId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for a metadata asset.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
Example:
{
"id": "cac10231-b376-4493-b5ad-f27d95d9b8b3",
"sourceId": "mpl-moe-aac-platform-test-001",
"viewableId": "60bbb98e-2794-450b-9c8c-b1f022db7a60"
}
HTTP status code 400
Validation failed OR bad request, fields are either missing or badly formatted, OR missing configuration
Body
Media type: application/json;charset=utf-8
Type: object
Properties- errorCode: required(string)
- messages: required(array of string)
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 500
Internal server error.
Get vod
get /partner/transcode/asset/{assetId}
Get vod
URI Parameters
- assetId: required(string)
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 200
A vod
Body
Media type: application/json
Type: object
Properties- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for the transcoded asset.
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
- source: required(string)
ID of partner
Example:
magine-pro-demo
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- status: required(one of imported, transcoding, transcoded, transcoding_error, import_error, deleted)
Status of the vod transcoding
- createdAt: (number)
Number of seconds since the epoch
Example:
1623920603
- modifiedAt: (number)
Number of seconds since the epoch
Example:
1623920603
- rights: (object)
Special rights for the vod asset
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
Unique id for the source, 2-100 characters.
Example:
my_source_id_string_0123
- offlineAvailable: required(boolean)
- sourceId: required(string - pattern: ^[A-Za-z0-9 \\&\\/_-]{2,1000}$)
- publish: (boolean)
- vodPipeline: required(one of inhouse, mediaconvert)
What pipeline is responsible for the vod transcoding
- duration: (number)
Video duration in seconds
- viewableId: (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
Unique id for a metadata asset.
Examples:
uuid:
b33617fe-a6c2-4f6d-a5bf-ab3c3ecc33a3
d7347da2-b07a-46f6-b3d3-956fa1326591
- drmActivated: required(boolean)
- drmType: (one of normal, enhanced)
Describes which type of DRM should be used to do transcoding, if not set, defaults to normal.
Example:
normal
- subtitleLanguages: (array of string)
- subtitleTracks: (array of SubtitleTrack)
Items: SubtitleTrack
- language: required(string)
Three letter representation of language
Example:
swe
- subtitleType: required(one of normal, cc, forced_narrative)
The type of subtitle track
- language: required(string)
- audioLanguages: (array of string)
- sourceResolution: (object)
Dimensions of the video frame.
- width: required(integer - minimum: 640)
Width in pixels.
- height: required(integer - minimum: 480)
Height in pixels.
- width: required(integer - minimum: 640)
- audioChansPerLang: (array of object)
Items: items
- channels: required(number)
- language: required(string)
Example:
{
"assetId": "cac10231-b376-4493-b5ad-f27d95d9b8b3",
"source": "magine-pro-demo",
"sourceId": "mpl-moe-aac-platform-test-001",
"status": "transcoded",
"createdAt": 1623854732,
"modifiedAt": 1623854927,
"vodPipeline": "mediaconvert",
"viewableId": "60bbb98e-2794-450b-9c8c-b1f022db7a60",
"drmActivated": true,
"drmType": "normal",
"subtitleLanguages": [
"eng",
"ell"
],
"subtitleTracks": [
{
"language": "eng",
"subtitleType": "normal"
},
{
"language": "ell",
"subtitleType": "normal"
}
],
"audioLanguages": [
"eng",
"eng",
"eng"
],
"sourceResolution": {
"width": 1920,
"height": 1080
},
"audioChansPerLang": [
{
"channels": 6,
"language": "eng"
}
]
}
post /partner/transcode/asset/{assetId}/abort
URI Parameters
- assetId: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
ID of the asset to abort
Example:
d7347da2-b07a-46f6-b3d3-956fa1326591
Headers
- Magine-AccessToken: required(string)
Required to identify the partner.
Example:
926352c3-0fd9-4e20-b6cb-60d0e8331aa7
- Authorization: required(string)
Required to authenticate to the API, see Authentication documentation section for more information.
Example:
Bearer JWT-TOKEN-GENERATED
HTTP status code 202
Successfully initiated abort.
HTTP status code 400
Body
Media type: application/json;charset=utf-8
Type: object
Properties- errorCode: required(string)
- messages: required(array of string)
HTTP status code 401
Unauthorized, a bad authorization token was provided.
HTTP status code 404
Not found, an asset id was provided for a job that is not running.
HTTP status code 500
Internal server error.