智能点播VideoWorks

    通知接口

    新建通知接口

    接口描述

    创建通知;

    请求(Request)

    • 请求语法:
    POST /v{version}/notification HTTP/1.1
    x-bce-date: {utc-date-string}
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: {bce-authorization-string}
    • 请求头域:无特殊Header参数
    • 请求参数:
    字段名称 字段类型 是否必选 字段描述 参数位置
    name String 必选 通知名称,最大长度128字符 Requestbody
    endpoint String 必选 通知地址,最大长度256字符 Requestbody
    token String 可选 通知验证token,最大长度32字符,支持大小写字母和数字 Requestbody
    authType Enum 可选 通知验证类型,NONE:无验证,SIGN:签名验证默认为NONE Requestbody
    • 请求示例:
    POST /v1/notification HTTP/1.1
    x-bce-date: 2019-05-31T09:27:33Z
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: bce-auth-v1/c0188830c0c342928f199bbbdac4c227/2019-05-31T09:27:33Z/1800/host/f19dfaf46b9e6b619e9be203650701a2bec9db18a980686ddb3a3a58132558e1
    {
        "name":"notification",
        "endpoint": "http://localhost:8000/callback/url"
        "token": "qeA4p01Nb",
        "authType": "SIGN"
    }

    响应(Response)

    • 响应头域:无特殊Header参数
    • 响应参数:无
    • 响应示例:
    HTTP/1.1 200 OK
    Transfer-Encoding: chunked
    x-bce-request-id: ca8620b4-0527-4153-b6ed-3a6c0a4da937
    Cache-Control: no-cache
    Server: BWS
    Date: Fri, 31 May 2019 09:27:33 GMT
    Content-Type: application/json;charset=UTF-8

    删除通知接口

    接口描述

    根据通知名称删除指定通知信息;

    请求(Request)

    • 请求语法
    DELETE /v{version}/notification/{name} HTTP/1.1
    x-bce-date: {utc-date-string}
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: {bce-authorization-string}
    • 请求头域:无特殊Header参数
    • 请求参数:无
    • 请求示例:
    DELETE /v1/notification/{name} HTTP/1.1
    x-bce-date: 2015-07-03T09:28:13Z
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715

    响应(Response)

    • 响应头域:无特殊Header参数
    • 响应参数:无
    • 响应示例:
    HTTP/1.1 200 OK
    x-bce-request-id: 6d0b0a36-2ffe-49d4-9d81-333a9ab9417e
    Date: Tue, 24 Mar 2015 13:06:02 GMT
    Transfer-Encoding: chunked
    Content-Type: application/json;charset=UTF-8
    Cache-Control: no-cache

    更新通知接口

    接口描述

    根据通知名称更新指定通知信息;

    请求(Request)

    • 请求语法
    PUT /v{version}/notification/{name} HTTP/1.1
    x-bce-date: {utc-date-string}
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: {bce-authorization-string}
    • 请求头域:无特殊Header参数
    • 请求参数:
    字段名称 字段类型 必要性 字段描述 参数位置
    endpoint String 可选 通知地址,最大长度256字符 Requestbody
    token String 可选 通知验证token,最大长度32字符,支持大小写字母和数字 Requestbody
    authType Enum 可选 通知验证类型,NONE:无验证,SIGN:签名验证;默认为NONE Requestbody

    1、endpoint/token/authType三个请求参数至少一个不为空。

    • 请求示例:
    PUT /v1/notification/{name} HTTP/1.1
    x-bce-date: 2015-07-03T09:28:13Z
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
    {
        "endpoint": "http://localhost:8000/callback/url"
        "token": "zxcASD123",
        "authType": "SIGN"
    }

    响应(Response)

    • 响应头域:无特殊Header参数
    • 响应参数:无
    • 响应示例:
    HTTP/1.1 200 OK
    x-bce-request-id: 6d0b0a36-2ffe-49d4-9d81-333a9ab9417e
    Date: Tue, 24 Mar 2015 13:06:02 GMT
    Transfer-Encoding: chunked
    Content-Type: application/json;charset=UTF-8
    Cache-Control: no-cache

    查询通知信息

    接口描述

    根据通知名称查询指定通知信息;

    请求(Request)

    • 请求语法
    GET /v{version}/notification/{name} HTTP/1.1
    x-bce-date: {utc-date-string}
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: {bce-authorization-string}
    • 请求头域:无特殊Header参数
    • 请求参数:无
    • 请求示例:
    GET /v1/notification/{name} HTTP/1.1
    x-bce-date: 2015-07-03T09:28:13Z
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715

    响应(Response)

    • 响应头域:无特殊Header参数
    • 响应参数:
    字段名称 字段类型 必要性 字段描述
    status String 可选 通知状态,状态值:ENABLE/DISABLE
    • 响应示例:
    HTTP/1.1 200 OK
    x-bce-request-id: 6d0b0a36-2ffe-49d4-9d81-333a9ab9417e
    Date: Tue, 24 Mar 2015 13:06:02 GMT
    Transfer-Encoding: chunked
    Content-Type: application/json;charset=UTF-8
    Cache-Control: no-cache
    {
        "name":"notification",
        "endpoint": "http://localhost:8000/callback/url",
        "status":"DISABLE",
        "token": "",
        "authType": "NONE",
        "createTime":"2015-03-25T13:37:10Z"
        "createTime":"2015-03-25T13:37:10Z"
    }

    查询通知列表

    接口描述

    查询通知列表;

    请求(Request)

    • 请求语法
    GET /v{version}/notification?status={status} HTTP/1.1
    x-bce-date: {utc-date-string}
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: {bce-authorization-string}
    • 请求头域:无特殊Header参数
    • 请求参数:
    字段名称 字段类型 必要性 字段描述 参数位置
    status Object 可选 状态,状态值:ENABLE/DISABLE Query
    • 请求示例:
    GET /v1/notification?status=ENABLE HTTP/1.1
    x-bce-date: 2015-07-03T09:28:13Z
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715

    响应(Response)

    • 响应头域:无特殊Header参数
    • 响应参数:
    字段名称 字段类型 字段描述
    name String 通知名称
    endpoint String 通知地址
    status Object 状态,状态值:ENABLE/DISABLE
    userId String 用户的userId
    createTime String 通知创建时间
    updateTime String 通知修改时间
    • 响应示例:
    HTTP/1.1 200 OK
    x-bce-request-id: 6d0b0a36-2ffe-49d4-9d81-333a9ab9417e
    Date: Tue, 24 Mar 2015 13:06:02 GMT
    Transfer-Encoding: chunked
    Content-Type: application/json;charset=UTF-8
    Cache-Control: no-cache
    {
        "notifications": [
            {
                "notificationId": "not-jgsevd7fj24i6eri",
                "name": "test",
                "endpoint": "http://10.145.80.177:8902/internal/v1/callback/mock/notification",
                "status": "ENABLE",
                "token": "",
                "authType": "NONE",
                "createTime": "2019-07-17T04:04:39Z",
                "updateTime": "2019-07-17T04:54:13Z"
            },
            {
                "notificationId": "not-jgtn14r76cjf8f27",
                "name": "test2",
                "endpoint": "http://12313",
                "status": "DISABLE",
                "token": "as14gsGz",
                "authType": "SIGN",
                "createTime": "2019-07-18T12:13:32Z",
                "updateTime": "2019-07-22T14:29:47Z"
            },
            {
                "notificationId": "not-jgyj8s7znx0k4sde",
                "name": "test_20190723",
                "endpoint": "http://test.com/callback",
                "status": "ENABLE",
                "token": "",
                "authType": "NONE",
                "createTime": "2019-07-23T09:18:52Z",
                "updateTime": "2019-07-23T09:18:52Z"
            }
        ]
    }

    停用通知接口

    接口描述

    根据通知名称停用指定通知;

    请求(Request)

    • 请求语法:
    PUT /v{version}/notification/{name}?disable HTTP/1.1
    x-bce-date: {utc-date-string}
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: {bce-authorization-string}
    • 请求头域:无特殊Header参数
    • 请求参数:无
    • 请求示例:
    PUT /v1/notification/{name}?disable HTTP/1.1
    x-bce-date: 2015-07-03T09:28:13Z
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715

    响应(Response)

    • 响应头域:无特殊Header参数
    • 响应参数:无
    • 响应示例:
    HTTP/1.1 200 OK
    x-bce-request-id: 6d0b0a36-2ffe-49d4-9d81-333a9ab9417e
    Date: Tue, 24 Mar 2015 13:06:02 GMT
    Transfer-Encoding: chunked
    Content-Type: application/json;charset=UTF-8
    Cache-Control: no-cache

    启用通知接口

    接口描述

    根据通知名称启用指定通知;

    请求(Request)

    • 请求语法:
    PUT /v{version}/notification/{name}?enable HTTP/1.1
    x-bce-date: {utc-date-string}
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: {bce-authorization-string}
    • 请求头域:无特殊Header参数
    • 请求参数:无
    • 请求示例:
    PUT /v1/notification/{name}?enable HTTP/1.1
    x-bce-date: 2015-07-03T09:28:13Z
    host: bvw.bj.baidubce.com
    content-type: application/json
    authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715

    响应(Response)

    • 响应头域:无特殊Header参数
    • 响应参数:无
    • 响应示例:
    HTTP/1.1 200 OK
    x-bce-request-id: 6d0b0a36-2ffe-49d4-9d81-333a9ab9417e
    Date: Tue, 24 Mar 2015 13:06:02 GMT
    Transfer-Encoding: chunked
    Content-Type: application/json;charset=UTF-8
    Cache-Control: no-cache
    上一篇
    音视频媒资接口
    下一篇
    服务端Java-SDK