Skip to main content

PUT Re encode Video

Overview


The following table contains important information about the PUT method in regards to reencode a video.

PUT Method
MethodPUT
URL or Endpoint/api/projects/projectId/encodes/videoId
HeadersAuthorization
ParametersvideoId, projectId
BodydownloadUrl

The description of the URL parameter is as follows:

videoId Parameter
URL Parameter NamevideoId
MandatoryYes
Typestring
DescriptionUnique Id of the video.
projectId Parameter
URL Parameter NameprojectId
MandatoryYes
Typestring
DescriptionUnique Id of the project.

Request Body

{
"downloadUrl": "downloadUrl",
"callBackUrl": "callBackUrl",
"hasDrm": true,
"generateThumbnail": true,
"folderId": 0,
"encodingTemplateId": 0,
"videoVisibilityOptionId": 0,

}
tip

For more information about visibility options, please visit the Visibility Options API

The description of the parameters is as follows:

Body Parameter NameMandatoryTypeDescription
downloadUrlYesstringThe URL of the video that will be encoded.
callBackUrlNostringThe URL where the encoding status will be sent.
hasDrmNobooleanSpecifies whether the video has DRM protection.
generateThumbnailNobooleanSpecifies whether a thumbnail should be generated for the video.
folderIdNointegerThe ID of the folder where the video will be saved.
encodingTemplateIdNointegerThe ID of the encoding template to be used.
videoVisibilityOptionIdNointegerThe visibility option ID for the video.

Response

{
"success": true,
"errors": [],
"messages": [],
"result": {
"name": "name",
"originalFile": "originalFile"
},
"resultInfo": null,
"statusCode": 200
}

Information about the fields that appear when you receive the response are displayed in the table below.

Field NameTypeDescription
successboolIf the response is successful it will return true. Otherwise will return false.
errorsarray[string]Indicates if there was an error.
messagesarray[string]Returns the response message from back-end.
resultobjectReturns the response object.
namestringReturns the unique name of the encoded video.
originalFilestringReturns the original file of the video.
resultInfostringReturns extra information about the result.
statusCodeinteger($int32)Returns the HTTP Status Code.

If the action is successful, the service sends back an HTTP 200 or 201 response.

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code 400: Bad Request

  • HTTP Status Code 401: Unauthorized

  • HTTP Status Code 403: Forbidden

  • HTTP Status Code 404: Result Not Found

  • HTTP Status Code 500: Internal Server Error

  • HTTP Status Code 503: Backend Fetch Failed