Jobs
Update many
Update many jobs
PATCH
/
jobs
Update many
curl --request PATCH \
--url http://localhost:44442/api/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"68b1f0c2a4d3e5f6a7b8c9d0"
],
"values": {
"name": "<string>",
"description": "<string>",
"color": "<string>",
"icon": "<string>",
"tags": [
"<string>"
],
"group_id": "68b1f0c2a4d3e5f6a7b8c9d0",
"priority": 50,
"limit": 1,
"max_batch_size": 2,
"whitelisted_nodes": [
"68b1f0c2a4d3e5f6a7b8c9d0"
],
"blacklisted_nodes": [
"68b1f0c2a4d3e5f6a7b8c9d0"
]
}
}
'import requests
url = "http://localhost:44442/api/v1/jobs"
payload = {
"ids": ["68b1f0c2a4d3e5f6a7b8c9d0"],
"values": {
"name": "<string>",
"description": "<string>",
"color": "<string>",
"icon": "<string>",
"tags": ["<string>"],
"group_id": "68b1f0c2a4d3e5f6a7b8c9d0",
"priority": 50,
"limit": 1,
"max_batch_size": 2,
"whitelisted_nodes": ["68b1f0c2a4d3e5f6a7b8c9d0"],
"blacklisted_nodes": ["68b1f0c2a4d3e5f6a7b8c9d0"]
}
}
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({
ids: ['68b1f0c2a4d3e5f6a7b8c9d0'],
values: {
name: '<string>',
description: '<string>',
color: '<string>',
icon: '<string>',
tags: ['<string>'],
group_id: '68b1f0c2a4d3e5f6a7b8c9d0',
priority: 50,
limit: 1,
max_batch_size: 2,
whitelisted_nodes: ['68b1f0c2a4d3e5f6a7b8c9d0'],
blacklisted_nodes: ['68b1f0c2a4d3e5f6a7b8c9d0']
}
})
};
fetch('http://localhost:44442/api/v1/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "44442",
CURLOPT_URL => "http://localhost:44442/api/v1/jobs",
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([
'ids' => [
'68b1f0c2a4d3e5f6a7b8c9d0'
],
'values' => [
'name' => '<string>',
'description' => '<string>',
'color' => '<string>',
'icon' => '<string>',
'tags' => [
'<string>'
],
'group_id' => '68b1f0c2a4d3e5f6a7b8c9d0',
'priority' => 50,
'limit' => 1,
'max_batch_size' => 2,
'whitelisted_nodes' => [
'68b1f0c2a4d3e5f6a7b8c9d0'
],
'blacklisted_nodes' => [
'68b1f0c2a4d3e5f6a7b8c9d0'
]
]
]),
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 := "http://localhost:44442/api/v1/jobs"
payload := strings.NewReader("{\n \"ids\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ],\n \"values\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\",\n \"icon\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"group_id\": \"68b1f0c2a4d3e5f6a7b8c9d0\",\n \"priority\": 50,\n \"limit\": 1,\n \"max_batch_size\": 2,\n \"whitelisted_nodes\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ],\n \"blacklisted_nodes\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ]\n }\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("http://localhost:44442/api/v1/jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ],\n \"values\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\",\n \"icon\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"group_id\": \"68b1f0c2a4d3e5f6a7b8c9d0\",\n \"priority\": 50,\n \"limit\": 1,\n \"max_batch_size\": 2,\n \"whitelisted_nodes\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ],\n \"blacklisted_nodes\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:44442/api/v1/jobs")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ],\n \"values\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\",\n \"icon\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"group_id\": \"68b1f0c2a4d3e5f6a7b8c9d0\",\n \"priority\": 50,\n \"limit\": 1,\n \"max_batch_size\": 2,\n \"whitelisted_nodes\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ],\n \"blacklisted_nodes\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}Authorizations
An API key from Settings, API Keys. A caller on this machine needs none.
Body
application/json
Response
Jobs updated
Was this page helpful?
⌘I
Update many
curl --request PATCH \
--url http://localhost:44442/api/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"68b1f0c2a4d3e5f6a7b8c9d0"
],
"values": {
"name": "<string>",
"description": "<string>",
"color": "<string>",
"icon": "<string>",
"tags": [
"<string>"
],
"group_id": "68b1f0c2a4d3e5f6a7b8c9d0",
"priority": 50,
"limit": 1,
"max_batch_size": 2,
"whitelisted_nodes": [
"68b1f0c2a4d3e5f6a7b8c9d0"
],
"blacklisted_nodes": [
"68b1f0c2a4d3e5f6a7b8c9d0"
]
}
}
'import requests
url = "http://localhost:44442/api/v1/jobs"
payload = {
"ids": ["68b1f0c2a4d3e5f6a7b8c9d0"],
"values": {
"name": "<string>",
"description": "<string>",
"color": "<string>",
"icon": "<string>",
"tags": ["<string>"],
"group_id": "68b1f0c2a4d3e5f6a7b8c9d0",
"priority": 50,
"limit": 1,
"max_batch_size": 2,
"whitelisted_nodes": ["68b1f0c2a4d3e5f6a7b8c9d0"],
"blacklisted_nodes": ["68b1f0c2a4d3e5f6a7b8c9d0"]
}
}
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({
ids: ['68b1f0c2a4d3e5f6a7b8c9d0'],
values: {
name: '<string>',
description: '<string>',
color: '<string>',
icon: '<string>',
tags: ['<string>'],
group_id: '68b1f0c2a4d3e5f6a7b8c9d0',
priority: 50,
limit: 1,
max_batch_size: 2,
whitelisted_nodes: ['68b1f0c2a4d3e5f6a7b8c9d0'],
blacklisted_nodes: ['68b1f0c2a4d3e5f6a7b8c9d0']
}
})
};
fetch('http://localhost:44442/api/v1/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "44442",
CURLOPT_URL => "http://localhost:44442/api/v1/jobs",
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([
'ids' => [
'68b1f0c2a4d3e5f6a7b8c9d0'
],
'values' => [
'name' => '<string>',
'description' => '<string>',
'color' => '<string>',
'icon' => '<string>',
'tags' => [
'<string>'
],
'group_id' => '68b1f0c2a4d3e5f6a7b8c9d0',
'priority' => 50,
'limit' => 1,
'max_batch_size' => 2,
'whitelisted_nodes' => [
'68b1f0c2a4d3e5f6a7b8c9d0'
],
'blacklisted_nodes' => [
'68b1f0c2a4d3e5f6a7b8c9d0'
]
]
]),
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 := "http://localhost:44442/api/v1/jobs"
payload := strings.NewReader("{\n \"ids\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ],\n \"values\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\",\n \"icon\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"group_id\": \"68b1f0c2a4d3e5f6a7b8c9d0\",\n \"priority\": 50,\n \"limit\": 1,\n \"max_batch_size\": 2,\n \"whitelisted_nodes\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ],\n \"blacklisted_nodes\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ]\n }\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("http://localhost:44442/api/v1/jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ],\n \"values\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\",\n \"icon\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"group_id\": \"68b1f0c2a4d3e5f6a7b8c9d0\",\n \"priority\": 50,\n \"limit\": 1,\n \"max_batch_size\": 2,\n \"whitelisted_nodes\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ],\n \"blacklisted_nodes\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:44442/api/v1/jobs")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ],\n \"values\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\",\n \"icon\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"group_id\": \"68b1f0c2a4d3e5f6a7b8c9d0\",\n \"priority\": 50,\n \"limit\": 1,\n \"max_batch_size\": 2,\n \"whitelisted_nodes\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ],\n \"blacklisted_nodes\": [\n \"68b1f0c2a4d3e5f6a7b8c9d0\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"tag": "<string>",
"title": "<string>",
"detail": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}