获取视频源列表
功能介绍
获取视频源列表
调用方法
请参见如何调用API。
URI
GET /v2/{project_id}/source/sources
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 用户项目ID,获取方法参见获取项目ID和名称 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| scope | 否 | String | 模糊查找参数,可选,根据名称查找 |
| scope_name | 否 | String | 模糊查找参数字段名,可选,名称(取值source_name)或分组名称(取值group_name) |
| status | 否 | Array of strings | 视频源状态,可选,取值为1 2 9,分别代表在线、离线、异常 |
| type | 否 | Array of strings | 类型:obs、vcn、url、restful、camera、ivm |
| video_group_id | 否 | Array of strings | 视频源分组,可选。若传入则需要符合正则表达式^[0-9a-zA-Z-_]{1,36}$ |
| sort_name | 否 | String | 排序项。可选,值范围(create_at,num_task,num_template) |
| order_by | 否 | String | 排序顺序,可选,默认倒序 |
| is_paged | 否 | Boolean | 是否分页 |
| page_size | 否 | Integer | 分页每页显示的条目 |
| page_num | 否 | Integer | 第几页 |
| 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 url形式: [/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形式: [/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形式: [/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 | 视频源标签,标签最多选择4个,标签内容只能由中文, 英文字母(a~z, A~Z)、数字(0~9)、中划线(-)、下划线(_)组成, 最小长度:1 最大长度:10 |
| stream_path | String | 流地址 |
| scene_recommend | Array of strings | 智能算法推荐的标签 |
| video_source_quality | Array of strings | 视频源的视频流质量: Blurry:画面模糊; ColorDistortion:画面颜色失真; AbnormalLight:画面光线异常; ScreenSplash:画面花屏异常; ScreenJitter:画面抖动; ScreenMovement:画面移动; SceneUpheaval:画面剧变; ScreenFreeze:画面冻结; BlackScreen:黑屏; SnowNoise:雪花噪声; Occlude:遮挡; GrayScreen:灰屏;ScreenSmudge:画面污迹 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| status | String | 视频源状态 |
| name | String | 状态中文名 |
| level | String | 状态等级(用于前端图片颜色匹配) |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| video_group_id | String | 视频源所在分组id |
| video_group_name | String | 视频源所在分组名称 |
| description | String | 视频源所在分组描述 |
| access_type | String | 接入方式(cloud、edge) |
| 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 | 内部错误 |