修改视频源
功能介绍
修改视频源。
调用方法
请参见如何调用API。
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)、数字、特殊字符(空格.-_() ()),不能以空格开头和结尾。 |
latitude |
否 |
String |
视频源的地理位置信息,纬度,-90.00000~90.00000。 |
longitude |
否 |
String |
视频源的地理位置信息,经度,-180.00000~180.00000。 |
type_config |
是 |
String |
视频源配置信息xml url形式: <type>URL</type> <config> <URL_ADDRESS></URL_ADDRESS> </config> vcn形式: <type>VCN</type> <config> <DATA_SOURCE_ID></DATA_SOURCE_ID> <STREAM_TYPE></STREAM_TYPE> <IP></IP> <PORT></PORT> <USER_NAME></USER_NAME> <PASSWORD></PASSWORD> </config> restful形式: <type>RESTFUL</type> <config> <HTTP_CHECK></HTTP_CHECK> <URL></URL> <RTSP_URL></RTSP_URL> </config> camera形式: <type>CAMERA</type> <config> <EDGE_CAMERA_ID></EDGE_CAMERA_ID> </config> |
tag |
否 |
Array of strings |
视频源标签,标签最多选择4个,标签内容只能由中文, 英文字母(a~z, A~Z)、数字(0~9)、中划线(-)、下划线(_)组成 最小长度:1 最大长度:10 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
video_source_name |
String |
视频源名称,只支持中文、英文字母(a-z,A-Z)、数字、特殊字符(空格.-_() ()),不能以空格开头和结尾。
|
access_type |
String |
接入类型(cloud、edge)。 |
status |
VideoSourceStatusInfoDto object |
数据源状态。 |
type |
String |
类型:obs、vcn、url、restful、camera。 |
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)、中划线(-)、下划线(_)组成。
|
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 |
已配置批量作业数量。 |
请求示例
修改视频源请求体
/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 |
更新视频源响应体 |