Download OpenAPI specification:Download
Endpoints to perform CRUD (create, read, update, delete) operations on stream-endpoints.
The Stream Endpoints API will allow users of m2a product like workflow to retrieve stream playback endpoints to be used for streaming.
Terminology
This endpoint will return a changed feed of all the latest changes made to endpoints, including changes to publication state.
This API should be called periodically to discover new endpoints. It should not be called more than once every 60 seconds for any given customer account.
This list notes which records have changed along with each record's last-updated timestamp and metadata
labels (such as the endpoint name). It does not include the full record detail like the endpoint URLs or
streaming protocol. The full record details for changed records should be retrieved using the
get endpoints API. The change feed does not include the
endpoint details to avoid any misinterpretation due to processing changes in the wrong order - by doing a
separate lookup for each endpoint record the calling application will always see up-to-date data.
By default the API will return the recent changes made in the last 24 hours.
The response may be split across multiple 'pages' if there are lots of results. The 'next' link should be
followed if present to retrieve more results, and this process should be repeated until the response does not
have a next URI
Use the filter[last_updated] query string parameter to get a smaller set of changes. The API
will get all the endpoints changed after the supplied last_updated query parameter. The calling application
can use this to optimise the number of records that need to be processed over successive calls to this API by
remembering the largest last-updated value seen on any record processed so far, and supplying that value on
subsequent API calls. This will avoid returning all endpoints changed in the last 24 hours on every invocation.
| owner required | string <uuid> Example: owner=7845419f-ca72-4cb1-b769-1bed5d8700b0 Target account ID |
| filter[last_updated] | string <date-time> Example: filter[last_updated]=2023-06-14T14:00:00.000+00:00 This field is optional and can be used to filter the response by specifying results that were last updated after a given time. If this field is not present, the result set will include only those that have been updated in the last 24 hours. If the provided value is more than 24 hours in the past, the service will still only return results from the past 24 hours. It is not possible to extend the time window for events beyond 24 hours. |
| next | string Example: next=UHl0aG9uIGlzIGF3ZXNvbWUh A base64 encoded key to the next page of stream-endpoints |
| Accept required | string Example: application/vnd.api+json Content type (expressed as MIME types)the client is able to understand. |
{- "links": {
- "next": "/api/stream-endpoint/v1/recent?next=eyJwayI6IHsiUyI6ICIwOThjNzM0NC05N jQ5LTQyYWUtYTA5Ny0xMzJjN2ZiYWZjNTMjYTM3OWIzYmYtNGFmMi00ZThkLWE4N mEtZGY0MjRmNGY3YmUwIn0sICJzayI6IHsiUyI6ICJvd25lciMwOThjNzM0NC05N jQ5LTQyYWUtYTA5Ny0xMzJjN2ZiYWZjNTMifSwgImVuZF90aW1lIjogeyJTIjogI jIwMjItMDktMTNUMTg6MTQ6MTUuMzMwNDUzKzAwMDAifX0%3D&owner=098c7344 -9649-42ae-a097-132c7fbafc53"
}, - "data": [
- {
- "type": "endpoint",
- "id": "2368419f-ca72-4cb1-b769-1bed5d8700b0",
- "attributes": {
- "last-updated": "2023-05-22T08:47:29.000Z",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Example Channel"
}
]
}
}
}, - {
- "type": "endpoint",
- "id": "2368419f-ca72-4cb1-b769-1bed5d8700b0",
- "attributes": {
- "last-updated": "2023-05-22T08:47:29.000Z",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Example Channel"
}
]
}
}
}
]
}Retrieve the list of stream endpoints for an owner.
The owner query parameter is required. The result set may then be refined with these optional filters:
publication-state — filter by publication state.relationship[...] parameter — relationship[event], relationship[workflow-instance],
relationship[encoder] or relationship[packager].The relationship filters are mutually exclusive: supplying more than one in a single request is rejected
with a 400 Bad Request. The supported filter combinations are:
| Filters | Supported |
|---|---|
owner only |
yes |
owner + publication-state |
yes |
owner + one relationship[...] |
yes |
owner + one relationship[...] + publication-state |
yes |
owner + more than one relationship[...] |
no — 400 Bad Request |
The response may be split across multiple 'pages' if there are lots of results. The 'next' link should be followed if present to retrieve more results.
| owner required | string <uuid> Example: owner=7845419f-ca72-4cb1-b769-1bed5d8700b0 Target account ID |
| relationship[event] | string <uuid> Example: relationship[event]=4875419f-ca72-4cb1-b769-1bed5d8700b0 Related event id |
| relationship[workflow-instance] | string <uuid> Example: relationship[workflow-instance]=1235419f-ca72-4cb1-b769-1bed5d8700b0 Related workflow instance id |
| relationship[encoder] | string <uuid> Example: relationship[encoder]=9c2e1f4a-7b3d-4e8a-9f10-2c5d6e7a8b9c Related MediaLive encoder id |
| relationship[packager] | string <uuid> Example: relationship[packager]=5a8b3c2d-1e9f-4a7b-8c6d-3e2f1a0b9c8d Related MediaPackage packager id |
| publication-state | string Enum: "PUBLISHED" "UNPUBLISHED" "PRETX" Example: publication-state=PUBLISHED This field is optional and can be used to filter out the endpoints by publication state |
| next | string Example: next=UHl0aG9uIGlzIGF3ZXNvbWUh A base64 encoded key to the next page of stream-endpoints |
| Accept required | string Example: application/vnd.api+json Content type (expressed as MIME types)the client is able to understand. |
{- "data": [
- {
- "attributes": {
- "type": "Mediapackage_Proxy",
- "last-updated": "2023-10-31T09:19:42.365296+00:00",
- "metadata": {
- "created": "2023-10-31T09:19:42.365242+00:00",
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Example Channel"
}
], - "updated": "2023-10-31T09:19:42.365256+00:00"
}, - "name": "HLS-HI-RES",
- "publication-state": "PUBLISHED",
- "streaming-protocol": "hls",
}, - "id": "51a91255-2797-4d12-83e1-b8ad36fe5d44",
- "relationships": {
- "event": {
- "data": {
- "id": "aed1fa6f-3521-40d0-90fc-1b7ce9da14be",
- "type": "event"
}
}, - "owner": {
- "data": {
- "id": "5e4fb584-f094-426e-be90-4c74dd1dbb40",
- "type": "owner"
}
}, - "workflow": {
- "data": {
- "id": "af89c890-e8c8-47a2-a495-a5e8990bda73",
- "type": "workflow-instance"
}
}, - "encoder": {
- "data": {
- "id": "9c2e1f4a-7b3d-4e8a-9f10-2c5d6e7a8b9c",
- "type": "encoder"
}
}, - "packager": {
- "data": {
- "id": "5a8b3c2d-1e9f-4a7b-8c6d-3e2f1a0b9c8d",
- "type": "packager"
}
}
}, - "type": "stream-endpoint"
}, - {
- "attributes": {
- "type": "Mediapackage_Proxy",
- "last-updated": "2023-12-01T06:31:51.958042+00:00",
- "metadata": {
- "created": "2023-12-01T06:31:51.957962+00:00",
- "labels": [ ],
- "updated": "2023-12-01T06:31:51.957978+00:00"
}, - "name": "HLS-HI-RES",
- "publication-state": "PUBLISHED",
- "streaming-protocol": "hls",
}, - "id": "238a786d-5a8e-42c8-91d3-42c5f9acbb25",
- "relationships": {
- "event": {
- "data": {
- "id": "2cabe1e2-e65a-4918-ad58-5a1969c1a612",
- "type": "event"
}
}, - "owner": {
- "data": {
- "id": "5e4fb584-f094-426e-be90-4c74dd1dbb40",
- "type": "owner"
}
}, - "workflow": {
- "data": {
- "id": "951c1ab2-2461-4bdd-84c9-fc679ef7c783",
- "type": "workflow-instance"
}
}
}, - "type": "stream-endpoint"
}, - {
- "attributes": {
- "type": "Mediapackage_Proxy",
- "last-updated": "2023-10-31T09:21:38.401506+00:00",
- "metadata": {
- "created": "2023-10-31T09:21:38.401442+00:00",
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Example Channel"
}
], - "updated": "2023-10-31T09:21:38.401459+00:00"
}, - "name": "HLS-HI-RES",
- "publication-state": "PUBLISHED",
- "streaming-protocol": "hls",
}, - "id": "c5e67f27-283f-40a6-b1fd-2c687c4fe9b7",
- "relationships": {
- "event": {
- "data": {
- "id": "24523e2e-7c88-4655-9d78-af87749439b5",
- "type": "event"
}
}, - "owner": {
- "data": {
- "id": "5e4fb584-f094-426e-be90-4c74dd1dbb40",
- "type": "owner"
}
}, - "workflow": {
- "data": {
- "id": "a8e6741e-5a66-401a-804a-2f9b28b319f2",
- "type": "workflow-instance"
}
}
}, - "type": "stream-endpoint"
}
], - "links": {
- "next": "/api/stream-endpoint/v1/endpoints?next=eyJwdWJsaWNhdGlvbl9zdGF0ZSI6IHsiUyI6ICJQVUJMSVNIRUQifSwgImlkIjogeyJTIjogImY2ZTJhYzM1LWNiNmUtNDhmZC04N2U3LTc1NGVmMDdmNDQ4OCJ9LCAidGFyZ2V0X2FjY291bnRfaWQiOiB7IlMiOiAiNWU0ZmI1ODQtZjA5NC00MjZlLWJlOTAtNGM3NGRkMWRiYjQwIn19&owner=5e4fb584-f094-426e-be90-4c74dd1dbb40"
}
}This endpoint allows retrieval of detailed information for a specific stream endpoint, identified by its unique ID. It provides key attributes such as streaming protocol, URL, last updated timestamp, publication state, and associated metadata.
This API will no longer allow retrieval of the endpoint record more than 48 hours after its publication-state
changes to UNPUBLISHED.
| endpoint_id required | string |
| owner required | string <uuid> Example: owner=7845419f-ca72-4cb1-b769-1bed5d8700b0 Target account ID |
| Accept required | string Example: application/vnd.api+json Content type (expressed as MIME types)the client is able to understand. |
{- "data": {
- "type": "endpoint",
- "id": "2368419f-ca72-4cb1-b769-1bed5d8700b0",
- "attributes": {
- "type": "Mediapackage_Proxy",
- "streaming-protocol": "hls",
- "last-updated": "2023-05-22T08:47:29.000Z",
- "publication-state": "PUBLISHED",
- "name": "endpoint-name",
- "metadata": {
- "labels": [
- {
- "key": "somekey",
- "value": "somevalue"
}
]
}
}, - "relationships": {
- "event": {
- "data": {
- "id": "d4367a69-122c-4857-bbfb-48eacfe3c8f2",
- "type": "event"
}
}, - "owner": {
- "data": {
- "id": "2341bf5b-18b5-4e3e-92bd-e9077f2083ea",
- "type": "owner"
}
}, - "workflow": {
- "data": {
- "id": "1161bf5b-18b5-4e3e-92bd-e9077f2083ea",
- "type": "workflow-instance"
}
}
}
}
}