Skip to main content
PATCH
/
api
/
v1
/
worker-queues
/
{queue_id}
Update Worker Queue
curl --request PATCH \
  --url https://control-plane.kubiya.ai/api/v1/worker-queues/{queue_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "display_name": "<string>",
  "description": "<string>",
  "status": "<string>",
  "max_workers": 2,
  "heartbeat_interval": 155,
  "tags": [
    "<string>"
  ],
  "settings": {}
}
'
import requests

url = "https://control-plane.kubiya.ai/api/v1/worker-queues/{queue_id}"

payload = {
"name": "<string>",
"display_name": "<string>",
"description": "<string>",
"status": "<string>",
"max_workers": 2,
"heartbeat_interval": 155,
"tags": ["<string>"],
"settings": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
display_name: '<string>',
description: '<string>',
status: '<string>',
max_workers: 2,
heartbeat_interval: 155,
tags: ['<string>'],
settings: {}
})
};

fetch('https://control-plane.kubiya.ai/api/v1/worker-queues/{queue_id}', 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://control-plane.kubiya.ai/api/v1/worker-queues/{queue_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'display_name' => '<string>',
'description' => '<string>',
'status' => '<string>',
'max_workers' => 2,
'heartbeat_interval' => 155,
'tags' => [
'<string>'
],
'settings' => [

]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://control-plane.kubiya.ai/api/v1/worker-queues/{queue_id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"<string>\",\n \"max_workers\": 2,\n \"heartbeat_interval\": 155,\n \"tags\": [\n \"<string>\"\n ],\n \"settings\": {}\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://control-plane.kubiya.ai/api/v1/worker-queues/{queue_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"<string>\",\n \"max_workers\": 2,\n \"heartbeat_interval\": 155,\n \"tags\": [\n \"<string>\"\n ],\n \"settings\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://control-plane.kubiya.ai/api/v1/worker-queues/{queue_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"<string>\",\n \"max_workers\": 2,\n \"heartbeat_interval\": 155,\n \"tags\": [\n \"<string>\"\n ],\n \"settings\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "organization_id": "<string>",
  "environment_id": "<string>",
  "name": "<string>",
  "display_name": "<string>",
  "description": "<string>",
  "status": "<string>",
  "max_workers": 123,
  "heartbeat_interval": 123,
  "tags": [
    "<string>"
  ],
  "settings": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "task_queue_name": "<string>",
  "active_workers": 0
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Enter your Kubiya API token (format: Bearer )

Path Parameters

queue_id
string
required

Body

application/json
name
string | null
Required string length: 2 - 50
display_name
string | null
description
string | null
status
string | null
max_workers
integer | null
Required range: x >= 1
heartbeat_interval
integer | null
Required range: 10 <= x <= 300
tags
string[] | null
settings
Settings · object | null

Response

Successful Response

id
string
required
organization_id
string
required
environment_id
string
required
name
string
required
display_name
string | null
required
description
string | null
required
status
string
required
max_workers
integer | null
required
heartbeat_interval
integer
required
tags
string[]
required
settings
Settings · object
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
created_by
string | null
required
task_queue_name
string
required
active_workers
integer
default:0