CDNetworks Documentation Object Storage Notification Description

Notification Description

Last update:2022-01-07 15:41:47

Notification Security Mechanism

Object Storage will add an Authorization field to the notification’s request header.

Format

<Accesskey>:<Urlsafe_Base64_Encode(hmac_sha1(NotifyUrl+"\n"+Response,SecretKey))>

NOTE:

  1. Response is the content of the notification received;
  2. Object Storage will randomly pick any set of valid AK and SK under the user to generate the value of the authentication header Authorization. During the authentication process, you need to record all AK and SK sets and use one of the sets of correctly matched key strings to perform the header authentication.

Notification Data Description

After setting the notification address NotifyUrl, this address will obtain a [URL-Safe Base64 Encoded] (#/help/details/31/3707) Response message in JSON format. This message is simply the persistent processing result.
NOTE:
The address for receiving the preprocessing result notification must be a public network URL address that can respond normally with HTTP/1.1 200 OK. If there are special characters like spaces, Url Encode encoding is required.

Format:

    {
        "id": "<id string>",
        "code": "<code int>",
        "desc": "<desc string>",
        "separate":"<separate int>",
        "inputkey":"<inputkey string>",
        "inputbucket":"<inputbucket string>" ,
        "inputfsize":"<inputfsize int>"
        "items": [
            {
                "cmd": "<cmd string>",
                "code": "<code string>",
                "costTime": "<costTime int>",
                "desc": "<desc string>",
                "error": "<error string>",
                "fsize": "<fsize int>",
                "hash": "<hash string>",
                "key": "<key string>",
                "url": "<url string>",
                "duration": "<duration double>",
                "bit_rate": "<bit_rate string>",
                "resolution": "<resolution string>",
                "detail": [
                {
                    "fsize": "<fsize int>",
                    "hash": "<hash string>",
                    "key": "<key string>",
                    "url": "<url string>",
                    "duration": "<duration double>",
                    "bit_rate": "<bit_rate string>",
                    "resolution": "<resolution string>"
                 }
                        ]
            }
                    ]
    }

Notes

Field nameTypeDescription
idstringUpload preprocessing or persistentId returned by the trigger persistent processing interface.
codeintStatus codes for notification progress. 1 Separate notifications, task processing in progress, 2 Separate notifications, task processing failure, 3 Notification successful.
descstringDetailed description corresponding to the status code.
separatestringSeparate notification option. 0 indicates notification in one go, 1 indicates separate notifications.
inputkeystringOriginal file name.
inputbucketstringOriginal file bucket.
inputfsizeintOriginal file size.
itemsarrayStatus information of each operation. If the processing request includes multiple operations, items will contain multiple messages.
cmdstringOperation command (ops).
codestringStatus codes for processing results. 2 Processing failed; 3 Processing successful.
costTimeintTime spent for transcoding, which is 0 by default for non-special scenarios.
descstringDetailed description corresponding to the status code.
errorstringIf processing fails, this field will list the specific causes.
fsizeintProcessed file size.
hashstringhash value of the processing result.
keystringkey value of the processing result.
urlstringAccess path of resource.
durationdoubleVideo duration outputted by transcoding.
bit_ratestringVideo bit rate outputted by transcoding.
resolutionstringVideo resolution outputted by transcoding.
detailarraySpecific information on each data file when multiple files are outputted.
fsizeintProcessed file size.
hashstringhash value of the processing result.
keystringkey value of the processing result.
urlstringAccess path of resource url.
durationdoubleVideo duration outputted by transcoding.
bit_ratestringVideo bit rate outputted by transcoding.
resolutionstringVideo resolution outputted by transcoding.

Example:

    {
        {
        "id":"2c90802745ee87870145ef1430f90006",
        "code":3,
        "desc": "operate ["avthumb/flv"] is finish",
        "separate":0,
        "inputkey":"aaa.flv",
        "inputbucket":"chenqltesttwo",
        "inputfsize":20000,
        "items":[
            {
                "cmd":"avthumb/flv",
                "code":"3",
                "costTime": 0,
                "desc":"finish",
                "error":null,
                "fsize":20000,
                "hash":"FlWvHsc-CK6miygKCcLjCaQ5csNO",
                "key":"chenqltesttwo:aaa.flv",
                "url":"http://chenqltesttwo.com/aaa.flv",
                "duration": 198.083,
                "bit_rate": "1288025",
                "resolution": "1280X720",
                "detail": [
                {
                    "fsize": 20000,
                    "hash": "FlWvHsc-CK6miygKCcLjCaQ5csNO",
                    "key": "chenqltesttwo:aaa.flv",
                    "url": "http://chenqltesttwo.com/aaa.flv",
                    "duration": 198.083,
                    "bit_rate": "1288025",
                    "resolution": "1280X720",
                }
                        ]
            }
        ]
        }
    }
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!