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

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"
type
string
Enum: "mp4_h264_aac" "png_32bit"

The media format of the playout material. Required for overlays, which must be png_32bit. Slates must be mp4_h264_aac, which is assumed when no type is given

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 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",
  • "type": "mp4_h264_aac",
  • "url": "s3ssl://my-materials-bucket/slates/half-time.mp4",
  • "previews": {
    }
}

Response samples

Content type
application/json
{
  • "id": "2e31a1e3-abd2-4bc5-9443-bc0c6acf36d7",
  • "metadata": {
    },
  • "status": "available",
  • "role": "slate",
  • "type": "mp4_h264_aac",
  • "health": {
    },
  • "previews": {}
}

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": "string"
}

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, and with a 422 when a preview cannot be presigned. preferred includes each preview that can be presigned, and an empty previews object when none can. excluded leaves previews out

Responses

Response samples

Content type
application/json
{
  • "id": "2e31a1e3-abd2-4bc5-9443-bc0c6acf36d7",
  • "metadata": {
    },
  • "status": "available",
  • "role": "slate",
  • "type": "mp4_h264_aac",
  • "health": {
    },
  • "previews": {}
}

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