Video API, REST: Stream.Update
Updates an existing stream's metadata and settings.
Only fields specified in the field_mask will be updated.
HTTP request
PATCH https://video.api.yandexcloud.kz/video/v1/streams/{streamId}
Path parameters
|
Field |
Description |
|
streamId |
string Required field. ID of the stream. The maximum string length in characters is 50. |
Body parameters
{
"fieldMask": "string",
"lineId": "string",
"title": "string",
"description": "string",
"thumbnailId": "string",
"autoPublish": "boolean",
"labels": "object",
// Includes only one of the fields `onDemand`, `schedule`
"onDemand": "object",
"schedule": {
"startTime": "string",
"finishTime": "string"
}
// end of the list of possible fields
}
|
Field |
Description |
|
fieldMask |
string (field-mask) Required field. A comma-separated names off ALL fields to be updated. If |
|
lineId |
string DEPRECATED. The maximum string length in characters is 50. |
|
title |
string Stream title. The maximum string length in characters is 300. |
|
description |
string Stream description. The maximum string length in characters is 4000. |
|
thumbnailId |
string ID of the thumbnail. The maximum string length in characters is 50. |
|
autoPublish |
boolean Automatically publish stream when ready. |
|
labels |
object (map<string, string>) New custom labels for the stream as No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression |
|
onDemand |
object On demand stream. Includes only one of the fields Stream type. |
|
schedule |
Scheduled stream. Includes only one of the fields Stream type. |
ScheduleParams
|
Field |
Description |
|
startTime |
string (date-time) Required field. Scheduled time when the stream should automatically start. String in RFC3339 To work with values in this field, use the APIs described in the |
|
finishTime |
string (date-time) Required field. Scheduled time when the stream should automatically finish. String in RFC3339 To work with values in this field, use the APIs described in the |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": {
"streamId": "string"
},
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": {
"id": "string",
"channelId": "string",
"lineId": "string",
"title": "string",
"description": "string",
"thumbnailId": "string",
"status": "string",
"startTime": "string",
"publishTime": "string",
"finishTime": "string",
"autoPublish": "boolean",
// Includes only one of the fields `onDemand`, `schedule`
"onDemand": "object",
"schedule": {
"startTime": "string",
"finishTime": "string"
},
// end of the list of possible fields
"createdAt": "string",
"updatedAt": "string",
"labels": "object"
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
createdBy |
string ID of the user or service account who initiated the operation. |
|
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
UpdateStreamMetadata
|
Field |
Description |
|
streamId |
string ID of the stream. |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |
Stream
Entity representing a live video stream.
A stream is a real-time video broadcast linked to a specific stream line.
|
Field |
Description |
|
id |
string Unique identifier of the stream. |
|
channelId |
string Identifier of the channel where the stream is created and managed. |
|
lineId |
string Identifier of the stream line to which this stream is linked. |
|
title |
string Title of the stream displayed in interfaces and players. |
|
description |
string Detailed description of the stream content and context. |
|
thumbnailId |
string Identifier of the thumbnail image used to represent the stream visually. |
|
status |
enum (StreamStatus) Current status of the stream.
|
|
startTime |
string (date-time) Timestamp when the stream was initiated. String in RFC3339 To work with values in this field, use the APIs described in the |
|
publishTime |
string (date-time) Timestamp when the stream was published (switched to ONAIR status). String in RFC3339 To work with values in this field, use the APIs described in the |
|
finishTime |
string (date-time) Timestamp when the stream was completed. String in RFC3339 To work with values in this field, use the APIs described in the |
|
autoPublish |
boolean Controls automatic publishing of the stream when it's ready. |
|
onDemand |
object On-demand stream starts immediately when a video signal appears. Includes only one of the fields Specifies the stream scheduling type. |
|
schedule |
Scheduled stream starts and finishes at specified time. Includes only one of the fields Specifies the stream scheduling type. |
|
createdAt |
string (date-time) Timestamp when the stream was initially created in the system. String in RFC3339 To work with values in this field, use the APIs described in the |
|
updatedAt |
string (date-time) Timestamp of the last modification to the stream or its metadata. String in RFC3339 To work with values in this field, use the APIs described in the |
|
labels |
object (map<string, string>) Custom user-defined labels as |
Schedule
Represents a scheduled stream type.
This type of stream starts and finishes automatically at specified time.
|
Field |
Description |
|
startTime |
string (date-time) Scheduled time when the stream should automatically start. String in RFC3339 To work with values in this field, use the APIs described in the |
|
finishTime |
string (date-time) Scheduled time when the stream should automatically finish. String in RFC3339 To work with values in this field, use the APIs described in the |