curl --request PATCH \
--url https://api.nexrender.com/api/v2/jobs/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nexrender.com/api/v2/jobs/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nexrender.com/api/v2/jobs/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nexrender.com/api/v2/jobs/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nexrender.com/api/v2/jobs/{id}/cancel"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.nexrender.com/api/v2/jobs/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nexrender.com/api/v2/jobs/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"templateId": "<string>",
"status": "<string>",
"progress": 123,
"stats": {
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"errorAt": "2023-11-07T05:31:56Z",
"totalAssets": 123,
"renderDuration": 123,
"error": "<string>"
},
"outputUrl": "<string>"
}
]{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Cancel job
Cancel a single job by ID. The requested job must be in a cancellable state. Related parent, child, or sibling jobs discovered through nesting are cancelled on a best-effort basis and included in the response, including sibling cascades from child cancellation.
curl --request PATCH \
--url https://api.nexrender.com/api/v2/jobs/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nexrender.com/api/v2/jobs/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nexrender.com/api/v2/jobs/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nexrender.com/api/v2/jobs/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nexrender.com/api/v2/jobs/{id}/cancel"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.nexrender.com/api/v2/jobs/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nexrender.com/api/v2/jobs/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"templateId": "<string>",
"status": "<string>",
"progress": 123,
"stats": {
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"errorAt": "2023-11-07T05:31:56Z",
"totalAssets": 123,
"renderDuration": 123,
"error": "<string>"
},
"outputUrl": "<string>"
}
]{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer token authentication using API tokens for team-based access control.
You can generate your own API token at: https://app.nexrender.com/settings/api-tokens
Path Parameters
Unique job identifier
^[0-9A-HJKMNP-TV-Z]{26}$Response
Successfully cancelled the job and any related jobs that were also cancellable.
Unique job identifier used for tracking and API operations
Reference to the template used for this job (null if template was not used)
Current job status (queued, render:dorender, finished, error, etc.). Manually cancelled jobs are normalized to manually_cancelled in v2 responses even though they are stored internally as error.
Render progress as a percentage (0.0 to 100.0)
Detailed timing and metadata statistics for the job
Show child attributes
Show child attributes
URL to the rendered content
Was this page helpful?

