Appearance
PUT /jobs/templates/[ID]
Description
Update a specific Template.
Authentication
- Required: Yes
- Method: Bearer token
Request Headers
- Authorization:
Bearer [AUTH_TOKEN] - Content-Type:
application/json
Parameters
Query Parameters
- format:
string(Optional)
Values:json,xml
This will override Request Accept header. - human:
boolean(Optional)
Values:true,false
Causes the response to be in a structured, more human-readable form. This is useful when calling the API through curl or from a browser. - show_null:
boolean(Optional)
Values:true,false
If set to "true", the response will contain also keys that are not set to a value. - expand_all:
boolean(Optional)
Values:true,false
Recursively look up referenced objects (here: codec id) and embed the respective json as a nested object directly into the response.
Valid Fields
Same as for POST /jobs/templates. Fields not included in the request will not be updated. If you want to delete/reset a field, set it to "null" specifically.
Example Request
bash
curl -X PUT "https://api.xvid.com/v1/jobs/templates/5e2834a2c35f386a1327c958?human=true" \
-H "Authorization: Bearer AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"template": {
"name": "My Test Template",
"description": "Adding a new description",
"job_settings": {
"input": {
"start_time": 0
},
"autograph": {
"watermark_strength": "light"
},
"user_data": "My Personal Marker",
"output_prefix": "{job_id}/",
"outputs": [
{
"output_name": "{input_name}",
"thumbnails": [
{
"thumbnail_names": "thumb_{resolution}",
"thumbnail_preset": "thumbnails_small"
}
],
"logos": [
{
"logo_image": "https://s3-us-east-1.amazonaws.com/my_logo_pngs/logo30.png",
"logo_preset": "logo_30_bottom_right"
}
],
"settings": {
"video": {
"height": "100%",
"width": "100%",
"bitrate": "90%"
}
},
"preset": {
"id": "5e2834a2c35f386a1327c958"
}
}
],
"pipeline": {
"id": "5eb43241e4b0463cfe034c1f"
}
}
}
}'Example Response
Success (200 OK)
json
{
"template": {
"id": "5e2834a2c35f386a1327c958",
"name": "My Test Template",
"description": "Adding a new description",
"job_settings": {
"pipeline": {
"id": "5eb43241e4b0463cfe034c1f",
"href": "https://api.xvid.com/v1/pipelines/5eb43241e4b0463cfe034c1f"
},
"input": {
"start_time": 0
},
"autograph": {
"watermark_strength": "light"
},
"user_data": "My Personal Marker",
"output_prefix": "{job_id}/",
"outputs": [
{
"output_name": "{input_name}",
"thumbnails": [
{
"thumbnail_names": "thumb_{resolution}",
"thumbnail_preset": "thumbnails_small"
}
],
"logos": [
{
"logo_image": "https://s3-us-east-1.amazonaws.com/my_logo_pngs/logo30.png",
"logo_preset": "logo_30_bottom_right"
}
],
"settings": {
"video": {
"height": "100%",
"width": "100%",
"bitrate": "90%"
}
},
"preset": {
"id": "5e2834a2c35f386a1327c958",
"href": "https://api.xvid.com/v1/presets/5e2834a2c35f386a1327c958"
}
}
]
},
"created_at": 1685456220714,
"updated_at": 1686057940659,
"href": "https://api.xvid.com/v1/jobs/templates/5e2834a2c35f386a1327c958"
}
}Error Responses
400 Bad Request
json
{
"error": {
"error_code": "0x0400002",
"error_message": "Template is invalid"
}
}403 Forbidden
json
{
"error": {
"error_code": "0x0000003",
"error_message": "Invalid access token"
}
}404 Not Found
json
{
"error": {
"error_code": "0x0400001",
"error_message": "Template does not exist"
}
}500 Internal Server Error
json
{
"error": {
"error_code": "0x0000001",
"error_message": "Internal Error"
}
}