媒体内容审核VCR

    自定义logo库接口

    文档中提到的库指的是lib,库集指的是brief,库集素材指的是image。库里包含库集,库集里包含库集素材集合。 图片URL支持bos及url,如果是url格式的,仅支持http或https协议。

    创建自定义logo库

    创建自定义logo库

    请求语法

    POST /v<version>/logo/lib HTTP/1.1
    host: vcr.bj.baidubce.com
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>
    content-type: application/json

    请求参数

    参数 类型 描述 是否必须
    lib String 自定义logo库名称
    description String 描述,最大支持256字符

    请求示例

    POST /v1/logo/lib HTTP/1.1
    host: vcr.bj.baidubce.com
    content-type: application/json
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>
    
    {
        "lib": "test",
        "description": "lib-description"
    }

    响应参数

    响应示例

    HTTP/1.1 200 OK

    列出所有logo库

    列出所有自定义logo库

    请求语法

    GET /v<version>/logo/lib HTTP/1.1
    host: vcr.bj.baidubce.com
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>
    content-type: application/json

    请求参数

    请求示例

    GET /v1/logo/lib HTTP/1.1
    host: vcr.bj.baidubce.com
    content-type: application/json
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>

    响应参数

    参数 类型 描述 是否必须
    libs Array 自定义logo库集合
    +lib String 自定义logo库名称
    +description String 描述,最大支持256字符
    +userId String 用户id
    +createTime Date 创建时间

    响应示例

    HTTP/1.1 200 OK
    {
    	"libs": [
    		{
    			"userId": "6dbd5b0f9fed4b40871428310b8dd0f3",
    			"lib": "test",
    			"description": "test logo lib",
    			"createTime": "2019-11-22 17:00:00"
    		}
    	]
    }

    logo库集素材添加

    往指定的logo库集添加图片。

    请求语法

    POST /v<version>/logo/lib/{logo_lib_name} HTTP/1.1
    host: vcr.bj.baidubce.com
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>
    content-type: application/json

    请求参数

    参数 类型 描述 是否必须
    image String 图片URL
    brief String brief

    说明:

    1. 对于BOS图片,source="bos://<bos-bucket>/<bos-object>”,例如"bos://testbucket/dir/image.jpg”,用户需要确保bos路径可访问。
    2. 对于url图片,source="http://domain.com/dir/image.jpg",目前支持http/https协议url,用户需要确保该url外网可访问。

    请求示例

    POST /v1/logo/lib/logo_lib_name HTTP/1.1
    host: vcr.bj.baidubce.com
    content-type: application/json
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>
    
    {
        "image": "bos://demo_bucket/demo_image.jpg",
        "brief": "name"
    }

    响应参数

    响应示例

    HTTP/1.1 200 OK

    logo库集素材删除

    删除指定的库集素材。

    请求语法

    DELETE /v<version>/logo/lib/{logo_lib_name}?image={image} HTTP/1.1
    host: vcr.bj.baidubce.com
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>
    content-type: application/json

    请求参数

    参数 类型 描述 是否必须
    image String 图片URL

    请求示例

    DELETE /v1/logo/lib/logo_lib_name?image=bos://demo_bucket/demo_image.jpg HTTP/1.1
    host: vcr.bj.baidubce.com
    content-type: application/json
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>

    响应参数

    响应示例

    HTTP/1.1 200 OK

    logo库集素材列表

    根据logo库集名称查询库集素材集合。

    请求语法

    GET /v<version>/logo/lib/{name}?brief={brief} HTTP/1.1
    host: vcr.bj.baidubce.com
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>
    content-type: application/json

    请求参数

    参数 类型 描述 是否必须
    brief String brief

    请求示例

    GET /v1/logo/lib/logo_lib_name?brief=test_name HTTP/1.1
    host: vcr.bj.baidubce.com
    content-type: application/json
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>

    响应参数

    参数 类型 描述
    images Array 图片数组

    响应示例

    HTTP/1.1 200 OK
    {
        "images": [
            "http://bos.bucket.baidu.com/demo_image0.jpg",
            "http://bos.bucket.baidu.com/demo_image1.jpg"
        ]
    }

    logo库集删除

    根据指定的logo库集名称删除库集。

    请求语法

    DELETE /v<version>/logo/lib/{logo_lib_name}?brief={brief} HTTP/1.1
    host: vcr.bj.baidubce.com
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>
    content-type: application/json

    请求参数

    参数 类型 描述 是否必须
    brief String brief

    请求示例

    DELETE /v1/logo/lib/logo_lib_name?brief=test_name HTTP/1.1
    host: vcr.bj.baidubce.com
    content-type: application/json
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>

    响应参数

    响应示例

    HTTP/1.1 200 OK

    logo库集列表

    查询logo库集名称集合。

    请求语法

    GET /v<version>/logo/lib/{logo_lib_name} HTTP/1.1
    host: vcr.bj.baidubce.com
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>
    content-type: application/json

    请求参数

    请求示例

    GET /v1/logo/lib/logo_lib_name HTTP/1.1
    host: vcr.bj.baidubce.com
    content-type: application/json
    authorization: <bce-authorization-string>
    x-bce-date: <bce-authorization-utc-date>

    响应参数

    参数 类型 描述
    briefs Array brief数组

    响应示例

    HTTP/1.1 200 OK
    {
        "briefs": [
            "name0", "name1"
        ]
    }
    上一篇
    自定义face库接口
    下一篇
    自定义文本库接口