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

Obtaining Video Source Groups

Function

This API is used to obtain video source groups.

URI

GET /v2/{project_id}/video-group/groups

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

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

sort_name

No

String

Sorting option, which is optional. The value can be create_at, modify_at, num_video_source, or num_task.

Default: create_at

order_by

No

String

Sort order, which is optional. The value can be desc or asc. The default value is desc.

Default: desc

is_paged

No

Boolean

Whether to display records on different pages

Default: false

page_size

No

Integer

Number of records displayed on each page

Minimum: 5

Maximum: 200

Default: 10

page_num

No

Integer

Page number

Minimum: 1

Maximum: 100000

Default: 1

name

No

String

Fuzzy search parameter, which is used to search for a video source group by group name

Maximum: 20

status

No

String

Status for filtering. Options: 1, 2, and 9.

access_type

No

Array

Access type used for filtering. The options include cloud and edge. Multiple options can be selected.

has_task

No

Boolean

Whether the video source has been used in a batch task

Default: false

type

No

Array

Video source type for filtering. Options: obs, vcn, url, restful, and camera

Request Parameters

Table 3 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.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

video_group_number

Integer

Number of groups

total_number

Integer

Total number of video source groups

quota_number

Integer

Maximum number of video source groups

video_group_list

Array of VideoGroupListInfoDto objects

Group list

Table 5 VideoGroupListInfoDto

Parameter

Type

Description

video_group_id

String

ID of a video source group

video_group_name

String

Name of a video source group

num_video_source

Integer

Number of video resources

group_status

GroupStatusDto object

Status of video sources in a group

access_type

String

Access type

create_at

Long

Creation time

modify_at

Long

Last modification time

num_batch_task

Integer

Number of configured batch tasks

type

String

Type of video sources in a group

Table 6 GroupStatusDto

Parameter

Type

Description

num_online

Integer

Number of online video sources

num_exception

Integer

Number of abnormal video sources

num_offline

Integer

Number of offline video sources

Example Requests

This request is used to obtain all video source groups under an account.

/v2/{project_id}/videoGroup/groups?is_paged=true&page_size=10&page_num=1

https://{endpoint}/v2/{project_id}/videoGroup/groups?is_paged=true&page_size=10&page_num=1

Example Responses

Status code: 200

Response body for obtaining video source groups

{
  "video_group_number": 23,
  "total_number": 23,
  "quota_number": 200,
  "video_group_list": [
    {
      "video_group_id": "a9334780-a53c-454e-a3c1-259c54678ec1",
      "video_group_name": "test000",
      "num_video_source": 2,
      "group_status": {
        "num_online": 2,
        "num_exception": 0,
        "num_offline": 0
      },
      "access_type": "cloud",
      "create_at": 1680773327730,
      "modify_at": 1680773463291,
      "num_batch_task": 0,
      "type": "restful"
    }
}

Status Codes

Status Code

Description

200

Response body for obtaining video source groups

Error Codes

See Error Codes.