视频数字水印密钥模板接口
更新时间:2023-12-05
创建数字水印密钥模板
接口描述
用户通过该接口创建数字水印密钥模板。密钥模板可配置在转码模板或转码任务中,在嵌入转码任务中用于对数字水印内容加密,提升安全性。
请求结构
POST /v{version}/digitalwatermark/secretkey HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: {utc-date-string}
connection: keep-alive
accept: */*
host: media.bj.baidubce.com
x-bce-request-id: {bce-request-id}
content-type: application/json
authorization: {bce-authorization-string}
请求头域
除公共头域外,无其它特殊头域。
请求参数
无
请求体
字段名称 | 字段类型 | 必要性 | 字段描述 | 可选值 | 默认值 |
---|---|---|---|---|---|
digitalWmSecretKeyId | String | 可选 | 数字水印密钥ID | 字符串长度<22 | 如果不设置, 会自动生成一个ID, 格式为: key-16位随机id |
description | String | 可选 | 自定义描述信息 | 字符串长度<128 | 空字符串 |
secretKey | String | 必选 | 密钥内容 | 字符串长度6~16, 仅限英文、数字及部分特殊字符 | - |
响应头域
除公共头域外,无其它特殊头域。
响应参数
字段名称 | 字段类型 | 字段描述 |
---|---|---|
digitalWmSecretKeyId | String | 数字水印密钥ID |
请求示例
POST /v3/digitalwatermark/secretkey HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: 2023-11-08T21:21:21Z
host: media.bj.baidubce.com
accept: */*
connection: keep-alive
x-bce-request-id: 6bae5cb3-97d1-4b1a-b8b6-0ad577c1d481
content-type: application/json
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2023-11-08T21:21:21Z/1800/host;x-bce-date/7e21c9cf1e4e2cc6921a407a388fe98df122c53b9f509043d841be76eb09a1f9
{
"description": "test key",
"secretKey": "password",
}
响应示例
HTTP/1.1 200 OK
Transfer-Encoding: chunked
x-bce-request-id: d97c57d0-ca44-4d1c-bfeb-941a92440968
Cache-Control: no-cache
Server: BWS
Date: Wed, 08 Nov 2023 07:36:48 GMT
Content-Type: application/json;charset=UTF-8
{
"digitalWmSecretKeyId": "key-pi0nwwuw45zx0ya8"
}
查询指定数字水印密钥模板
接口描述
用户通过该接口查询已创建的数字水印密钥模板。
请求结构
GET /v{version}/digitalwatermark/secretkey/{digitalWmSecretKeyId} HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: {utc-date-string}
connection: keep-alive
accept: */*
host: media.bj.baidubce.com
x-bce-request-id: {bce-request-id}
content-type: application/json
authorization: {bce-authorization-string}
请求头域
除公共头域外,无其它特殊头域。
请求参数
字段名称 | 字段类型 | 必要性 | 字段描述 | 可选值 | 默认值 |
---|---|---|---|---|---|
digitalWmSecretKeyId | String | 必选 | 数字水印密钥ID | - | - |
请求体
无
响应头域
除公共头域外,无其它特殊头域。
响应参数
字段名称 | 字段类型 | 字段描述 |
---|---|---|
digitalWmSecretKeyId | String | 数字水印密钥ID |
description | String | 自定义描述信息 |
createTime | String | 创建时间 |
state | String | 模板状态,ACTIVE/INACTIVE |
secretKey | String | 密钥内容 |
请求示例
GET /v3/digitalwatermark/secretkey/key-pi0nwwuw45zx0ya8 HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: 2023-11-08T21:21:21Z
host: media.bj.baidubce.com
accept: */*
connection: keep-alive
x-bce-request-id: 6bae5cb3-97d1-4b1a-b8b6-0ad577c1d481
content-type: application/json
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2023-11-08T21:21:21Z/1800/host;x-bce-date/7e21c9cf1e4e2cc6921a407a388fe98df122c53b9f509043d841be76eb09a1f9
响应示例
HTTP/1.1 200 OK
Transfer-Encoding: chunked
x-bce-request-id: d97c57d0-ca44-4d1c-bfeb-941a92440968
Cache-Control: no-cache
Server: BWS
Date: Wed, 08 Nov 2023 07:36:48 GMT
Content-Type: application/json;charset=UTF-8
{
"digitalWmSecretKeyId": "key-pi0nwwuw45zx0ya8",
"description": "",
"createTime": "2023-11-08T07:36:48Z",
"state": "ACTIVE",
"secretKey": "password"
}
查询所有数字水印密钥模板
接口描述
用户通过该接口查询所有已创建数字水印密钥模板构成的列表。
请求结构
GET /v{version}/digitalwatermark/secretkey/ HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: {utc-date-string}
connection: keep-alive
accept: */*
host: media.bj.baidubce.com
x-bce-request-id: {bce-request-id}
content-type: application/json
authorization: {bce-authorization-string}
请求头域
除公共头域外,无其它特殊头域。
请求参数
无
请求体
无
响应头域
除公共头域外,无其它特殊头域。
响应参数
字段名称 | 字段类型 | 字段描述 |
---|---|---|
secretKeys | Array |
数字水印密钥模板列表 |
DigitalWatermarkSecretKey内部字段定义见查询指定数字水印密钥模板的响应参数。
请求示例
GET /v3/digitalwatermark/ HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: 2023-11-08T21:21:21Z
host: media.bj.baidubce.com
accept: */*
connection: keep-alive
x-bce-request-id: 6bae5cb3-97d1-4b1a-b8b6-0ad577c1d481
content-type: application/json
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2023-11-08T21:21:21Z/1800/host;x-bce-date/7e21c9cf1e4e2cc6921a407a388fe98df122c53b9f509043d841be76eb09a1f9
响应示例
HTTP/1.1 200 OK
Transfer-Encoding: chunked
x-bce-request-id: d97c57d0-ca44-4d1c-bfeb-941a92440968
Cache-Control: no-cache
Server: BWS
Date: Wed, 08 Nov 2023 07:36:48 GMT
Content-Type: application/json;charset=UTF-8
{
"secretKeys": [
{
"digitalWmSecretKeyId": "key-pi0nwwuw45zx0ya8",
"description": "",
"createTime": "2023-11-08T07:36:48Z",
"state": "ACTIVE",
"secretKey": "password"
},
{
"digitalWmSecretKeyId": "key-pi0nz8cxzdfzy7b1",
"description": "",
"createTime": "2023-11-08T07:36:48Z",
"state": "ACTIVE",
"secretKey": "password2"
}
]
}
删除指定数字水印密钥模板
接口描述
用户通过该接口删除已创建的数字水印密钥模板。
请求结构
DELETE /v{version}/digitalwatermark/secretkey/{digitalWmSecretKeyId} HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: {utc-date-string}
connection: keep-alive
accept: */*
host: media.bj.baidubce.com
x-bce-request-id: {bce-request-id}
content-type: application/json
authorization: {bce-authorization-string}
请求头域
除公共头域外,无其它特殊头域。
请求参数
无
请求体
无
响应头域
除公共头域外,无其它特殊头域。
响应参数
无
请求示例
DELETE /v3/digitalwatermark/secretkey/key-pi0nwwuw45zx0ya8 HTTP/1.1
accept-encoding: gzip, deflate
x-bce-date: 2023-11-08T21:21:21Z
host: media.bj.baidubce.com
accept: */*
connection: keep-alive
x-bce-request-id: 6bae5cb3-97d1-4b1a-b8b6-0ad577c1d481
content-type: application/json
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2023-11-08T21:21:21Z/1800/host;x-bce-date/7e21c9cf1e4e2cc6921a407a388fe98df122c53b9f509043d841be76eb09a1f9
响应示例
HTTP/1.1 200 OK
x-bce-request-id: 6d0b0a36-2ffe-49d4-9d81-333a9ab9417e
Cache-Control: no-cache
其他说明
暂不支持修改已有模板内容或删除后重新创建同ID模板。