The M2A Live service provides an API for creating and managing the resources required to deliver a live streaming video workflow on top of the AWS media services suite, including AWS MediaLive. In this version, the following resources are supported:
New in version v4 An encoder is defined by three core components: a template, a list of inputs, and a list of destinations. Together these describe the full AWS MediaLive channel configuration.
Each encoder references a named Jinja2 channel template stored in the M2A template service. The template defines the encoding profile — output groups, video/audio codec settings, input attachment structure, and timecode configuration. It is rendered at channel creation time to produce the final AWS MediaLive channel JSON.
Use template-configuration to supply per-encoder overrides for any Jinja2 variables (macros) declared in the template. For example, audio PIDs, language codes, or stream-specific bitrate values that differ between encoders that share the same template. Keys must match variable names defined in the template; unrecognised keys are ignored.
The template defines a fixed number of InputAttachments. Each input you provide in the inputs array is mapped positionally into the corresponding attachment slot in the rendered template — the first input maps to the first attachment, the second to the second, and so on.
The number of inputs provided must not exceed the number of attachment slots in the template. Most single-pipeline templates expect one input. Templates designed for automatic input failover expect two: the primary input first, followed by the secondary. The secondary input is automatically wired into the failover settings on the primary attachment.
Destinations define where encoded media is sent. Each destination in the destinations array is matched independently to an output group in the rendered template by its output-group-type and, optionally, its name.
Destination properties fall into two logical categories, which may be mixed freely within the same destinations array:
Explicit properties supply the raw target directly:
url — the ingest endpoint for HLS, MS Smooth, RTMP, Archive, UDP, CMAF Ingest, and Multiplex output groups.channel-id — a raw AWS MediaPackage channel ID.M2A resource properties supply an M2A platform identifier that is resolved to the underlying AWS resource or network endpoint at channel creation time:
packager-id — an M2A-managed MediaPackage packager. The platform resolves this to the associated MediaPackage channel ID. Mutually exclusive with channel-id; if both are supplied, packager-id takes precedence and channel-id is ignored.connect-source-id — an M2A Connect source, resolved to a UDP endpoint.If name is specified on a destination, the system looks for an output group with that exact name in the template. If name is omitted, the first output group of the matching type is used.
By default (auto-fix-destinations: true) the system silently drops any template output groups that have no matching destination. Set auto-fix-destinations: false to enforce a strict count match — channel creation will fail if the number of destinations does not exactly match the number of output groups in the rendered template.
The API is modelled on JSONAPI (https://jsonapi.org/format/). Where possible related resources are modelled as Relationships. ie: - a specific account owner (one to one relationship) - mediainputs (one to many relationship) - enrolments (one to many relationship)
Owner can be only of type target-account.
The following headers are required for all requests -
json { 'Accept': 'application/vnd.api+json', 'Content-Type': 'application/vnd.api+json' }
An encoder represents the specification of the source content, the encoding profile and the destination(s) the encoded content is to be delivered to. A 'success' HTTP status code merely means that the definition has been persisted. An encoder must be started and stopped by the client application based on the required schedule.
To apply actions automatically when the encoder first starts, set schedule-actions in the encoder settings block. Actions are submitted individually, in list order, on the start that follows creation, once the encoder reaches RUNNING.
They are not re-submitted on any later start. Stopping or restarting the encoder moves every remaining action to INACTIVE, because MediaLive clears its own schedule on stop, so a subsequent start finds nothing left to submit. To re-apply an action after a stop or restart, submit it again via POST /encoders/{encoder-id}/actions.
motion-graphics-activate, motion-graphics-deactivate, static-image-activate and static-image-deactivate are implemented; any other settings.type fails schema validation and returns 422. Set to null to remove.
A relationships.owner pointing at the target account is mandatory.
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
| Content-Type required | string (JsonAPIMediaType) Value: "application/vnd.api+json" The original media type of the resource. |
required | object (Data Element) JSONAPI data element |
{- "data": {
- "type": "medialive",
- "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}
}, - "attributes": {
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Match Day Encoder"
}
]
}, - "name": "Match Day Encoder",
- "region": "eu-west-1",
- "medialive-input-role-arn": "arn:aws:iam::123456789012:role/MediaLiveAccessRole",
- "settings": {
- "template-name": "hd-avc-template",
- "template-configuration": {
- "audio-pid": 101
}, - "auto-fix-destinations": true,
- "inputs": [
- {
- "type": "MEDIACONNECT",
- "flow-arns": [
- "arn:aws:mediaconnect:eu-west-1:123456789012:flow:1-AbCdEfGh-1234567890ab"
]
}
], - "destinations": [
- {
- "output-group-type": "MediaPackageGroupSettings",
- "packager-id": "aab3cedc-5b70-4859-86bd-43fbe87516a6"
}
], - "schedule-actions": [
- {
- "action-type": "SCHEDULED",
- "settings": {
- "type": "motion-graphics-activate",
- "timing": {
- "type": "immediate"
}, - "username": "gfx-user",
- "password": "plaintext-secret",
- "duration": 0
}
}
]
}
}
}
}{- "data": {
- "type": "medialive",
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
- "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}, - "thumb-urls": {
- "data": [ ],
}
}, - "attributes": {
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Match Day Encoder"
}
]
}, - "name": "Match Day Encoder",
- "region": "eu-west-1",
- "state": "INITIAL",
- "motion-graphics-support": "UNKNOWN",
- "medialive-input-role-arn": "arn:aws:iam::123456789012:role/MediaLiveAccessRole",
- "settings": {
- "template-name": "hd-avc-template",
- "template-configuration": {
- "audio-pid": 101
}, - "auto-fix-destinations": true,
- "inputs": [
- {
- "type": "MEDIACONNECT",
- "flow-arns": [
- "arn:aws:mediaconnect:eu-west-1:123456789012:flow:1-AbCdEfGh-1234567890ab"
]
}
], - "destinations": [
- {
- "output-group-type": "MediaPackageGroupSettings",
- "packager-id": "aab3cedc-5b70-4859-86bd-43fbe87516a6"
}
], - "channel": {
- "aws": {
- "arn": "arn:aws:medialive:eu-west-1:123456789012:channel:0000000",
- "id": null,
- "name": null
}
}, - "schedule-actions": [
- {
- "id": "c3a7b1e2-9f84-4a6d-b0c5-2d1e8f7a4b39",
- "action-type": "SCHEDULED",
- "name": "Pre-match graphics",
- "status": "PENDING",
- "settings": {
- "type": "motion-graphics-activate",
- "timing": {
- "type": "immediate"
}, - "username": "gfx-user",
- "duration": 0
}
}
]
}, - "created": "2026-03-20T14:00:00.000000+0000",
- "updated": "2026-03-20T14:00:00.000000+0000"
}
}
}{- "state": "IN_PROGRESS",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}Returns a cursor-paginated list of encoders owned by the
specified target account. Results are returned in an
unspecified but stable order; use page[cursor] from the
previous response's links.next to retrieve subsequent pages.
| owner required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: owner=03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the Target Account |
| page[cursor] | string Opaque cursor returned in the previous response's links.next. Pass this value to retrieve the next page of results. |
| page[limit] | integer >= 1 Default: 20 Maximum number of resources to return per page. |
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
{- "data": [
- {
- "type": "medialive",
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
- "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}, - "thumb-urls": {
- "data": [
- {
- "type": "encoder-thumb-urls",
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479-0"
}
],
}
}, - "attributes": {
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Match Day Encoder"
}
]
}, - "name": "Match Day Encoder",
- "region": "eu-west-1",
- "state": "RUNNING",
- "motion-graphics-support": "ENABLED",
- "medialive-input-role-arn": "arn:aws:iam::123456789012:role/MediaLiveAccessRole",
- "settings": {
- "template-name": "hd-avc-template",
- "template-configuration": {
- "audio-pid": 101
}, - "auto-fix-destinations": true,
- "inputs": [
- {
- "type": "MEDIACONNECT",
- "flow-arns": [
- "arn:aws:mediaconnect:eu-west-1:123456789012:flow:1-AbCdEfGh-1234567890ab"
]
}
], - "destinations": [
- {
- "output-group-type": "MediaPackageGroupSettings",
- "packager-id": "aab3cedc-5b70-4859-86bd-43fbe87516a6"
}
], - "channel": {
- "aws": {
- "arn": "arn:aws:medialive:eu-west-1:123456789012:channel:0000001",
- "id": "0000001",
- "name": "m2a-match-day"
}
}
}, - "created": "2026-03-20T14:00:00.000000+0000",
- "updated": "2026-03-20T14:05:00.000000+0000"
}
}, - {
- "type": "medialive",
- "id": "1f8a2c4b-9d3e-4f6a-8b7c-2e1d0f9a3b4c",
- "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}, - "thumb-urls": {
- "data": [ ],
}
}, - "attributes": {
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Studio B Encoder"
}
]
}, - "name": "Studio B Encoder",
- "region": "eu-west-1",
- "state": "INITIAL",
- "motion-graphics-support": "UNKNOWN",
- "medialive-input-role-arn": "arn:aws:iam::123456789012:role/MediaLiveAccessRole",
- "settings": {
- "template-name": "hd-avc-template",
- "template-configuration": {
- "audio-pid": 102
}, - "auto-fix-destinations": true,
- "inputs": [
- {
- "type": "MEDIACONNECT",
- "flow-arns": [
- "arn:aws:mediaconnect:eu-west-1:123456789012:flow:2-AbCdEfGh-1234567890ab"
]
}
], - "destinations": [
- {
- "output-group-type": "MediaPackageGroupSettings",
- "packager-id": "12cf3d2e-8b91-4d7e-9f02-5c8a1e3b6d72"
}
], - "channel": {
- "aws": {
- "arn": "arn:aws:medialive:eu-west-1:123456789012:channel:0000002",
- "id": null,
- "name": null
}
}
}, - "created": "2026-03-19T10:30:00.000000+0000",
- "updated": "2026-03-19T10:30:00.000000+0000"
}
}
], - "links": {
- "next": null
}
}Gets an encoder by its ID.
Pass include=thumb-urls to have the encoder's thumbnail URLs
returned in the top-level included array.
| encoder-id required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: 03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the encoder |
| owner required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: owner=03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the Target Account |
| include | Array of strings Items Value: "thumb-urls" Related resources to return in the top-level |
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
{- "data": {
- "type": "medialive",
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
- "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}, - "thumb-urls": {
- "data": [ ],
}
}, - "attributes": {
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Match Day Encoder"
}
]
}, - "name": "Match Day Encoder",
- "region": "eu-west-1",
- "state": "INITIAL",
- "motion-graphics-support": "UNKNOWN",
- "medialive-input-role-arn": "arn:aws:iam::123456789012:role/MediaLiveAccessRole",
- "settings": {
- "template-name": "hd-avc-template",
- "template-configuration": {
- "audio-pid": 101
}, - "auto-fix-destinations": true,
- "inputs": [
- {
- "type": "MEDIACONNECT",
- "flow-arns": [
- "arn:aws:mediaconnect:eu-west-1:123456789012:flow:1-AbCdEfGh-1234567890ab"
]
}
], - "destinations": [
- {
- "output-group-type": "MediaPackageGroupSettings",
- "packager-id": "aab3cedc-5b70-4859-86bd-43fbe87516a6"
}
], - "channel": {
- "aws": {
- "arn": "arn:aws:medialive:eu-west-1:123456789012:channel:0000000",
- "id": null,
- "name": null
}
}, - "schedule-actions": [
- {
- "id": "c3a7b1e2-9f84-4a6d-b0c5-2d1e8f7a4b39",
- "action-type": "SCHEDULED",
- "name": "Pre-match graphics",
- "status": "PENDING",
- "settings": {
- "type": "motion-graphics-activate",
- "timing": {
- "type": "immediate"
}, - "username": "gfx-user",
- "duration": 0
}
}
]
}, - "created": "2026-03-20T14:00:00.000000+0000",
- "updated": "2026-03-20T14:00:00.000000+0000"
}
}
}Creates a long-lived MediaLive input that persists independently of channels. Use standalone inputs when static IP addresses are required for push-type inputs (RTP, RTMP).
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
| Content-Type required | string (JsonAPIMediaType) Value: "application/vnd.api+json" The original media type of the resource. |
required | object (Data Element) JSONAPI data element |
{- "data": {
- "type": "medialive-input",
- "attributes": {
- "type": "RTP_PUSH",
- "name": "Studio A Primary",
- "network": {
- "type": "private",
- "subnet-ids": [
- "subnet-0abc1234def56789a",
- "subnet-0abc1234def56789b"
], - "security-group-ids": [
- "sg-0abc1234def56789a"
], - "role-arn": "arn:aws:iam::123456789012:role/MediaLiveAccessRole"
}, - "region": "eu-west-1",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Studio A Primary"
}
]
}
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}
}
}
}{- "data": {
- "type": "medialive-input",
- "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
- "attributes": {
- "type": "RTP_PUSH",
- "name": "Studio A Primary",
- "network": {
- "type": "private",
- "subnet-ids": [
- "subnet-0abc1234def56789a",
- "subnet-0abc1234def56789b"
], - "security-group-ids": [
- "sg-0abc1234def56789a"
], - "role-arn": "arn:aws:iam::123456789012:role/MediaLiveAccessRole"
}, - "aws": {
- "arn": "arn:aws:medialive:eu-west-1:123456789012:input:1234567",
- "id": "1234567",
- "endpoints": [
- "rtp://198.51.100.10:5000",
- "rtp://198.51.100.11:5000"
]
}, - "region": "eu-west-1",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Studio A Primary"
}
]
}, - "provisioning-state": "READY",
- "attachment-state": "ATTACHED",
- "created": "2024-06-01T17:45:00.000000+0000",
- "updated": "2024-06-01T17:50:00.000000+0000",
- "last-modified-by": "9f2b1e4a-3c7d-4a8f-b5e6-1d2c3a4b5e6f"
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}, - "encoder": {
- "data": {
- "type": "medialive",
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
}
}
}
}Lists standalone inputs for the specified owner.
| owner required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: owner=03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the Target Account |
| page[cursor] | string Opaque cursor returned in the previous response's links.next. Pass this value to retrieve the next page of results. |
| page[limit] | integer >= 1 Default: 20 Maximum number of resources to return per page. |
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
{- "data": [
- {
- "type": "medialive-input",
- "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
- "attributes": {
- "type": "RTP_PUSH",
- "name": "Studio A Primary",
- "network": {
- "type": "private",
- "subnet-ids": [
- "subnet-0abc1234def56789a",
- "subnet-0abc1234def56789b"
], - "security-group-ids": [
- "sg-0abc1234def56789a"
], - "role-arn": "arn:aws:iam::123456789012:role/MediaLiveAccessRole"
}, - "aws": {
- "arn": "arn:aws:medialive:eu-west-1:123456789012:input:1234567",
- "id": "1234567",
- "endpoints": [
- "rtp://198.51.100.10:5000",
- "rtp://198.51.100.11:5000"
]
}, - "region": "eu-west-1",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Studio A Primary"
}
]
}, - "provisioning-state": "READY",
- "attachment-state": "ATTACHED",
- "created": "2024-06-01T17:45:00.000000+0000",
- "updated": "2024-06-01T17:50:00.000000+0000",
- "last-modified-by": "9f2b1e4a-3c7d-4a8f-b5e6-1d2c3a4b5e6f"
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}, - "encoder": {
- "data": {
- "type": "medialive",
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
}
}
}, - {
- "type": "medialive-input",
- "id": "b2c3d4e5-6789-01bc-def0-234567890abc",
- "attributes": {
- "type": "MEDIACONNECT",
- "name": "MediaConnect Flow Input",
- "flow-arns": [
- "arn:aws:mediaconnect:eu-west-1:123456789012:flow:1-AbCdEfGh-1234567890ab",
- "arn:aws:mediaconnect:eu-west-1:123456789012:flow:2-AbCdEfGh-1234567890ab"
], - "role-arn": "arn:aws:iam::123456789012:role/MediaLiveAccessRole",
- "aws": {
- "arn": "arn:aws:medialive:eu-west-1:123456789012:input:7654321",
- "id": "7654321",
- "endpoints": null
}, - "region": "eu-west-1",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "MediaConnect Flow Input"
}
]
}, - "provisioning-state": "READY",
- "attachment-state": "DETACHED",
- "created": "2024-05-15T10:00:00.000000+0000",
- "updated": "2024-06-01T12:30:00.000000+0000",
- "last-modified-by": "9f2b1e4a-3c7d-4a8f-b5e6-1d2c3a4b5e6f"
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}, - "encoder": {
- "data": null
}
}
}
], - "links": {
- "next": null
}
}Gets a standalone input by its ID
| input-id required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: 03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the standalone input |
| owner required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: owner=03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the Target Account |
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
{- "data": {
- "type": "medialive-input",
- "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
- "attributes": {
- "type": "RTP_PUSH",
- "name": "Studio A Primary",
- "network": {
- "type": "private",
- "subnet-ids": [
- "subnet-0abc1234def56789a",
- "subnet-0abc1234def56789b"
], - "security-group-ids": [
- "sg-0abc1234def56789a"
], - "role-arn": "arn:aws:iam::123456789012:role/MediaLiveAccessRole"
}, - "aws": {
- "arn": "arn:aws:medialive:eu-west-1:123456789012:input:1234567",
- "id": "1234567",
- "endpoints": [
- "rtp://198.51.100.10:5000",
- "rtp://198.51.100.11:5000"
]
}, - "region": "eu-west-1",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Studio A Primary"
}
]
}, - "provisioning-state": "READY",
- "attachment-state": "ATTACHED",
- "created": "2024-06-01T17:45:00.000000+0000",
- "updated": "2024-06-01T17:50:00.000000+0000",
- "last-modified-by": "9f2b1e4a-3c7d-4a8f-b5e6-1d2c3a4b5e6f"
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}, - "encoder": {
- "data": {
- "type": "medialive",
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
}
}
}
}Updates a standalone input. All attributes are optional for partial
update. When an If-Match header is supplied, the update is
rejected with 412 Precondition Failed if the resource has been
modified since the ETag was obtained.
Immutable fields: The input type, region, and all network
settings are fixed at creation and cannot be changed.
Pipeline mode: The number of items in array fields (sources, flow-arns, connect-source-ids, srt-caller-settings) cannot be changed. MediaLive pipeline mode — single (1 item) or standard/dual (2 items) — is determined at creation and is immutable.
No-op detection: If the request attributes are identical to the
current state of the resource, the server returns 304 Not Modified
with the current ETag header and performs no update.
State requirements: The input must be in READY provisioning-state.
The input must also be in DETACHED attachment-state; requests that violate
these constraints are rejected with 409 Conflict.
| input-id required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: 03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the standalone input |
| owner required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: owner=03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the Target Account |
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
| If-Match | string ETag value from a previous GET response. Used for optimistic concurrency control. |
| Content-Type required | string (JsonAPIMediaType) Value: "application/vnd.api+json" The original media type of the resource. |
required | object (Data Element) JSONAPI data element |
{- "data": {
- "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
- "type": "medialive-input",
- "attributes": {
- "name": "Studio A Primary v2",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Studio A Primary v2"
}
]
}
}
}
}{- "data": {
- "type": "medialive-input",
- "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
- "attributes": {
- "type": "RTP_PUSH",
- "name": "Studio A Primary",
- "network": {
- "type": "private",
- "subnet-ids": [
- "subnet-0abc1234def56789a",
- "subnet-0abc1234def56789b"
], - "security-group-ids": [
- "sg-0abc1234def56789a"
], - "role-arn": "arn:aws:iam::123456789012:role/MediaLiveAccessRole"
}, - "aws": {
- "arn": "arn:aws:medialive:eu-west-1:123456789012:input:1234567",
- "id": "1234567",
- "endpoints": [
- "rtp://198.51.100.10:5000",
- "rtp://198.51.100.11:5000"
]
}, - "region": "eu-west-1",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Studio A Primary"
}
]
}, - "provisioning-state": "READY",
- "attachment-state": "ATTACHED",
- "created": "2024-06-01T17:45:00.000000+0000",
- "updated": "2024-06-01T17:50:00.000000+0000",
- "last-modified-by": "9f2b1e4a-3c7d-4a8f-b5e6-1d2c3a4b5e6f"
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}, - "encoder": {
- "data": {
- "type": "medialive",
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
}
}
}
}Deletes a standalone input. The input must be detached from all
channels and be in READY or FAILED provisioning state before
deletion. When an If-Match header is supplied, the delete is
rejected with 412 Precondition Failed if the resource has been
modified since the ETag was obtained.
| input-id required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: 03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the standalone input |
| owner required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: owner=03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the Target Account |
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
| If-Match | string ETag value from a previous GET response. Used for optimistic concurrency control. |
{- "errors": [
- {
- "status": "400",
- "title": "Bad Request",
- "detail": "Missing data for required field.",
- "source": {
- "pointer": "/data/attributes/region"
}
}
]
}Submit and manage control actions for encoders. The action-type field
determines the behaviour and which schema applies.
Scheduled actions (SCHEDULED) allow dynamic, real-time changes to a
live encoder without stopping the stream — graphics and static-image
overlays.
The encoder must be in IDLE or RUNNING state. The settings.type
field identifies the action; settings.timing controls when it fires.
Timing types (settings.timing.type):
immediate — as soon as possible after submission.fixed — at a specific wall-clock time. Requires settings.timing.time.follow timing is defined in the schemas but is not accepted on any
endpoint; submitting it returns 400.
Status for scheduled actions uses ScheduleActionStatus:
PENDING → ACTIVE / FIRED → INACTIVE / FAILED.
Implemented: motion-graphics-activate, motion-graphics-deactivate,
static-image-activate, static-image-deactivate. All other scheduled
action types have schemas defined but are not accepted — submitting one
fails schema validation and returns 400.
Startup scheduled actions: Encoders can be configured with
schedule-actions (in the encoder settings). These are submitted
automatically on the start that follows creation, once the encoder
reaches RUNNING, and are not re-submitted on any later start — a stop
or restart moves them to INACTIVE. The resulting action records are
returned in the encoder response under schedule-actions.
To cancel a scheduled action before it fires, use
DELETE /encoders/{encoder-id}/actions/{action-id}. Only PENDING
actions can be deleted.
Slate actions replace the encoder's live output with a pre-configured slate (fallback) clip. Use slating to fill airtime during source failures, ad breaks, or planned pauses without stopping the encoder.
All slate actions require the encoder to be RUNNING. The sequence for
managing a slate is:
| Action | Purpose |
|---|---|
PREPARE_SLATE |
Pre-loads the slate input. Requires material-id. |
START_SLATE |
Switches output to the slate. Requires material-id. |
SWITCH_SLATE |
Switches to a different slate while one is active. Requires material-id. |
STOP_SLATE |
Restores live output, ending the active slate. |
DELETE_FIXED_SLATE |
Cancels a fixed-time slate that has not yet fired. |
Use slate-action-type: FIXED with slate-datetime on START_SLATE
or SWITCH_SLATE to schedule the transition at a specific wall-clock
time rather than immediately.
Lifecycle actions transition the encoder between states (START,
STOP, RESTART, PAUSE, RESUME, etc.). Each action is processed
asynchronously. The response status field (ACTIVE, COMPLETE,
FAILED) reflects the outcome.
Submits an action to multiple encoders simultaneously. All encoders
receive the same action. action-type determines which schema applies.
Currently supported action types: SCHEDULED.
Validation: All encoders are validated upfront. If any encoder
fails validation the entire request returns 409 and no records are
created.
Returns 207 Multi-Status with one action record per encoder. Each
record starts as PENDING. If AWS later rejects an action, its
status transitions to FAILED with an error-detail explaining why.
| Content-Type required | string (JsonAPIMediaType) Value: "application/vnd.api+json" The original media type of the resource. |
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
required | object |
{- "data": {
- "type": "encoder-action",
- "attributes": {
- "action-type": "SCHEDULED",
- "encoder-ids": [
- "f47ac10b-58cc-4372-a567-0e02b2c3d479",
- "a1b2c3d4-0001-0000-0000-000000000099"
], - "name": "Pre-match graphics",
- "settings": {
- "type": "motion-graphics-activate",
- "timing": {
- "type": "immediate"
}, - "username": "gfx-user",
- "password": "plaintext-secret",
- "duration": 0
}
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}
}
}
}{- "data": [
- {
- "type": "encoder-action",
- "id": "a1b2c3d4-0001-0000-0000-000000000001",
- "attributes": {
- "action-type": "SCHEDULED",
- "status": "PENDING",
- "submitted-at": "2026-03-26T10:00:00Z",
- "settings": {
- "type": "motion-graphics-activate",
- "timing": {
- "type": "immediate"
}, - "username": "gfx-user",
- "duration": 0
}
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}, - "encoder": {
- "data": {
- "type": "medialive",
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
}
}
}, - {
- "type": "encoder-action",
- "id": "a1b2c3d4-0001-0000-0000-000000000002",
- "attributes": {
- "action-type": "SCHEDULED",
- "status": "PENDING",
- "submitted-at": "2026-03-26T10:00:00Z",
- "settings": {
- "type": "motion-graphics-activate",
- "timing": {
- "type": "immediate"
}, - "username": "gfx-user",
- "duration": 0
}
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}, - "encoder": {
- "data": {
- "type": "medialive",
- "id": "a1b2c3d4-0001-0000-0000-000000000099"
}
}
}
}
]
}Returns the action history for an encoder, most recent first.
Use page[cursor] for pagination.
Deleted actions are never returned, and filter[status]=DELETED is
rejected with 400.
| encoder-id required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: 03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the encoder |
| owner required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: owner=03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the Target Account |
| page[cursor] | string Opaque cursor returned in the previous response's links.next. Pass this value to retrieve the next page of results. |
| page[limit] | integer >= 1 Default: 20 Maximum number of resources to return per page. |
| filter[action-type] | string (Encoder Action Type) Enum: "START" "STOP" "RESTART" "START_PAUSED" "PAUSE" "RESUME" "CONFIGURE" "DELETE" "END" "PREPARE_SLATE" "START_SLATE" "SWITCH_SLATE" "STOP_SLATE" "DELETE_FIXED_SLATE" "SCHEDULED" Filter results by action type. A single value only — comma-separated lists are not supported and are rejected with |
| filter[status] | string Enum: "PENDING" "ACTIVE" "INACTIVE" "FIRED" "FAILED" "COMPLETE" Filter results by action status. A single value only — comma-separated lists are not supported and are rejected with |
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
{- "data": [
- {
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
- "type": "encoder-action",
- "attributes": {
- "action-type": "START",
- "status": "ACTIVE",
- "sfn-execution-arn": "arn:aws:states:eu-west-1:123456789012:execution:m2a-encoder-start:f47ac10b"
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}
}
}, - {
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
- "type": "encoder-action",
- "attributes": {
- "action-type": "SCHEDULED",
- "name": "Pre-match graphics",
- "status": "PENDING",
- "settings": {
- "type": "motion-graphics-activate",
- "timing": {
- "type": "immediate"
}, - "username": "gfx-user",
- "duration": 0
}
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}
}
}
], - "links": {
- "next": null
}
}Submits a lifecycle, slate, or scheduled action for an encoder. The
action-type field in the request body determines which schema
applies and how the action is processed.
Lifecycle actions — transition the encoder between states.
Processed asynchronously. status starts as ACTIVE and transitions
to COMPLETE or FAILED.
| Action | Valid from state |
|---|---|
START |
INITIAL |
STOP |
RUNNING |
RESTART |
RUNNING |
START_PAUSED |
INITIAL |
PAUSE |
RUNNING |
RESUME |
PAUSED |
CONFIGURE |
PAUSED |
DELETE |
Any |
END |
RUNNING |
Slate actions — control slate output on a running encoder
(V4 only). Require material-id except for STOP_SLATE and
DELETE_FIXED_SLATE. Use slate-action-type: FIXED with
slate-datetime to fire at a specific time. status starts as
ACTIVE and transitions to COMPLETE or FAILED.
Scheduled actions (SCHEDULED) — submit a runtime-controlled
action directly to the encoder's MediaLive schedule (graphics and
static-image overlays).
IDLE or RUNNING state. Submitting a
SCHEDULED action when the encoder is in any other state returns
409 Conflict.settings.type identifies the action — one of
motion-graphics-activate, motion-graphics-deactivate,
static-image-activate, static-image-deactivate. Any other value
is rejected with 400.settings.timing controls when it fires — immediate or fixed
only. follow timing is not supported here and is rejected with
400.201 Created immediately. status starts as PENDING
and transitions based on the action type — see ScheduleActionStatus.201 body omits password and submitted-at. Fetch the action
by ID to retrieve the password.To delete a SCHEDULED action before it fires, use
DELETE /encoders/{encoder-id}/actions/{action-id}. Only actions in
PENDING status can be deleted.
| encoder-id required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: 03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the encoder |
| owner required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: owner=03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the Target Account |
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
| Content-Type required | string (JsonAPIMediaType) Value: "application/vnd.api+json" The original media type of the resource. |
required | object |
{- "data": {
- "type": "encoder-action",
- "attributes": {
- "action-type": "START"
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}
}
}
}{- "data": {
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
- "type": "encoder-action",
- "attributes": {
- "action-type": "START",
- "status": "ACTIVE",
- "sfn-execution-arn": "arn:aws:states:eu-west-1:123456789012:execution:m2a-encoder-start:f47ac10b"
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}
}
}
}Returns a single action record by its ID.
This is the only endpoint that echoes back a SCHEDULED action's
password; it is resolved from m2a-secret on each request. The
ETag returned here is the value to send as If-Match on a
subsequent DELETE.
Deleted actions are not returned — they respond 404.
| encoder-id required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: 03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the encoder |
| action-id required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: 03ac6692-84b9-11ea-b791-5ff49275eb0b The unique ID of a scheduled action. Returned in the |
| owner required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: owner=03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the Target Account |
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
{- "data": {
- "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
- "type": "encoder-action",
- "attributes": {
- "action-type": "START",
- "status": "ACTIVE",
- "sfn-execution-arn": "arn:aws:states:eu-west-1:123456789012:execution:m2a-encoder-start:f47ac10b"
}, - "relationships": {
- "owner": {
- "data": {
- "type": "target-account",
- "id": "03ac6692-84b9-11ea-b791-5ff49275eb0b"
}
}
}
}
}Deletes a SCHEDULED action that has not yet fired. Only actions with
status: PENDING can be deleted — attempting to delete an action in
any other status (ACTIVE, FIRED, INACTIVE) returns 409 Conflict.
When an If-Match header is supplied, the delete is rejected with
412 Precondition Failed if the resource has been modified since the
ETag was obtained.
The delete is a soft delete: the record is marked deleted and given a
TTL, and any password secret held for it is released. The action stops
appearing in GET responses and in the owning encoder's
settings.schedule-actions, but its ID is not removed from the
encoder record.
Once an action has fired it cannot be undone via this endpoint.
Note: Only SCHEDULED action types are supported. Attempting to
delete a lifecycle or slate action returns 409 Conflict.
| encoder-id required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: 03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the encoder |
| action-id required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: 03ac6692-84b9-11ea-b791-5ff49275eb0b The unique ID of a scheduled action. Returned in the |
| owner required | string (Resource Identifier) ^[a-zA-Z0-9_-]{8,36}$ Example: owner=03ac6692-84b9-11ea-b791-5ff49275eb0b The ID of the Target Account |
| Accept required | string (JsonAPIMediaType) Value: "application/vnd.api+json" Content type (expressed as MIME types) the client is able to understand. |
| If-Match | string ETag value from a previous GET response. Used for optimistic concurrency control. |
{- "errors": [
- {
- "status": "400",
- "title": "Bad Request",
- "detail": "Missing data for required field.",
- "source": {
- "pointer": "/data/attributes/region"
}
}
]
}