PUT Re encode Video
Overview
The following table contains important information about the PUT method in regards to reencode a video.
| PUT Method | |
|---|---|
| Method | PUT | 
| URL or Endpoint | /api/projects/ projectId/encodes/videoId | 
| Headers | Authorization | 
| Parameters | videoId, projectId | 
| Body | downloadUrl | 
The description of the URL parameter is as follows:
| videoId Parameter | |
|---|---|
| URL Parameter Name | videoId | 
| Mandatory | Yes | 
| Type | string | 
| Description | Unique Id of the video. | 
| projectId Parameter | |
|---|---|
| URL Parameter Name | projectId | 
| Mandatory | Yes | 
| Type | string | 
| Description | Unique Id of the project. | 
Request Body
{
  "downloadUrl": "downloadUrl",
  "callBackUrl": "callBackUrl",
  "hasDrm": true,
  "generateThumbnail": true,
  "folderId": 0,
  "encodingTemplateId": 0,
  "videoVisibilityOptionId": 0,
  "uploadFileDetailsId": 0
}
For more information about visibility options, please visit the Visibility Options API
The description of the parameters is as follows:
| Body Parameter Name | Mandatory | Type | Description | 
|---|---|---|---|
| downloadUrl | Yes | string | The URL of the video that will be encoded. | 
| callBackUrl | No | string | The URL where the encoding status will be sent. | 
| hasDrm | No | boolean | Specifies whether the video has DRM protection. | 
| generateThumbnail | No | boolean | Specifies whether a thumbnail should be generated for the video. | 
| folderId | No | integer | The ID of the folder where the video will be saved. | 
| encodingTemplateId | No | integer | The ID of the encoding template to be used. | 
| videoVisibilityOptionId | No | integer | The visibility option ID for the video. | 
| uploadFileDetailsId | No | integer($int32) | The ID of upload file details. | 
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 Name | Type | Description | 
|---|---|---|
| success | bool | If the response is successful it will return true. Otherwise will return false. | 
| errors | array[string] | Indicates if there was an error. | 
| messages | array[string] | Returns the response message from back-end. | 
| result | object | Returns the response object. | 
| name | string | Returns the unique name of the encoded video. | 
| originalFile | string | Returns the original file of the video. | 
| resultInfo | string | Returns extra information about the result. | 
| statusCode | integer($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