获取视频源列表
功能介绍
获取视频源列表。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v2/{project_id}/source/sources
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
用户项目ID,获取方法参见获取项目ID和名称。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
scope |
否 |
String |
模糊查找参数,可选,根据名称查找。长度范围[0,255]。 |
|
scope_name |
否 |
String |
模糊查找参数字段名,可选,名称(取值source_name)或分组名称(取值group_name)。 |
|
status |
否 |
Array of strings |
视频源状态,可选,取值为1 2 9,分别代表在线、离线、异常。 |
|
type |
否 |
Array of strings |
视频源类型列表。视频源类型:
|
|
video_group_id |
否 |
Array of strings |
视频源分组,可选。若传入则需要符合正则表达式^[0-9a-zA-Z-_]{1,36}$。 |
|
sort_name |
否 |
String |
排序项。可选,值范围(create_at,num_task,num_template)。默认create_at。 |
|
order_by |
否 |
String |
排序顺序,可选asc(正序)、desc(倒序),默认倒序。 |
|
is_paged |
否 |
Boolean |
是否分页。 |
|
page_size |
否 |
Integer |
分页每页显示的条目。取值范围[5,200],默认10。 |
|
page_num |
否 |
Integer |
第几页,取值范围[1,100000],默认1。 |
|
access_type |
否 |
Array of strings |
接入方式。 |
|
platform_name |
否 |
String |
平台名称。 |
|
tag |
否 |
String |
标签。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token,获取方法参见认证鉴权。 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
video_source_number |
Integer |
视频源数量。 |
|
total_number |
Integer |
视频源总数。 |
|
quota_number |
Integer |
视频源限额。 |
|
video_source_list |
Array of ListVideoSourceInfoDto objects |
视频源列表数据。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
video_source_id |
String |
已创建成功的视频源id。 |
|
video_source_name |
String |
视频源名称,只支持中文、英文字母(a-z,A-Z)、数字、特殊字符(空格.-_() ()),不能以空格开头和结尾 最小长度:1 最大长度:100 |
|
status |
VideoSourceStatusInfoDto object |
视频源状态。 |
|
access_type |
String |
接入类型(cloud、edge)。 |
|
type |
String |
类型:obs、vcn、url、restful、camera。 |
|
latitude |
String |
视频源的地理位置信息,纬度,-90.00000~90.00000。 |
|
longitude |
String |
视频源的地理位置信息,经度,-180.00000~180.00000。 |
|
create_at |
Long |
创建时间。 |
|
video_packages |
Array of VideoGroupInfoDto objects |
视频源所在分组。 |
|
num_tasks |
Integer |
视频源已运行算法作业数量。 |
|
num_service_config_templates |
Integer |
视频源算法服务配置模板数量。 |
|
type_config |
String |
视频源配置信息xml,长度范围[1,1024]。 url形式: <type_config> <url_address></url_address> </type_config> vcn形式: <type_config> <data_source_id></data_source_id> <stream_type></stream_type> <ip></ip> <port></port> <user_name></user_name> <password></password> </type_config> restful形式: <type_config> <http_check></http_check> <url></url> <rtsp_url></rtsp_url> </type_config> ivm形式: <type_config> <device_id></device_id> <channel_id></channel_id> </type_config> obs形式: <type_config> <bucket></bucket> <path></path> </type_config> camera形式: <type_config> <device_id></device_id> <name></name> </type_config> vcn_restful形式: <type_config> <data_source_id></data_source_id> <stream_type></stream_type> <ip></ip> <port></port> <user_name></user_name> <password></password> <vcn_protocol>restful</vcn_protocol> </type_config> |
|
tag |
Array of strings |
视频源标签,标签最多选择4个,标签内容只能由中文, 英文字母(a~z, A~Z)、数字(0~9)、中划线(-)、下划线(_)组成, 最小长度:1 最大长度:10 |
|
stream_path |
String |
流地址。 |
|
scene_recommend |
Array of strings |
智能算法推荐的标签。 |
|
video_source_quality |
Array of strings |
视频源的视频流质量:
|
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
status |
String |
视频源状态:
|
|
name |
String |
状态中文名。 |
|
level |
String |
状态等级(用于前端图片颜色匹配)。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
video_group_id |
String |
视频源所在分组id。 |
|
video_group_name |
String |
视频源所在分组名称。 |
|
description |
String |
视频源所在分组描述。 |
|
access_type |
String |
接入类型。
|
|
create_at |
Long |
创建时间。 |
|
modify_at |
Long |
修改时间。 |
|
num_video_source |
Integer |
视频源数量。 |
|
group_status |
GroupStatusDto object |
视频源状态。 |
|
num_batch_task |
Integer |
已配置批量作业数量。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
num_online |
Integer |
在线视频源数量。 |
|
num_exception |
Integer |
异常视频源数量。 |
|
num_offline |
Integer |
离线视频源数量。 |
状态码:400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
错误信息描述。 |
|
detail |
String |
错误详情。 |
|
params |
Array of strings |
错误参数列举。 |
|
reason |
String |
错误原因。 |
|
advice |
String |
建议。 |
状态码:500
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
错误信息描述。 |
|
detail |
String |
错误详情。 |
|
params |
Array of strings |
错误参数列举。 |
|
reason |
String |
错误原因。 |
|
advice |
String |
建议。 |
请求示例
获取视频源列表,展示出账户下的所有视频源信息。
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
响应示例
状态码:200
视频源列表响应体。
{
"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" : "在线",
"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" : [ ]
} ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
视频源列表响应体。 |
|
400 |
参数错误。 |
|
500 |
内部错误。 |