Video API, gRPC: StreamService.Create
Create stream.
gRPC request
rpc Create (CreateStreamRequest) returns (operation.Operation)
CreateStreamRequest
{
"channelId": "string",
"lineId": "string",
"title": "string",
"description": "string",
"thumbnailId": "string",
"labels": "string",
// Includes only one of the fields `onDemand`, `schedule`
"onDemand": "OnDemandParams",
"schedule": {
"startTime": "google.protobuf.Timestamp",
"finishTime": "google.protobuf.Timestamp"
}
// end of the list of possible fields
}
Field |
Description |
channelId |
string ID of the channel. |
lineId |
string ID of the line. |
title |
string Stream title. |
description |
string Stream description. |
thumbnailId |
string ID of the thumbnail. |
labels |
string Custom labels as |
onDemand |
On demand stream. It starts immediately when a signal appears. Includes only one of the fields Stream type. |
schedule |
Schedule stream. Determines when to start receiving the signal or finish time. Includes only one of the fields Stream type. |
OnDemandParams
Field |
Description |
Empty |
ScheduleParams
Field |
Description |
startTime |
|
finishTime |
operation.Operation
{
"id": "string",
"description": "string",
"createdAt": "google.protobuf.Timestamp",
"createdBy": "string",
"modifiedAt": "google.protobuf.Timestamp",
"done": "bool",
"metadata": {
"streamId": "string"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"id": "string",
"channelId": "string",
"lineId": "string",
"title": "string",
"description": "string",
"thumbnailId": "string",
"status": "StreamStatus",
"startTime": "google.protobuf.Timestamp",
"publishTime": "google.protobuf.Timestamp",
"finishTime": "google.protobuf.Timestamp",
// Includes only one of the fields `onDemand`, `schedule`
"onDemand": "OnDemand",
"schedule": {
"startTime": "google.protobuf.Timestamp",
"finishTime": "google.protobuf.Timestamp"
},
// end of the list of possible fields
"createdAt": "google.protobuf.Timestamp",
"updatedAt": "google.protobuf.Timestamp",
"labels": "string"
}
// 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 |
Creation timestamp. |
createdBy |
string ID of the user or service account who initiated the operation. |
modifiedAt |
The time when the Operation resource was last modified. |
done |
bool 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. |
CreateStreamMetadata
Field |
Description |
streamId |
string ID of the stream. |
Stream
Field |
Description |
id |
string ID of the stream. |
channelId |
string ID of the channel where the stream was created. |
lineId |
string ID of the line to which stream is linked. |
title |
string Stream title. |
description |
string Stream description. |
thumbnailId |
string ID of the thumbnail. |
status |
enum StreamStatus Stream status.
|
startTime |
Stream start time. |
publishTime |
Stream publish time. Time when stream switched to ONAIR status. |
finishTime |
Stream finish time. |
onDemand |
On demand stream. It starts immediately when a signal appears. Includes only one of the fields Stream type. |
schedule |
Schedule stream. Determines when to start receiving the signal or finish time. Includes only one of the fields Stream type. |
createdAt |
Time when stream was created. |
updatedAt |
Time of last stream update. |
labels |
string Custom labels as |
OnDemand
If "OnDemand" is used, client should start and finish explicitly.
Field |
Description |
Empty |
Schedule
If "Schedule" is used, stream automatically start and finish at this time.
Field |
Description |
startTime |
|
finishTime |