In this article:
Gets the current operational status of a live event, including its resource state and active stream information. This endpoint provides real-time status updates that can be polled to detect when a live stream becomes available for playback. This makes it useful for front-end applications to initialise players when the stream becomes available, with no need for page reloads.
POST https://{{api-endpoint}}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStatus?api-version={api-version}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
accountName |
path | True | string | The RMS account name. |
liveEventName |
path | True | string |
The name of the live event, maximum length is 32. Regex pattern: |
resourceGroupName |
path | True | string | The name of the resource group within the Azure subscription. |
subscriptionId |
path | True | string | The unique identifier for a Microsoft Azure subscription. |
api-version |
query | True: value can be any. | string |
The version of the API to be used with the client request. Required for compatibility; any value accepted; no effect. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK | LiveEventStatus | OK. The request has succeeded. |
| Other Status Codes | ErrorResponse | Detailed error information. |
Examples
| Event not running |
| Passthrough/ABR running without ingest |
| Passthrough/ABR with ingest but manifest not ready |
| Passthrough running with active stream |
| ABR running with active stream |
Request sample
Gets status of a live event.
POST https://{{api-endpoint}}/subscriptions/0a6ec948-5a62-437d-b9df-934dc7c1b722/resourceGroups/mrg-resoursegroup/providers/Microsoft.Media/mediaservices/default/liveEvents/liveEvent1/getStatus?api-version={api-version}Sample Response
Status code: 200
Event not running
Response Body
{
"value": [
{
"state": "Stopped",
"extendedState": "Stopped",
"healthDescriptions": []
}
]
}Passthrough/ABR running without ingest
Response Body
{
"value": [
{
"state": "Running",
"extendedState": "Running",
"healthDescriptions": []
}
]
}Passthrough/ABR with ingest but manifest not ready
Response Body
{
"value": [
{
"state": "Running",
"extendedState": "Running",
"healthDescriptions": [
"Live manifest is not available."
]
}
]
}Passthrough running with active stream
Response Body
{
"value": [
{
"state": "Running",
"extendedState": "Running",
"healthDescriptions": [
"{\"name\":\"live\",\"publishEpochTime\":\"111111111\",\"bandwidth\":\"1111111\",\"videoResolution\":\"1920x1080\",\"videoCodecId\":\"avc1.640028\",\"audioCodecId\":\"mp4a.40.2\",\"protocolType\":\"RTMP\",\"sourceUrl\":null,\"streamName\":\"live\",\"publisherIp\":\"11.111.1.11\",\"publisherPort\":0,\"lastSourceConnectionTime\":-1,\"lastSourceDisconnectionTime\":-1,\"sourceConnectionsCount\":0,\"isSourceOnline\":false,\"isBlocked\":false,\"videoBitrate\":0.0,\"audioBitrate\":0.0,\"videoFps\":0.0,\"lastBitrateUpdate\":0,\"avgVideoBitrate\":0.0,\"avgAudioBitrate\":0.0,\"avgVideoFps\":0.0}"
]
}
]
}ABR running with active stream
Response Body
{
"value": [
{
"state": "Running",
"extendedState": "Running",
"healthDescriptions": [
"{\"name\":\"live\",\"publishEpochTime\":\"1111111111\",\"bandwidth\":\"1111111\",\"videoResolution\":\"1920x1080\",\"videoCodecId\":\"avc1.640028\",\"audioCodecId\":\"mp4a.40.2\",\"protocolType\":\"RTMP\",\"sourceUrl\":null,\"streamName\":\"live\",\"publisherIp\":\"10.244.3.11\",\"publisherPort\":0,\"lastSourceConnectionTime\":-1,\"lastSourceDisconnectionTime\":-1,\"sourceConnectionsCount\":0,\"isSourceOnline\":false,\"isBlocked\":false,\"videoBitrate\":0.0,\"audioBitrate\":0.0,\"videoFps\":0.0,\"lastBitrateUpdate\":0,\"avgVideoBitrate\":0.0,\"avgAudioBitrate\":0.0,\"avgVideoFps\":0.0}",
"[{\"name\":\"livesource_720p\",\"publishEpochTime\":\"111111111\",\"bandwidth\":\"1111111\",\"videoResolution\":\"1280x720\",\"videoCodecId\":\"avc1.42c01f\",\"audioCodecId\":\"mp4a.40.2\",\"protocolType\":\"RTMP\",\"sourceUrl\":null,\"streamName\":\"livesource_720p\",\"publisherIp\":\"11.111.1.1\",\"publisherPort\":0,\"lastSourceConnectionTime\":-1,\"lastSourceDisconnectionTime\":-1,\"sourceConnectionsCount\":0,\"isSourceOnline\":false,\"isBlocked\":false,\"videoBitrate\":0.0,\"audioBitrate\":0.0,\"videoFps\":0.0,\"lastBitrateUpdate\":0,\"avgVideoBitrate\":0.0,\"avgAudioBitrate\":0.0,\"avgVideoFps\":0.0},{\"name\":\"livesource_480p\",\"publishEpochTime\":\"111111111\",\"bandwidth\":\"1111111\",\"videoResolution\":\"856x480\",\"videoCodecId\":\"avc1.42c01f\",\"audioCodecId\":\"mp4a.40.2\",\"protocolType\":\"RTMP\",\"sourceUrl\":null,\"streamName\":\"livesource_480p\",\"publisherIp\":\"11.111.1.1\",\"publisherPort\":0,\"lastSourceConnectionTime\":-1,\"lastSourceDisconnectionTime\":-1,\"sourceConnectionsCount\":0,\"isSourceOnline\":false,\"isBlocked\":false,\"videoBitrate\":0.0,\"audioBitrate\":0.0,\"videoFps\":0.0,\"lastBitrateUpdate\":0,\"avgVideoBitrate\":0.0,\"avgAudioBitrate\":0.0,\"avgVideoFps\":0.0},{\"name\":\"livesource_360p\",\"publishEpochTime\":\"111111111\",\"bandwidth\":\"1111111\",\"videoResolution\":\"640x360\",\"videoCodecId\":\"avc1.42c01e\",\"audioCodecId\":\"mp4a.40.2\",\"protocolType\":\"RTMP\",\"sourceUrl\":null,\"streamName\":\"livesource_360p\",\"publisherIp\":\"11.111.1.1\",\"publisherPort\":0,\"lastSourceConnectionTime\":-1,\"lastSourceDisconnectionTime\":-1,\"sourceConnectionsCount\":0,\"isSourceOnline\":false,\"isBlocked\":false,\"videoBitrate\":0.0,\"audioBitrate\":0.0,\"videoFps\":0.0,\"lastBitrateUpdate\":0,\"avgVideoBitrate\":0.0,\"avgAudioBitrate\":0.0,\"avgVideoFps\":0.0},{\"name\":\"livesource_240p\",\"publishEpochTime\":\"1111111111\",\"bandwidth\":\"111111\",\"videoResolution\":\"428x240\",\"videoCodecId\":\"avc1.42c015\",\"audioCodecId\":\"mp4a.40.2\",\"protocolType\":\"RTMP\",\"sourceUrl\":null,\"streamName\":\"livesource_240p\",\"publisherIp\":\"11.111.1.1\",\"publisherPort\":0,\"lastSourceConnectionTime\":-1,\"lastSourceDisconnectionTime\":-1,\"sourceConnectionsCount\":0,\"isSourceOnline\":false,\"isBlocked\":false,\"videoBitrate\":0.0,\"audioBitrate\":0.0,\"videoFps\":0.0,\"lastBitrateUpdate\":0,\"avgVideoBitrate\":0.0,\"avgAudioBitrate\":0.0,\"avgVideoFps\":0.0},{\"name\":\"liveEvent1\",\"publishEpochTime\":\"1111111111\",\"bandwidth\":\"1111111\",\"videoResolution\":\"1920x1080\",\"videoCodecId\":\"avc1.42c028\",\"audioCodecId\":\"mp4a.40.2\",\"protocolType\":\"RTMP\",\"sourceUrl\":null,\"streamName\":\"liveEvent1\",\"publisherIp\":\"11.111.1.1\",\"publisherPort\":0,\"lastSourceConnectionTime\":-1,\"lastSourceDisconnectionTime\":-1,\"sourceConnectionsCount\":0,\"isSourceOnline\":false,\"isBlocked\":false,\"videoBitrate\":0.0,\"audioBitrate\":0.0,\"videoFps\":0.0,\"lastBitrateUpdate\":0,\"avgVideoBitrate\":0.0,\"avgAudioBitrate\":0.0,\"avgVideoFps\":0.0}]"
]
}
]
}
Definitions
| Name | Description |
|---|---|
| ErrorAdditionalInfo | The resource management error additional info. |
| ErrorDetail | The error detail. |
| ErrorResponse | Error response. |
| LiveEventHealthDescriptions | Stream readiness indicators for the live event. This array provides information about the playback availability of the live stream, independent of the event's resource state. The content and interpretation of this array depend on both the state and the streaming conditions. |
| LiveEventState | The |
| LiveEventExtendedState | Indicates the detailed lifecycle state of the live event, including transitional phases. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info | object | The additional info. |
| type | string | The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo | ErrorAdditionalInfo | The error additional info. |
| code | string | The error code. |
| details | ErrorDetail | The error details. |
| message | string | The error message. |
| target | string | The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error | ErrorDetail | The error object. |
LiveEventHealthDescriptions
Indicates stream readiness and playback availability. Its contents vary based on the live event's operational state and streaming conditions.
| Name | Type | Description |
|---|---|---|
Empty array []
|
string | No encoder has connected. |
Live manifest is not available. |
string | Encoder has connected and is sending data, but the HLS manifest is not yet ready for playback. This is a transient state during stream initialization. Clients should wait before attempting playback. |
|
JSON array containing stream data:
|
string |
Single JSON string. Stream is playable. For Passthrough live events, this contains ingest details. This indicates the HLS manifest is available with at least one playable quality. Contains a JSON-encoded object with detailed ingest stream information including source codec details, resolution, bandwidth, publisher information, and real-time streaming metrics. See Example. |
|
JSON arrays containing stream data:
|
string |
Two JSON strings. Stream is playable. For ABR live events, the presence of both entries indicates the HLS manifest is available with multiple qualities. The first entry is a JSON-encoded object containing source ingest details (codec, resolution, bandwidth, publisher info, and streaming metrics). The second entry is a JSON-encoded array listing all transcoded quality levels with their respective stream properties. For ABR live events, the presence of both entries indicates the HLS manifest is available with multiple transcoded qualities ready for adaptive bitrate streaming. See Example. |
LiveEventState
The state field should be used only to determine whether the live event is fully running or fully stopped.
| Name | Type | Description |
|---|---|---|
| Stopped | string | This is the initial state of the live event after creation (unless autostart was set to true.) No billing occurs in this state. In this state, the live event properties can be updated but streaming is not allowed. |
| Running | string | The live event resources have been allocated, ingest URL have been generated, and it is capable of receiving live streams. At this point, billing is active. You must explicitly call Stop on the live event resource to halt further billing. |
LiveEventExtendedState
Indicates the detailed lifecycle state of the live event, including transitional phases.
| Name | Type | Description |
|---|---|---|
| Stopped | string | This is the initial state of the live event after creation (unless autostart was set to true.) No billing occurs in this state. In this state, the live event properties can be updated but streaming is not allowed. |
| Running | string | The live event resources have been allocated, ingest URL have been generated, and it is capable of receiving live streams. At this point, billing is active. You must explicitly call Stop on the live event resource to halt further billing. |
| Starting | string | The live event is being started and resources are being allocated. No billing occurs in this state. Updates or streaming are not allowed during this state. If an error occurs, the live event returns to the Stopped state. |
| Stopping | string | The live event is being stopped and resources are being de-provisioned. No billing occurs in this transient state. Updates or streaming are not allowed during this state. |