Cancel an owned maintenance job before execution starts
curl --request POST \
--url https://api.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/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.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/cancel",
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.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/cancel"
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.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/cancel")
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{
"data": {
"job_id": "<string>",
"server_id": "<string>",
"action": "os_update_plan",
"state": "queued",
"status": "queued",
"result": {
"plan_digest": "<string>",
"pending_count": 1,
"security_count": 1,
"reboot_likely": true,
"hold_scope": "<string>",
"held": [
"<string>"
],
"dpkg_problems": [
"<string>"
],
"packages": [
{
"name": "<string>",
"from": "<string>",
"to": "<string>",
"security": true
}
],
"packages_truncated": true,
"outcome": "applied",
"reboot_required": true,
"unit": "<string>",
"changed": 1,
"remaining_pending_count": 1,
"plan_digest_after": "<string>",
"not_installed": [
"<string>"
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reason_code": "<string>",
"plan_digest": "<string>",
"impact_snapshot_digest": "<string>",
"failure": {
"code": "<string>",
"retryable": true,
"user_guidance": {
"title": "<string>",
"body": "<string>",
"next_steps": [
"<string>"
]
}
},
"reboot": {
"boot_id_changed": true,
"scheduled_at": "2023-11-07T05:31:56Z",
"return_deadline": "2023-11-07T05:31:56Z"
},
"deadline_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
},
"meta": {
"total": 123,
"page": 123,
"per_page": 123,
"managed_runtime_inventory_complete": true,
"worker_inventory_sha256": "<string>",
"managed_runtime_active_lease_ids": [
"<string>"
],
"managed_runtime_inactive_lease_ids": [
"<string>"
],
"managed_runtime_lease_generation_digests": [
{
"lease_id": "<string>",
"resource_generation_digest": "<string>"
}
],
"managed_runtime_duplicate_lease_ids": [
"<string>"
],
"managed_runtime_attachment_conflict_lease_ids": [
"<string>"
]
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}Servers
Cancel an owned maintenance job before execution starts
Uses the same tenant, entitlement, server and requesting-owner scope as the job read: the authority to withdraw a queued job is the person who owns the server and requested the job, and the person’s agent acts with it. No delegated maintenance origin is needed, since cancelling only withdraws work that has not reached the server. Cancellation and execution claim use the same queued-state compare-and-set. Repeating a successful cancellation returns its receipt; a claimed or finished job returns maintenance_not_cancellable. Cancelling never claims to stop a command that has already reached the server.
POST
/
api
/
v1
/
servers
/
{serverId}
/
actions
/
{jobId}
/
cancel
Cancel an owned maintenance job before execution starts
curl --request POST \
--url https://api.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/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.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/cancel",
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.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/cancel"
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.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kombify.io/v1/homelab/api/v1/servers/{serverId}/actions/{jobId}/cancel")
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{
"data": {
"job_id": "<string>",
"server_id": "<string>",
"action": "os_update_plan",
"state": "queued",
"status": "queued",
"result": {
"plan_digest": "<string>",
"pending_count": 1,
"security_count": 1,
"reboot_likely": true,
"hold_scope": "<string>",
"held": [
"<string>"
],
"dpkg_problems": [
"<string>"
],
"packages": [
{
"name": "<string>",
"from": "<string>",
"to": "<string>",
"security": true
}
],
"packages_truncated": true,
"outcome": "applied",
"reboot_required": true,
"unit": "<string>",
"changed": 1,
"remaining_pending_count": 1,
"plan_digest_after": "<string>",
"not_installed": [
"<string>"
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reason_code": "<string>",
"plan_digest": "<string>",
"impact_snapshot_digest": "<string>",
"failure": {
"code": "<string>",
"retryable": true,
"user_guidance": {
"title": "<string>",
"body": "<string>",
"next_steps": [
"<string>"
]
}
},
"reboot": {
"boot_id_changed": true,
"scheduled_at": "2023-11-07T05:31:56Z",
"return_deadline": "2023-11-07T05:31:56Z"
},
"deadline_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
},
"meta": {
"total": 123,
"page": 123,
"per_page": 123,
"managed_runtime_inventory_complete": true,
"worker_inventory_sha256": "<string>",
"managed_runtime_active_lease_ids": [
"<string>"
],
"managed_runtime_inactive_lease_ids": [
"<string>"
],
"managed_runtime_lease_generation_digests": [
{
"lease_id": "<string>",
"resource_generation_digest": "<string>"
}
],
"managed_runtime_duplicate_lease_ids": [
"<string>"
],
"managed_runtime_attachment_conflict_lease_ids": [
"<string>"
]
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}