Attach an owned Home Assistant instance to a pending owner enrollment
curl --request POST \
--url https://api.kombify.io/v1/homelab/api/v1/home-assistant/owners/attach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"stack_id": "<string>",
"binding_ref": "<string>",
"url": "<string>",
"token_wallet_item_id": "<string>",
"lease_id": "<string>",
"configure_granted": true,
"lifecycle_grants": {
"Backup": true,
"Restore": true,
"Update": true
},
"dependency_assessment_ref": "<string>",
"recovery_binding_ref": "<string>",
"recovery_backup_operation_id": "<string>",
"settings": {
"language": "<string>",
"time_zone": "<string>",
"internal_url": "<string>",
"external_url": "<string>"
}
}
'import requests
url = "https://api.kombify.io/v1/homelab/api/v1/home-assistant/owners/attach"
payload = {
"stack_id": "<string>",
"binding_ref": "<string>",
"url": "<string>",
"token_wallet_item_id": "<string>",
"lease_id": "<string>",
"configure_granted": True,
"lifecycle_grants": {
"Backup": True,
"Restore": True,
"Update": True
},
"dependency_assessment_ref": "<string>",
"recovery_binding_ref": "<string>",
"recovery_backup_operation_id": "<string>",
"settings": {
"language": "<string>",
"time_zone": "<string>",
"internal_url": "<string>",
"external_url": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stack_id: '<string>',
binding_ref: '<string>',
url: '<string>',
token_wallet_item_id: '<string>',
lease_id: '<string>',
configure_granted: true,
lifecycle_grants: {Backup: true, Restore: true, Update: true},
dependency_assessment_ref: '<string>',
recovery_binding_ref: '<string>',
recovery_backup_operation_id: '<string>',
settings: {
language: '<string>',
time_zone: '<string>',
internal_url: '<string>',
external_url: '<string>'
}
})
};
fetch('https://api.kombify.io/v1/homelab/api/v1/home-assistant/owners/attach', 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/home-assistant/owners/attach",
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([
'stack_id' => '<string>',
'binding_ref' => '<string>',
'url' => '<string>',
'token_wallet_item_id' => '<string>',
'lease_id' => '<string>',
'configure_granted' => true,
'lifecycle_grants' => [
'Backup' => true,
'Restore' => true,
'Update' => true
],
'dependency_assessment_ref' => '<string>',
'recovery_binding_ref' => '<string>',
'recovery_backup_operation_id' => '<string>',
'settings' => [
'language' => '<string>',
'time_zone' => '<string>',
'internal_url' => '<string>',
'external_url' => '<string>'
]
]),
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://api.kombify.io/v1/homelab/api/v1/home-assistant/owners/attach"
payload := strings.NewReader("{\n \"stack_id\": \"<string>\",\n \"binding_ref\": \"<string>\",\n \"url\": \"<string>\",\n \"token_wallet_item_id\": \"<string>\",\n \"lease_id\": \"<string>\",\n \"configure_granted\": true,\n \"lifecycle_grants\": {\n \"Backup\": true,\n \"Restore\": true,\n \"Update\": true\n },\n \"dependency_assessment_ref\": \"<string>\",\n \"recovery_binding_ref\": \"<string>\",\n \"recovery_backup_operation_id\": \"<string>\",\n \"settings\": {\n \"language\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"internal_url\": \"<string>\",\n \"external_url\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.kombify.io/v1/homelab/api/v1/home-assistant/owners/attach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"stack_id\": \"<string>\",\n \"binding_ref\": \"<string>\",\n \"url\": \"<string>\",\n \"token_wallet_item_id\": \"<string>\",\n \"lease_id\": \"<string>\",\n \"configure_granted\": true,\n \"lifecycle_grants\": {\n \"Backup\": true,\n \"Restore\": true,\n \"Update\": true\n },\n \"dependency_assessment_ref\": \"<string>\",\n \"recovery_binding_ref\": \"<string>\",\n \"recovery_backup_operation_id\": \"<string>\",\n \"settings\": {\n \"language\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"internal_url\": \"<string>\",\n \"external_url\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kombify.io/v1/homelab/api/v1/home-assistant/owners/attach")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"stack_id\": \"<string>\",\n \"binding_ref\": \"<string>\",\n \"url\": \"<string>\",\n \"token_wallet_item_id\": \"<string>\",\n \"lease_id\": \"<string>\",\n \"configure_granted\": true,\n \"lifecycle_grants\": {\n \"Backup\": true,\n \"Restore\": true,\n \"Update\": true\n },\n \"dependency_assessment_ref\": \"<string>\",\n \"recovery_binding_ref\": \"<string>\",\n \"recovery_backup_operation_id\": \"<string>\",\n \"settings\": {\n \"language\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"internal_url\": \"<string>\",\n \"external_url\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"binding_ref": "<string>",
"attached": true
},
"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>"
}
}Services
Attach an owned Home Assistant instance to a pending owner enrollment
Binds the instance’s endpoint and the long-lived access token held in the Wallet item token_wallet_item_id (a kombify Wallet item assigned to Homelab, or a built-in wallet API key or OAuth token item whose URL names this instance; resolved inside Homelab, never answered; this contract accepts no token) to a pending owner enrollment of an owned stack, with the lifecycle grants and baseline settings the owner chooses. The token is stored encrypted and an existing attachment is never overwritten (409 attachment_rejected). Self-hosted installs only (503 otherwise).
POST
/
api
/
v1
/
home-assistant
/
owners
/
attach
Attach an owned Home Assistant instance to a pending owner enrollment
curl --request POST \
--url https://api.kombify.io/v1/homelab/api/v1/home-assistant/owners/attach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"stack_id": "<string>",
"binding_ref": "<string>",
"url": "<string>",
"token_wallet_item_id": "<string>",
"lease_id": "<string>",
"configure_granted": true,
"lifecycle_grants": {
"Backup": true,
"Restore": true,
"Update": true
},
"dependency_assessment_ref": "<string>",
"recovery_binding_ref": "<string>",
"recovery_backup_operation_id": "<string>",
"settings": {
"language": "<string>",
"time_zone": "<string>",
"internal_url": "<string>",
"external_url": "<string>"
}
}
'import requests
url = "https://api.kombify.io/v1/homelab/api/v1/home-assistant/owners/attach"
payload = {
"stack_id": "<string>",
"binding_ref": "<string>",
"url": "<string>",
"token_wallet_item_id": "<string>",
"lease_id": "<string>",
"configure_granted": True,
"lifecycle_grants": {
"Backup": True,
"Restore": True,
"Update": True
},
"dependency_assessment_ref": "<string>",
"recovery_binding_ref": "<string>",
"recovery_backup_operation_id": "<string>",
"settings": {
"language": "<string>",
"time_zone": "<string>",
"internal_url": "<string>",
"external_url": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stack_id: '<string>',
binding_ref: '<string>',
url: '<string>',
token_wallet_item_id: '<string>',
lease_id: '<string>',
configure_granted: true,
lifecycle_grants: {Backup: true, Restore: true, Update: true},
dependency_assessment_ref: '<string>',
recovery_binding_ref: '<string>',
recovery_backup_operation_id: '<string>',
settings: {
language: '<string>',
time_zone: '<string>',
internal_url: '<string>',
external_url: '<string>'
}
})
};
fetch('https://api.kombify.io/v1/homelab/api/v1/home-assistant/owners/attach', 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/home-assistant/owners/attach",
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([
'stack_id' => '<string>',
'binding_ref' => '<string>',
'url' => '<string>',
'token_wallet_item_id' => '<string>',
'lease_id' => '<string>',
'configure_granted' => true,
'lifecycle_grants' => [
'Backup' => true,
'Restore' => true,
'Update' => true
],
'dependency_assessment_ref' => '<string>',
'recovery_binding_ref' => '<string>',
'recovery_backup_operation_id' => '<string>',
'settings' => [
'language' => '<string>',
'time_zone' => '<string>',
'internal_url' => '<string>',
'external_url' => '<string>'
]
]),
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://api.kombify.io/v1/homelab/api/v1/home-assistant/owners/attach"
payload := strings.NewReader("{\n \"stack_id\": \"<string>\",\n \"binding_ref\": \"<string>\",\n \"url\": \"<string>\",\n \"token_wallet_item_id\": \"<string>\",\n \"lease_id\": \"<string>\",\n \"configure_granted\": true,\n \"lifecycle_grants\": {\n \"Backup\": true,\n \"Restore\": true,\n \"Update\": true\n },\n \"dependency_assessment_ref\": \"<string>\",\n \"recovery_binding_ref\": \"<string>\",\n \"recovery_backup_operation_id\": \"<string>\",\n \"settings\": {\n \"language\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"internal_url\": \"<string>\",\n \"external_url\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.kombify.io/v1/homelab/api/v1/home-assistant/owners/attach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"stack_id\": \"<string>\",\n \"binding_ref\": \"<string>\",\n \"url\": \"<string>\",\n \"token_wallet_item_id\": \"<string>\",\n \"lease_id\": \"<string>\",\n \"configure_granted\": true,\n \"lifecycle_grants\": {\n \"Backup\": true,\n \"Restore\": true,\n \"Update\": true\n },\n \"dependency_assessment_ref\": \"<string>\",\n \"recovery_binding_ref\": \"<string>\",\n \"recovery_backup_operation_id\": \"<string>\",\n \"settings\": {\n \"language\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"internal_url\": \"<string>\",\n \"external_url\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kombify.io/v1/homelab/api/v1/home-assistant/owners/attach")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"stack_id\": \"<string>\",\n \"binding_ref\": \"<string>\",\n \"url\": \"<string>\",\n \"token_wallet_item_id\": \"<string>\",\n \"lease_id\": \"<string>\",\n \"configure_granted\": true,\n \"lifecycle_grants\": {\n \"Backup\": true,\n \"Restore\": true,\n \"Update\": true\n },\n \"dependency_assessment_ref\": \"<string>\",\n \"recovery_binding_ref\": \"<string>\",\n \"recovery_backup_operation_id\": \"<string>\",\n \"settings\": {\n \"language\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"internal_url\": \"<string>\",\n \"external_url\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"binding_ref": "<string>",
"attached": true
},
"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>"
}
}授权
请求体
application/json
