Last update:2020-07-06 14:00:19
This interface allows you to perform screenshot operations for video resources stored on the cloud platform.
POST /fops
HOST: < MgrDomain>
Authorization: < AccessToken>
Parameter | Required | Description |
---|---|---|
Host | Yes | [Management Domain Name] which can be obtained from the User Management Interface. |
Authorization | Yes | [Management Credential] |
Request parameters are organized in the following format and submitted as request content:
bucket=<Urlsafe_Base64_Encoded_Bucket>&key=<Urlsafe_Base64_Encoded_Key>&fops=<Urlsafe_Base64_Encoded_Fops>¬ifyURL=<Urlsafe_Base64_Encoded_PersistentNotifyUrl>&force=< Force>&separate=< Separate>
Parameter | Required | Description |
---|---|---|
bucket | Yes | Bucket name. |
key | Yes | File name. |
fops | Yes | List of processing parameters. For the meanings of the parameters, see the [Video Screenshot Ops Parameter Format] processing multiple requests simultaneously is supported. Parameter lists are separated with the semicolon ; . |
notifyURL | No | URL for receiving notifications on processing results. See the [Notification Data Content Description] |
force | No | Whether or not to force execution of data processing. Setting the following values is supported: 0: If the specified data processing result exists, then the return file already exists and no processing is performed. This can avoid a waste of resources due to repeated processing. 1: Forces the execution of data processing and overwrites the existing file. 0 by default. |
separate | No | Whether or not to provide separate processing notifications. Setting the following values is supported: 0: Indicates that notifyURL is notified in one go upon the completion of the execution of all transcoding instructions. 1: Indicates that notifyURL is notified upon the completion of the execution of each transcoding instruction. 0 by default. |
Video screenshot:
fops=Urlsafe_Base64_Encode(vframe/jpg/offset/10;vframe/jpg/offset/15)
If a request is successful, a JSON string of the following content will be returned:
{ “persistentId”: < persistentId> }
Field name | Required | Description |
---|---|---|
persistentId | Yes | Uploads preprocessing or process ID that triggers persistent processing. |
If a request fails, a JSON character string of the following content will be returned:
{
“code”: “< httpCode int>”,
“message”: “< errMsg string>”
}
Field name | Required | Description |
---|---|---|
code | Yes | HTTP request response code. Refer to the [HTTP Response Status Codes] (#/help/details/31/3705) |
message | Yes | Prompt message when audio/video processing fails. |
curl -v -X POST -d"bucket=aW1hZ2Vz&key=bGVodS5tcDQ==&fops=dmZyYW1lL2pwZy9vZmZzZXQvMTA=&force=1&separate=1" -H “Authorization:86622e227a50d49d858c2494a935bc2e4ac543a7:Y2JmMGY0YTNhZmQxZmVlZGM2ZTA0YTdjNTcyOWQ1NjRkNTExYjg0Yg==” --url “http://mgrDomain/fops”