Create A Live Entity
To start live streaming, you need to create an Live Entity object. Once the request is received, Uiza will allocate resources to serve your live stream.
/v1/live_entities
POST https://api.uiza.sh/v1/live_entities
Request Body
name
string
The live entity name with maximum 100 characters.
region
string
Select an available region in Uiza Network closest to the streamer's location
description
string
Description of the live entity. Useful for displaying to users.
dvr
boolean
Indicates whether Digital Video Recorder (DVR) is enabled for the live_entity. Set as true to enable and as false to disable. The default value is false.
encode
boolean
Indicates whether encoding is enabled for the live_entity. Set as true to enable and as false to disable. The default value is false, when the encode is true, it required a preset_id.
preset_id
string
The identifier of the video_preset to be applied when encoding your signal.
relay
array
A list of ingest servers to be relayed. Contains url and key and name (optional) in each ingest server.
{
"id": "b7f02d48-d0ec-4c34-86d1-247a38eda4e1",
"name": "Test event with encoding",
"description": "Event for Test",
"ingest": null,
"playback": null,
"relay": [
{
"url": "rtmp://youtu.be/live",
"key": "Abco1",
"name": "Youtube 1"
}
],
"region": "in-bangalore-1",
"status": "init",
"dvr": false,
"encode": true,
"preset": {
"id": "9432fa62-5988-11ea-883b-028fc5698662",
"name": "Uiza LIVE 720p",
"description": "",
"is_default": true,
"profiles": [
{
"id": "85844e8b-6281-11ea-883b-028fc5698662",
"name": "720p H264 30fps Normal Latency",
"segment_duration": 4,
"orientation": "landscape",
"video_profile": {
"video_resolution": "720",
"video_codec": "H264",
"video_bitrate": "2000K",
"video_frame_rate": "30"
},
"audio_profile": {
"audio_channel": "2",
"audio_codec": "AAC",
"audio_bitrate": "128K",
"audio_frame_rate": "1"
}
}
],
"created_at": "2020-02-27T17:42:52Z",
"updated_at": "2020-02-29T16:47:34Z"
},
"created_at": "2020-03-23T07:22:34Z",
"updated_at": "2020-03-23T07:22:34Z"
}{
"id": "2b970a39-874a-4d2a-be8a-fd445646d74c",
"name": "Test event without encoding",
"description": "Event for Test",
"region": "in-bangalore-1",
"status": "init",
"dvr": false,
"encode": false,
"ingest": null,
"playback": null,
"relay": [
{
"url": "rtmp://youtu.be/live",
"key": "Abco1",
"name": "Youtube 1"
}
],
"preset": null,
"created_at": "2020-03-23T07:22:34Z",
"updated_at": "2020-03-23T07:22:34Z"
}{
"message": "Your request is missing name parameter. Please, verify and resubmit.",
"error_type": "invalid_request_error"
}{
"message": "Your request is missing region parameter. Please, verify and resubmit.",
"error_type": "invalid_request_error"
}{
"message": "The requested region is invalid. See the list of available regions here: docs.uiza.io/getting-started/regions.",
"error_type": "invalid_request_error"
}{
"message": "You are unauthorized to access the requested resource. Please verify and resubmit.",
"error_type": "invalid_request_error"
}{
"message": "An unexpected error occurred on Uiza's end.",
"error_type": "api_error"
}curl --location --request POST 'https://api.uiza.sh/v1/live_entities' \
--header 'Authorization: uap-c1ffbff4db954ddcb050c6af0b43ba56-41193b64' \
--data-raw '{
"name": "Test event with encoding",
"region": "in-bangalore-1",
"description": "Event for Test",
"encode": false,
"relay": [
{
"url": "rtmp://youtu.be/live",
"key": "Abco1",
"name": "Youtube 1"
}
]
}'curl --location --request POST 'https://api.uiza.sh/v1/live_entities' \
--header 'Authorization: uap-c1ffbff4db954ddcb050c6af0b43ba56-41193b64' \
--data-raw '{
"name": "Test event with encoding",
"region": "in-bangalore-1",
"description": "Event for Test",
"encode": true,
"preset_id": "9432fa62-5988-11ea-883b-028fc5698662",
"relay": [
{
"url": "rtmp://youtu.be/live",
"key": "Abco1"
}
]
}'Last updated
Was this helpful?