音视频转码MCT

    通知接口Notification-API

    音视频转码服务使用队列通知服务(QNS)实现通知功能,在音视频转码任务状态转换时主动向开发者服务器推送消息。

    创建通知

    请求(Request)

    • 请求语法:

        POST /v{version}/notification HTTP/1.1
        accept-encoding: gzip, deflate
        x-bce-date: {utc-date-string}
        host: media.bj.baidubce.com
        accept: */*
        connection: keep-alive
        x-bce-request-id: {bce-request-id}
        content-type: application/json
        authorization: {bce-authorization-string}
    • 请求头域:无特殊Header参数
    • 请求参数(以下均为Requestbody参数):
    字段名称 字段类型 必要性 字段描述 可选值 默认值
    name String 必选 通知名称。小写字母开头,其余部分由小写字母、下划线 (_) 或数字组成,最多不超过40个字符 - -
    endpoint String 必选 通知消息接收地址 - -
    • 请求示例:

        POST /v3/notification HTTP/1.1
        content-length: 87
        accept-encoding: gzip, deflate
        x-bce-date: 2015-07-03T09:28:13Z
        connection: keep-alive
        accept: */*
        user-agent: python-requests/2.4.0 CPython/2.7.9 Darwin/14.3.0
        host: media.bj.baidubce.com
        x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
        content-type: application/json
        authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
      
        {
          "name": "mct_notification",
          "endpoint": "http://mct.notificaitonDomain.com/"
        }

    响应(Reponse)

    • 响应头域:无特殊Header参数
    • 响应参数:无
    • 响应示例:

        HTTP/1.1 200 OK
        x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
        Date: Fri, 03 Jul 2015 09:28:13 GMT
        Transfer-Encoding: chunked
        Content-Type: application/json;charset=UTF-8
        Cache-Control: no-cache

    查询通知

    请求(Request)

    • 请求语法:

        GET /v{version}/notification/{name} HTTP/1.1
        accept-encoding: gzip, deflate
        x-bce-date: {utc-date-string}
        host: media.bj.baidubce.com
        accept: */*
        connection: keep-alive
        x-bce-request-id: {bce-request-id}
        content-type: application/json
        authorization: {bce-authorization-string}
    • 请求头域:无特殊Header参数
    • 请求参数:无
    • 请求示例:

        GET /v3/notification/mct_notification HTTP/1.1
        content-length: 0
        accept-encoding: gzip, deflate
        x-bce-date: 2015-07-03T09:28:13Z
        connection: keep-alive
        accept: */*
        user-agent: python-requests/2.4.0 CPython/2.7.9 Darwin/14.3.0
        host: media.bj.baidubce.com
        x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
        content-type: application/json
        authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715

    响应(Reponse)

    • 响应头域:无特殊Header参数
    • 响应参数:
    字段名称 字段类型 字段描述
    name String 通知名称
    endpoint String 通知消息接收地址
    • 响应示例:

        HTTP/1.1 200 OK
        x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
        Date: Fri, 03 Jul 2015 09:28:13 GMT
        Transfer-Encoding: chunked
        Content-Type: application/json;charset=UTF-8
        Cache-Control: no-cache
      
        {
          "name" : "mct_notification",
          "endpoint" : "http://mct.notificaitonDomain.com/"
        }

    删除通知

    请求(Request)

    • 请求语法:

        DELETE /v{version}/notification/{name} HTTP/1.1
        accept-encoding: gzip, deflate
        x-bce-date: {utc-date-string}
        host: media.bj.baidubce.com
        accept: */*
        connection: keep-alive
        x-bce-request-id: {bce-request-id}
        content-type: application/json
        authorization: {bce-authorization-string}
    • 请求头域:无特殊Header参数
    • 请求参数:无
    • 请求示例:

        DELETE /v3/notification/mct_notification HTTP/1.1
        content-length: 0
        accept-encoding: gzip, deflate
        x-bce-date: 2015-07-03T09:28:13Z
        connection: keep-alive
        accept: */*
        user-agent: python-requests/2.4.0 CPython/2.7.9 Darwin/14.3.0
        host: media.bj.baidubce.com
        x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
        content-type: application/json
        authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715

    响应(Reponse)

    • 响应头域:无特殊Header参数
    • 响应参数:无
    • 响应示例:

        HTTP/1.1 200 OK
        x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
        Date: Fri, 03 Jul 2015 09:28:13 GMT
        Transfer-Encoding: chunked
        Content-Type: application/json;charset=UTF-8
        Cache-Control: no-cache

    通知列表

    请求(Request)

    • 请求语法:

        GET /v{version}/notification HTTP/1.1
        accept-encoding: gzip, deflate
        x-bce-date: {utc-date-string}
        host: media.bj.baidubce.com
        accept: */*
        connection: keep-alive
        x-bce-request-id: {bce-request-id}
        content-type: application/json
        authorization: {bce-authorization-string}
    • 请求头域:无特殊Header参数
    • 请求参数:无
    • 请求示例:

        GET /v3/notification HTTP/1.1
        content-length: 0
        accept-encoding: gzip, deflate
        x-bce-date: 2015-07-03T09:28:13Z
        connection: keep-alive
        accept: */*
        user-agent: python-requests/2.4.0 CPython/2.7.9 Darwin/14.3.0
        host: media.bj.baidubce.com
        x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
        content-type: application/json
        authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2015-07-03T09:28:13Z/1800/content-type;host;x-bce-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715

    响应(Reponse)

    • 响应头域:无特殊Header参数
    • 响应参数:
    字段名称 字段类型 字段描述
    notifications Object 通知列表
    + name String 通知名称
    + endpoint String 通知消息接收地址
    • 响应示例:

        HTTP/1.1 200 OK
        x-bce-request-id: 8776558c-81d9-4f97-8e2c-f977a286095d
        Date: Fri, 03 Jul 2015 09:28:13 GMT
        Transfer-Encoding: chunked
        Content-Type: application/json;charset=UTF-8
        Cache-Control: no-cache
      
        {
          "notifications" : [ {
            "name" : "mct_notification",
            "endpoint" : "http://mct.notificaitonDomain.com/"
          }, {
            "name" : "my_notification",
            "endpoint" : "http://my.notificaitonDomain.com/"
          } ]
        }
        
    上一篇
    水印接口Watermark-API
    下一篇
    文档更新记录