Uiza Documentation
2020-05-28
2020-05-28
  • Hola! 👋
  • Getting Started
    • Introduction
    • Authentication
    • Errors
    • Quick Starts
      • Live Streaming
      • Video Streaming
    • Pagination
    • Recommended Specifications
    • Postman Collections
    • Sample Streaming Apps
      • NodeJS Live Streaming App
      • Java Live Streaming App
      • Python Live Streaming App
      • How to integrate live streaming into an Android App using Uiza’s Live API
    • Versioning
  • API Reference
    • Live Entities
      • Create A Live Entity
      • Retrieve A Live Entity
      • Update A Live Entity
      • [Deprecated] Update A Live Entity
      • Delete A Live Entity
      • List All Live Entities
      • [Deprecated] Enable Live Entity DVR
      • [Deprecated] Disable Live Entity DVR
      • Reset Ingest Key
    • Live Sessions
      • Retrieve A Live Session
      • List All Live Sessions
    • Video Entities
      • Retrieve A Video Entity
      • Update A Video Entity
      • Publish A Video Entity
      • Delete A Video Entity
      • List All Video Entities
    • Video Presets
      • Create a Video Preset
      • Retrieve a Video Preset
      • Update a Video Preset
      • Delete a Video Preset
      • List all Video Presets
      • Add Profile(s) to Video Preset
      • Remove Profile(s) from Video Preset
    • Video Profiles
      • List All Video Profiles
    • Events
      • Retrieve An Event
      • List All Events
      • Event Types
    • Webhook Endpoints
      • Create Webhook Endpoint
      • Retrieve Webhook Endpoint
      • Update Webhook Endpoint
      • [Deprecated] Update Webhook Endpoint
      • Delete Webhook Endpoint
      • List All Webhook Endpoints
      • [Deprecated] Enable A Webhook Endpoint
      • [Deprecated] Disable A Webhook Endpoint
  • SDK REFERENCE
    • Introduction
    • Android SDK
      • Android Player SDK
      • Android Broadcast SDK
    • iOS SDK
      • iOS Player SDK
      • iOS Broadcast SDK
    • Web Player SDK
  • API UPGRADES
    • Release Notes
    • API Changelog
Powered by GitBook
On this page

Was this helpful?

  1. API Reference
  2. Live Entities

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
Type
Description

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"
}
[Live entity without encoding] Sample Request
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"
        }
    ]
}'
[Live entity with encoding] Sample Request
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"
        }
    ]
}'

Defining your region helps Uiza allocate the resources that are closest to your streamers' locations. This will minimize the risks of network issues. While we are adding more and more regions to our network, here are the currently available regions.

in-bangalore-1 (Bangalore - India)

in-mumbai-1 (Mumbai - India)

sg-singapore-1 (Singapore - Singapore)

vn-saigon-1 (Ho Chi Minh City - Vietnam)

id-jakarta-1 (Jakarta - Indonesia)

us-oregon-1 (Oregon - USA)

aus-sydney-1 (Sydney - Australia)

ie-dublin-1 (Dublin - Ireland)

PreviousLive EntitiesNextRetrieve A Live Entity

Last updated 4 years ago

Was this helpful?