Obtaining Video Sources
Function
This API is used to obtain video sources.
URI
GET /v2/{project_id}/source/sources
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. Maximum: 64 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
scope |
No |
String |
Fuzzy search parameter, which is used to search for a video source by name. This parameter is optional. Minimum: 0 Maximum: 255 |
scope_name |
No |
String |
Field name of the fuzzy search parameter, which can be source_name or group_name. This parameter is optional. Default: source_name Maximum: 11 |
status |
No |
Array |
Video source status. The value can be 1 (online), 2 (offline), or 9 (abnormal). This parameter is optional. |
type |
No |
Array |
Type: obs, vcn, url, restful, camera, and ivm |
video_group_id |
No |
Array |
Video source group, which is optional. If this parameter is input, the value must match the regular expression ^[0-9a-zA-Z-_]{1,36}$. |
sort_name |
No |
String |
Sorting option. Options: create_at, num_task, and num_template. This parameter is optional. Default: create_at |
order_by |
No |
String |
Sort order. This parameter is optional. The records are displayed in descending order by default. 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 |
access_type |
No |
Array |
Access type |
platform_name |
No |
String |
Platform name Minimum: 0 Maximum: 100 |
tag |
No |
String |
Tag Minimum: 0 Maximum: 255 |
Request 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
Parameter |
Type |
Description |
---|---|---|
video_source_number |
Integer |
Number of video resources |
total_number |
Integer |
Total number of video sources |
quota_number |
Integer |
Video source quota |
video_source_list |
Array of ListVideoSourceInfoDto objects |
Video source list |
Parameter |
Type |
Description |
---|---|---|
video_source_id |
String |
ID of a created video source |
video_source_name |
String |
Video source name. The value can contain only letters, digits, spaces, and the following special characters: .-_(). It cannot start or end with a space. Minimum length: 1 character Maximum length: 100 characters |
status |
VideoSourceStatusInfoDto object |
Video source status |
access_type |
String |
Access type, which can be cloud or edge. |
type |
String |
Type: obs, vcn, url, restful, and camera |
latitude |
String |
Latitude of the video source. The value ranges from -90.00000 to 90.00000. |
longitude |
String |
Longitude of the video source. The value ranges from -180.00000 to 180.00000. |
create_at |
Long |
Creation time |
video_packages |
Array of VideoGroupInfoDto objects |
Group to which the video source belongs |
num_tasks |
Integer |
Number of running algorithm tasks using the video source |
num_service_config_templates |
Integer |
Number of algorithm service configuration templates |
type_config |
String |
XML file of video source configuration information URL format: [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br]URL[/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] <DATA_SOURCE_ID></DATA_SOURCE_ID> <STREAM_TYPE></STREAM_TYPE> [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br][/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br][/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] <USER_NAME></USER_NAME> [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br][/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] RESTful format: [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br]RESTFUL[/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] <HTTP_CHECK></HTTP_CHECK> [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br][/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] <RTSP_URL></RTSP_URL> [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] Camera format: [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br]CAMERA[/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] <EDGE_CAMERA_ID></EDGE_CAMERA_ID> [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] |
tag |
Array of strings |
Video source tag. A maximum of four tags can be selected. Only letters, digits, hyphens (-), and underscores (_) are allowed. Minimum length: 1 character Maximum length: 10 characters |
stream_path |
String |
Stream address |
scene_recommend |
Array of strings |
Tags recommended by an intelligent algorithm |
video_source_quality |
Array of strings |
Video source quality. Blurry: blurry image; ColorDistortion: color distortion; AbnormalLight: abnormal image light; ScreenSplash: image artifact; ScreenJitter: image jitter; ScreenMovement: image movement; SceneUpheaval: image upheaval; ScreenFreeze: image freezing; BlackScreen: black screen; SnowNoise: static noise; Occlude: blocking; GrayScreen: gray screen; ScreenSmudge: screen smudge |
Parameter |
Type |
Description |
---|---|---|
status |
String |
Video source status |
name |
String |
Status name |
level |
String |
Status level (used for color matching of frontend images) |
Parameter |
Type |
Description |
---|---|---|
video_group_id |
String |
ID of the group to which the video source belongs |
video_group_name |
String |
Name of the group to which the video source belongs |
description |
String |
Description of the group to which the video source belongs |
access_type |
String |
Access type, which can be cloud or edge. |
create_at |
Long |
Creation time |
modify_at |
Long |
Modification time |
num_video_source |
Integer |
Number of video resources |
group_status |
GroupStatusDto object |
Video source status |
num_batch_task |
Integer |
Number of configured batch tasks |
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 |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error description |
detail |
String |
Error details |
params |
Array of strings |
Error parameters Array Length: 0 - 1 |
reason |
String |
Error cause |
advice |
String |
Suggestion |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error description |
detail |
String |
Error details |
params |
Array of strings |
Error parameters Array Length: 0 - 1 |
reason |
String |
Error cause |
advice |
String |
Suggestion |
Example Requests
This request is used to obtain all video sources under an account.
v2/{project_id}/source/sources https://{endpoint}/v2/{project_id}/source/sources?is_paged=true&page_size=10&page_num=1&scope_name=source_name
Example Responses
Status code: 200
Response body for obtaining video sources
{ "video_source_number" : 230, "total_number" : 230, "quota_number" : 5000, "video_source_list" : [ { "video_source_id" : "xxxxxxx-xxxxxxx-xxxxxxx-xxxxx-xxxxxx", "video_source_name" : "url_test", "status" : { "status" : "Online", "name" : "Online", "level" : "1" }, "access_type" : "cloud", "type" : "url", "latitude" : "", "longitude" : "", "create_at" : 1680772763191, "video_packages" : [ ], "num_tasks" : 0, "num_service_config_templates" : 0, "type_config" : "<type_config> <url_address>rtsp://12.12.12.12:333</url_address> </type_config>", "tag" : [ ], "stream_path" : "rtsp://12.12.12.12:333", "device_id" : "1680772763191", "scene_recommend" : [ ], "video_source_quality" : [ ] } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Response body for obtaining video sources |
400 |
Invalid parameter |
500 |
Internal error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot