POST New Live Video
Overview
The table below provides key details about the POST
method to create a new Live Video.
POST New Live Video | |
---|---|
Method | POST |
URL or Endpoint | /api/v1/projectId /live-videos |
Headers | Authorization |
Content Type | application/json |
Parameters | projectId |
Request Body | Check the request body below |
The description of the URL parameter is as follows:
projectId URL Parameter | |
---|---|
URL Parameter Name | projectId |
Mandatory | Yes |
Type | string |
Description | Unique Id of the project. |
Request Body
{
"title": "string",
"description": "string",
"channelId": "string",
"dvrEnabled": true,
"rewindTypeId": 0,
"rewindDuration": 0,
"author": "string",
"publishDate": "2024-11-11T09:12:46.112Z",
"publishEndDate": "2024-11-11T09:12:46.112Z"
}
The description of the body parameters is as follows:
Parameter Name | Mandatory | Type | Description |
---|---|---|---|
title | Yes | string | Title of the live video. |
description | No | string | Description of the live video. |
channelId | Yes | string | Unique identifier of the channel. |
dvrEnabled | No | boolean | Enables DVR (Digital Video Recording) for the live video. |
rewindTypeId | No | integer | Type of rewind feature for the live video. |
rewindDuration | No | integer | Duration in seconds for which rewind is allowed. |
Author | No | string | The name of the author of the live video. |
publishDate | No | string (ISO 8601 datetime) | Date and time when the live video is published in UTC. |
publishEndDate | No | string (ISO 8601 datetime) | Date and time when the live video publishing ends in UTC. |
You can set the rewindTypeId
parameter to define how far users can rewind during a live video.
For more information visit Rewind Types API
Response
{
"success": true,
"errors": [
"string"
],
"messages": [
"string"
],
"result": {
"publicId": "string",
"id": "string",
"name": "string",
"title": "string",
"description": "string",
"playbackUrl": "string",
"thumbnail": "string",
"channelPublicId": "string",
"channelName": "string",
"channelTitle": "string",
"liveStatus": "string",
"author": "string",
"publishDate": "2024-11-11T09:22:05.928Z",
"publishEndDate": "2024-11-11T09:22:05.928Z",
"dvrEnabled": true,
"canCutAndPublish": true,
"canStopAndCut": true,
"canStopWithoutSaving": true
},
"resultInfo": "string",
"statusCode": 0
}
- Live: The live video is currently streaming.
- Offline: The live video is not active or streaming.
- Processing: The live video is being processed, such as for playback or storage.
- Interrupted: The live video stream was disrupted due to a technical issue or connection problem.
Information about the fields that appear when you receive the response are displayed in the table below.
Field Name | Type | Description |
---|---|---|
success | boolean | If the response is successful, this returns true; otherwise, false. |
errors | array[string] | List of error messages, if any. |
messages | array[string] | List of informational or status messages. |
result | object | Contains the main response data for the live video. |
publicId | string | Public identifier for the live video. |
id | string | Unique identifier of the live video. |
name | string | Randomly generated GUID for the live video. |
title | string | Title of the live video. |
description | string | Description of the live video. |
playbackUrl | string | URL where the livestream can be accessed for playback. |
thumbnail | string | URL of the live video's thumbnail image. |
channelPublicId | string | Unique identifier of the channel related to the live video. |
channelName | string | Name of the channel. |
channelTitle | string | Title of the channel. |
liveStatus | string | Current status of the live video.(Live, Offline, Processing, Interrupted) |
author | string | Author of the live video. |
publishDate | string (ISO 8601 datetime) | Date and time when the video was published. |
publishEndDate | string (ISO 8601 datetime) | End date and time for the publication of the video. |
dvrEnabled | boolean | Indicates if DVR is enabled for the live video. |
canCutAndPublish | boolean | Indicates if the video can be cut and published. |
canStopAndCut | boolean | Indicates if the video can be stopped and cut. |
canStopWithoutSaving | boolean | Indicates if the video can be stopped without saving. |
resultInfo | string | Additional information about the result. |
statusCode | integer | HTTP status code returned by the response. |
If the action is successful, the service sends back an HTTP 200 or 201 response.
Errors
For information about the errors that are common to all actions, see Common Errors:
HTTP Status Code 400: Bad Request
HTTP Status Code 401: Unauthorized
HTTP Status Code 403: Forbidden
HTTP Status Code 404: Result Not Found
HTTP Status Code 500: Internal Server Error
HTTP Status Code 503: Backend Fetch Failed