Updated on 2024-04-22 GMT+08:00

Creating a Video Source Group

Function

This API is used to create video source groups.

URI

POST /v2/{project_id}/video-group

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

Maximum: 64

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. For details about how to obtain a user token, see Authentication.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

video_group_name

Yes

String

Video source group name. The value is a string of 1 to 20 characters consisting of only letters and digits.

Maximum: 20

description

No

String

Video source group description

Maximum: 100

access_type

Yes

String

Access type. The value can only be cloud or edge.

Maximum: 5

video_source_ids

No

Array of strings

Video source IDs. An ID is a string of 4 to 36 characters consisting of lowercase letters, digits, hyphens (-), and underscores (_).

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

video_group_id

String

Video source group ID

Example Requests

Request body for creating a video source group

/v2/{project_id}/video-group

{
  "video_source_ids" : [ "xxxxxxx-xxxxxxx-xxxxxxx-xxxxx-xxxxxx" ],
  "video_group_name" : "test000",
  "description" : "",
  "access_type" : "cloud"
}

Example Responses

Status code: 200

Operation successful

{
  "video_group_id" : "a9334780-a53c-454e-a3c1-259c54678ec1"
}

Status Codes

Status Code

Description

200

Operation successful

Error Codes

See Error Codes.