Requeue Failed Queue Job
curl --request POST \
--url https://api.example.com/queue/jobs/{job_id}/requeue \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/queue/jobs/{job_id}/requeue"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/queue/jobs/{job_id}/requeue', 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.example.com/queue/jobs/{job_id}/requeue",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.example.com/queue/jobs/{job_id}/requeue"
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/queue/jobs/{job_id}/requeue")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/queue/jobs/{job_id}/requeue")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"component_type": "<string>",
"component_id": "<string>",
"session_id": "<string>",
"status": "<string>",
"job_type": "run",
"user_id": "<string>",
"payload": {},
"attempt": 0,
"max_attempts": 1,
"idempotency_key": "<string>",
"available_at": 123,
"locked_by": "<string>",
"locked_at": 123,
"error": "<string>",
"created_at": 123,
"updated_at": 123,
"completed_at": 123
}{
"detail": "Bad request"
}{
"detail": "Unauthenticated access"
}{
"detail": "Not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "Internal server error"
}Queue
Requeue Failed Queue Job
Requeue a terminally failed or cancelled job for one more execution (raises its attempt budget by one). The operator remedy for crashed runs under the no-silent-re-execution default. Requeueing a CANCELLED job whose cancellation intent is still live requires clear_cancellation=true - an explicit override of the recorded cancel; without it the re-driven attempt is re-cancelled at its first checkpoint. Requeueing a job that FAILED within the last lock_grace seconds requires force=true: its worker may still be executing (swept-but-alive), and a second producer would race unfenced writes.
POST
/
queue
/
jobs
/
{job_id}
/
requeue
Requeue Failed Queue Job
curl --request POST \
--url https://api.example.com/queue/jobs/{job_id}/requeue \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/queue/jobs/{job_id}/requeue"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/queue/jobs/{job_id}/requeue', 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.example.com/queue/jobs/{job_id}/requeue",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.example.com/queue/jobs/{job_id}/requeue"
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/queue/jobs/{job_id}/requeue")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/queue/jobs/{job_id}/requeue")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"component_type": "<string>",
"component_id": "<string>",
"session_id": "<string>",
"status": "<string>",
"job_type": "run",
"user_id": "<string>",
"payload": {},
"attempt": 0,
"max_attempts": 1,
"idempotency_key": "<string>",
"available_at": 123,
"locked_by": "<string>",
"locked_at": 123,
"error": "<string>",
"created_at": 123,
"updated_at": 123,
"completed_at": 123
}{
"detail": "Bad request"
}{
"detail": "Unauthenticated access"
}{
"detail": "Not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "Internal server error"
}Authorizations
Response
Successful Response
One durable queue job (a background run's queue ticket).
Was this page helpful?