curl --request POST \
--url https://api.kombify.io/v1/homelab/api/v1/registry/services/{serviceId}/actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"expected_inventory_revision": 2,
"version": "<string>",
"digest": "<string>",
"acknowledge_untested": true,
"advisory_id": "<string>"
}
'import requests
url = "https://api.kombify.io/v1/homelab/api/v1/registry/services/{serviceId}/actions"
payload = {
"expected_inventory_revision": 2,
"version": "<string>",
"digest": "<string>",
"acknowledge_untested": True,
"advisory_id": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
expected_inventory_revision: 2,
version: '<string>',
digest: '<string>',
acknowledge_untested: true,
advisory_id: '<string>'
})
};
fetch('https://api.kombify.io/v1/homelab/api/v1/registry/services/{serviceId}/actions', 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/registry/services/{serviceId}/actions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_inventory_revision' => 2,
'version' => '<string>',
'digest' => '<string>',
'acknowledge_untested' => true,
'advisory_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.kombify.io/v1/homelab/api/v1/registry/services/{serviceId}/actions"
payload := strings.NewReader("{\n \"expected_inventory_revision\": 2,\n \"version\": \"<string>\",\n \"digest\": \"<string>\",\n \"acknowledge_untested\": true,\n \"advisory_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.post("https://api.kombify.io/v1/homelab/api/v1/registry/services/{serviceId}/actions")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_inventory_revision\": 2,\n \"version\": \"<string>\",\n \"digest\": \"<string>\",\n \"acknowledge_untested\": true,\n \"advisory_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kombify.io/v1/homelab/api/v1/registry/services/{serviceId}/actions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_inventory_revision\": 2,\n \"version\": \"<string>\",\n \"digest\": \"<string>\",\n \"acknowledge_untested\": true,\n \"advisory_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"job_id": "<string>",
"service_id": "<string>",
"action": "start",
"status": "queued",
"action_card_id": "<string>"
},
"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>"
}
}Run a governed StackKits service action
Derives stack, server, agent, kit and service authority from fresh canonical inventory. Every agent-executed mutation (start, stop, restart, update, backup, adopted applications included) runs as one governed RIL action card, its only write path: the card is derived from the service, its server and worker (an adopted application by its exact container, update with the pinned release, backup with the stack’s backup contract), its one Gateway Decision is answered by the acting agent’s equipment (no per-call approval flag), and the executor-bound primitive (start-service, stop-service, restart-service, update-service or run-backup) runs through the same lease, one-use claim, node proof, dispatcher and evidence as /v1/ril/action-cards. The response names the card in action_card_id and its execution in job_id; read it back with get_action_card for its status and evidence. freeze and unfreeze set the owner guardrail in the control plane without reaching the node. This operation only changes a service: a log page is requested with POST /api/v1/registry/services/{serviceId}/logs and read with GET on the same path. Exact replays converge on the same card receipt and a different body under the same key is 409; the raw Idempotency-Key is never persisted. A start or restart is followed by StackKits verify before measured state changes. Agent-executed actions refuse with 409 maintenance_active while the server is being rebooted or updated, a kit whose backups are managed refuses backup with 403 managed_backup_custody, and a locked service, application group or (for update) stack refuses on both entries.
curl --request POST \
--url https://api.kombify.io/v1/homelab/api/v1/registry/services/{serviceId}/actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"expected_inventory_revision": 2,
"version": "<string>",
"digest": "<string>",
"acknowledge_untested": true,
"advisory_id": "<string>"
}
'import requests
url = "https://api.kombify.io/v1/homelab/api/v1/registry/services/{serviceId}/actions"
payload = {
"expected_inventory_revision": 2,
"version": "<string>",
"digest": "<string>",
"acknowledge_untested": True,
"advisory_id": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
expected_inventory_revision: 2,
version: '<string>',
digest: '<string>',
acknowledge_untested: true,
advisory_id: '<string>'
})
};
fetch('https://api.kombify.io/v1/homelab/api/v1/registry/services/{serviceId}/actions', 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/registry/services/{serviceId}/actions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_inventory_revision' => 2,
'version' => '<string>',
'digest' => '<string>',
'acknowledge_untested' => true,
'advisory_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.kombify.io/v1/homelab/api/v1/registry/services/{serviceId}/actions"
payload := strings.NewReader("{\n \"expected_inventory_revision\": 2,\n \"version\": \"<string>\",\n \"digest\": \"<string>\",\n \"acknowledge_untested\": true,\n \"advisory_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.post("https://api.kombify.io/v1/homelab/api/v1/registry/services/{serviceId}/actions")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_inventory_revision\": 2,\n \"version\": \"<string>\",\n \"digest\": \"<string>\",\n \"acknowledge_untested\": true,\n \"advisory_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kombify.io/v1/homelab/api/v1/registry/services/{serviceId}/actions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_inventory_revision\": 2,\n \"version\": \"<string>\",\n \"digest\": \"<string>\",\n \"acknowledge_untested\": true,\n \"advisory_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"job_id": "<string>",
"service_id": "<string>",
"action": "start",
"status": "queued",
"action_card_id": "<string>"
},
"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>"
}
}授权
请求体
- Option 1
- Option 2
Either an agent-executed runtime action bound to a fresh inventory revision, or an owner lock action executed entirely in the control plane. The lock is not bound to an inventory observation: an owner must be able to freeze a service whose agent is unreachable.
update runs the StackKit upgrade of the owning stack to the pinned release; it is accepted only while allowed_actions advertises it, which a managed service does while its server's Guard runs an older StackKits release than the published one. The upgrade keeps a restore point, verifies the target live and automatically returns to the previous release when that verification fails; the card's evidence states which (service-update-succeeded, service-update-returned-to-previous-release with recovery recovered, or a failure code). For a StackKits-managed application whose version fact is application_update, update with version and digest moves only that application to that release: the node checkpoints its data, updates it and rolls it back automatically when generate, apply or verify fails. The job result's application_update_outcome.result is updated, rolled_back, rollback_failed or refused (with reason_code). The server re-checks a fresh fact: the version must be one of newer_versions with its exact digest and the same major version; an unchecked version needs acknowledge_untested; under with_stackkits_releases only a security fix (advisory_id of the fact's security_fix) is admitted. A refusal is 409 with reason_code. backup takes one out-of-band snapshot of the owning stack (Basement kits; managed kits keep their schedule).
start, stop, restart, update, backup 