修改视频源
功能介绍
修改视频源。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
PUT /v2/{project_id}/source/{video_source_id}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
用户项目ID,获取方法参见获取项目ID和名称。 |
|
video_source_id |
是 |
String |
已创建成功的视频源id,只能由小写英文字母(a~z,)、数字(0~9)、中划线(-)、下划线(_)长度范围为[4, 36]。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token,获取方法参见认证鉴权。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
video_source_name |
是 |
String |
视频源名称,只支持中文、英文字母(a-z,A-Z)、数字、特殊字符(空格.-_() ()),不能以空格开头和结尾,长度范围[1,100]。 |
|
latitude |
否 |
String |
视频源的地理位置信息,纬度,-90.00000~90.00000。 |
|
longitude |
否 |
String |
视频源的地理位置信息,经度,-180.00000~180.00000。 |
|
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]。 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
video_source_name |
String |
视频源名称,只支持中文、英文字母(a-z,A-Z)、数字、特殊字符(空格.-_() ()),不能以空格开头和结尾。长度范围[1,100]。 |
|
access_type |
String |
接入类型。
|
|
status |
VideoSourceStatusInfoDto object |
数据源状态。 |
|
type |
String |
类型。
|
|
latitude |
String |
视频源的地理位置信息,纬度,-90.00000~90.00000。 |
|
longitude |
String |
视频源的地理位置信息,经度,-180.00000~180.00000。 |
|
create_at |
Long |
创建时间。 |
|
type_config |
String |
视频源配置信息xml。 |
|
video_packages |
Array of VideoGroupInfoDto objects |
视频源所在分组。 |
|
service_config_templates |
Array of VideoServiceConfigTemplateDto objects |
算法模板体。 |
|
stream_path |
String |
流地址。 |
|
image |
String |
视频源截图的base64转码。 |
|
tag |
Array of strings |
视频源标签,标签最多选择4个,标签内容只能由中文, 英文字母(a~z, A~Z)、数字(0~9)、中划线(-)、下划线(_)组成。 最小长度:1 最大长度:10 |
|
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 |
离线视频源数量。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
name |
String |
算法服务名称。 |
|
roi |
String |
公共roi。 |
|
serviceConfig |
String |
算法服务公共配置。 |
|
createAt |
Long |
创建时间。 |
|
modifyAt |
Long |
修改时间。 |
|
numTask |
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/{video_source_id}
{
"video_source_name" : "url_test",
"access_type" : "cloud",
"type" : "url",
"longitude" : "",
"latitude" : "",
"tag" : [ "1" ],
"video_group_ids" : [ ],
"type_config" : "<type_config> <url_address>rtsp://12.12.12.12:333</url_address> </type_config>"
}
响应示例
状态码:200
更新视频源响应体。
{
"video_source_name" : "url_test",
"access_type" : "cloud",
"status" : {
"status" : "Online",
"name" : "在线",
"level" : "1"
},
"type" : "url",
"latitude" : "",
"longitude" : "",
"create_at" : 1680772763191,
"type_config" : "<type_config> <url_address>rtsp://12.12.12.12:333</url_address> </type_config>",
"stream_path" : "rtsp://12.12.12.12:333",
"tag" : [ "1" ],
"device_id" : "1680772763191",
"scene_recommend" : [ ],
"video_source_quality" : [ ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
更新视频源响应体。 |
|
400 |
请求错误。 |
|
500 |
内部错误。 |