M2A Live Materials (v1)

Download OpenAPI specification:

Product Team: team@m2amedia.tv URL: m2amedia.tv/apis/support License: MIT

This is the API specification of the M2A Live Materials.

materials

POST single material, GET single material or inline list of materials

Register a single playout material with the Live Materials API

Register a single playout material with the Live Materials API. The media and any previews must already be in the bucket the url names: each is looked for before the material is registered. The media's file is read with MediaInfo: an overlay is registered only if it is a 32-bit PNG with an alpha channel, and a slate whether or not its picture size is recognised

Authorizations:
bearerAuth
Request Body schema: application/json
required

The fields required in the payload when POSTing

required
object (Metadata in request body)
status
required
string (status_request)
Enum: "available" "unavailable"

Whether the playout material is available for use. Material is withdrawn after registration, so it cannot be registered as withdrawn

role
required
string (role)
Enum: "slate" "overlay"
url
required
string (s3_url) ^s3(ssl)?://

The S3 URL of an object, using the s3: or s3ssl: scheme. The URL must name a key that is valid UTF-8, of at most 1024 bytes as S3 allows, and must not carry query parameters or a fragment

object (previews_request)

S3 objects to use as previews of the playout material. They must be in the same bucket as the playout material

Responses

Request samples

Content type
application/json
{
  • "metadata": {
    },
  • "status": "available",
  • "role": "slate",
  • "url": "s3ssl://my-materials-bucket/slates/half-time.mp4",
  • "previews": {
    }
}

Response samples

Content type
application/json
{
  • "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  • "metadata": {
    },
  • "status": "available",
  • "role": "slate",
  • "type": "mp4_h264_aac",
  • "media-info": {
    },
  • "health": {
    }
}

Get an inline list of materials.

Get a page of a target account's playout material. Withdrawn material is left out unless status asks for it. Keep requesting pages with next-page-key until it is null: a page can hold fewer materials than page-size, or none, while more remain.

Authorizations:
bearerAuth
query Parameters
organisation-id
required
string <uuid> (organisation_id)
Example: organisation-id=a136776e-f1ea-42bf-865f-e7074c517002

The ID of the organisation that owns the target account. Required, but not used to narrow the listing

target-account-id
required
string <uuid> (target_account_id)
Example: target-account-id=a136776e-f1ea-42bf-865f-e7074c517001

The ID of the target account whose playout material is listed

health
string (health_status)
Enum: "ready" "broken"

Only list playout material with this health

role
string (role)
Enum: "slate" "overlay"

Only list playout material with this role

type
string (media_type)
Enum: "mp4_h264_aac" "png_32bit"

Only list playout material in this media format

status
string (status)
Enum: "available" "unavailable" "withdrawn"

Whether the playout material is available for use. Withdrawn material is left out unless this parameter asks for it by name

page-size
integer [ 2 .. 2000 ]
Default: 100

The largest number of playout materials to return on one page

next-page-key
string <byte>

The next-page-key from the previous page, to get the page after it. Omit it to get the first page. The key is base64 and can contain +, / and =, so it must be URL-encoded

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "next-page-key": null
}

Get a single playout material with the Live Materials API

Get a single playout material with the Live Materials API. Withdrawn material is returned like any other.

Authorizations:
bearerAuth
path Parameters
material-id
required
string <uuid> (Resource identifier)
Example: 2e31a1e3-abd2-4bc5-9443-bc0c6acf36d7

The ID of the playout material

query Parameters
previews
string
Default: "excluded"
Enum: "required" "preferred" "excluded"

Whether to include presigned URLs for the playout material's previews. required fails the request with a 400 when the material has no previews, with a 502 when a service it depends on fails, with a 503 when the material storage is temporarily unavailable, with a 500 when it cannot be reached otherwise, and with a 422 when a preview cannot be presigned. preferred never fails the request for a preview: each preview that can be presigned is included, and the others are left out, whether the material storage cannot be reached or a link cannot be presigned. previews is an empty object when the material has no previews or none can be presigned. Ask again with required to learn why a preview is missing. excluded leaves previews out

media
string
Default: "excluded"
Enum: "required" "preferred" "excluded"

Whether to include a presigned link to the playout material's own media file, valid for an hour, as media. required fails the request with a 502 when a service it depends on fails, with a 503 when the material storage is temporarily unavailable, with a 500 when it cannot be reached otherwise, and with a 422 when the link cannot be presigned. preferred never fails the request for the link: media is left out, not given empty as previews is, when the material storage cannot be reached or the link cannot be presigned. Ask again with required to learn why. excluded leaves it out. Only offered on a single material GET, never on the list

Responses

Response samples

Content type
application/json
Example
{
  • "id": "2e31a1e3-abd2-4bc5-9443-bc0c6acf36d7",
  • "metadata": {
    },
  • "status": "available",
  • "role": "overlay",
  • "type": "png_32bit",
  • "media-info": {
    },
  • "health": {
    }
}

Withdraw a single playout material from selection

Withdraw a playout material so that it is no longer offered when choosing material. The material stays retrievable by its ID, so that work already using it can still report what it is. Overlays already accepted with this material are unaffected and still air as planned.

Authorizations:
bearerAuth
path Parameters
material-id
required
string <uuid> (Resource identifier)
Example: 2e31a1e3-abd2-4bc5-9443-bc0c6acf36d7

The ID of the playout material

Responses

Response samples

Content type
No auth header