Update the stack identity only when its local revision still matches
curl --request PUT \
--url https://api.kombify.io/v1/homelab/api/v1/auth/stack-identity/conditional \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'If-Match: <if-match>' \
--data '
{
"name": "<string>",
"characterId": "<string>",
"animationStyle": "<string>",
"animationEnabled": true,
"glowColorOverride": "<string>"
}
'import requests
url = "https://api.kombify.io/v1/homelab/api/v1/auth/stack-identity/conditional"
payload = {
"name": "<string>",
"characterId": "<string>",
"animationStyle": "<string>",
"animationEnabled": True,
"glowColorOverride": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'Idempotency-Key': '<idempotency-key>',
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
characterId: '<string>',
animationStyle: '<string>',
animationEnabled: true,
glowColorOverride: '<string>'
})
};
fetch('https://api.kombify.io/v1/homelab/api/v1/auth/stack-identity/conditional', 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/auth/stack-identity/conditional",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'characterId' => '<string>',
'animationStyle' => '<string>',
'animationEnabled' => true,
'glowColorOverride' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"If-Match: <if-match>"
],
]);
$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/auth/stack-identity/conditional"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"characterId\": \"<string>\",\n \"animationStyle\": \"<string>\",\n \"animationEnabled\": true,\n \"glowColorOverride\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("If-Match", "<if-match>")
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.put("https://api.kombify.io/v1/homelab/api/v1/auth/stack-identity/conditional")
.header("Idempotency-Key", "<idempotency-key>")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"characterId\": \"<string>\",\n \"animationStyle\": \"<string>\",\n \"animationEnabled\": true,\n \"glowColorOverride\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kombify.io/v1/homelab/api/v1/auth/stack-identity/conditional")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"characterId\": \"<string>\",\n \"animationStyle\": \"<string>\",\n \"animationEnabled\": true,\n \"glowColorOverride\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"stack_identity": {},
"editable": true,
"sync": {
"cloud_revision": 123,
"pending": true
},
"local_revision": 123,
"mutation": {
"id": "<string>",
"tenant_id": "<string>",
"owner_subject_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>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}Auth
Update the stack identity only when its local revision still matches
Revision-checked variant of the stack identity update. If-Match carries the local_revision read from the stack identity, in double quotes (for example "3"); a stale revision answers 412 and a reused Idempotency-Key with different content answers 409. The edit is stored locally and marked pending until it is synced with kombify Cloud. The body is limited to 4096 bytes. Requires the Postgres control plane (503 stack_identity_store_unavailable otherwise).
PUT
/
api
/
v1
/
auth
/
stack-identity
/
conditional
Update the stack identity only when its local revision still matches
curl --request PUT \
--url https://api.kombify.io/v1/homelab/api/v1/auth/stack-identity/conditional \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'If-Match: <if-match>' \
--data '
{
"name": "<string>",
"characterId": "<string>",
"animationStyle": "<string>",
"animationEnabled": true,
"glowColorOverride": "<string>"
}
'import requests
url = "https://api.kombify.io/v1/homelab/api/v1/auth/stack-identity/conditional"
payload = {
"name": "<string>",
"characterId": "<string>",
"animationStyle": "<string>",
"animationEnabled": True,
"glowColorOverride": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'Idempotency-Key': '<idempotency-key>',
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
characterId: '<string>',
animationStyle: '<string>',
animationEnabled: true,
glowColorOverride: '<string>'
})
};
fetch('https://api.kombify.io/v1/homelab/api/v1/auth/stack-identity/conditional', 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/auth/stack-identity/conditional",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'characterId' => '<string>',
'animationStyle' => '<string>',
'animationEnabled' => true,
'glowColorOverride' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"If-Match: <if-match>"
],
]);
$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/auth/stack-identity/conditional"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"characterId\": \"<string>\",\n \"animationStyle\": \"<string>\",\n \"animationEnabled\": true,\n \"glowColorOverride\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("If-Match", "<if-match>")
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.put("https://api.kombify.io/v1/homelab/api/v1/auth/stack-identity/conditional")
.header("Idempotency-Key", "<idempotency-key>")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"characterId\": \"<string>\",\n \"animationStyle\": \"<string>\",\n \"animationEnabled\": true,\n \"glowColorOverride\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kombify.io/v1/homelab/api/v1/auth/stack-identity/conditional")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"characterId\": \"<string>\",\n \"animationStyle\": \"<string>\",\n \"animationEnabled\": true,\n \"glowColorOverride\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"stack_identity": {},
"editable": true,
"sync": {
"cloud_revision": 123,
"pending": true
},
"local_revision": 123,
"mutation": {
"id": "<string>",
"tenant_id": "<string>",
"owner_subject_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>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}授权
请求头
请求体
application/json
