curl --request POST \
--url https://api.kombify.io/v1/homelab/api/v1/unifier/layout/recommendations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"stack_id": "<string>",
"goals": [
"<string>"
],
"compute_profile": "<string>",
"use_case_settings": {},
"use_case_capabilities": {},
"pins": {}
}
'import requests
url = "https://api.kombify.io/v1/homelab/api/v1/unifier/layout/recommendations"
payload = {
"stack_id": "<string>",
"goals": ["<string>"],
"compute_profile": "<string>",
"use_case_settings": {},
"use_case_capabilities": {},
"pins": {}
}
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>',
goals: ['<string>'],
compute_profile: '<string>',
use_case_settings: {},
use_case_capabilities: {},
pins: {}
})
};
fetch('https://api.kombify.io/v1/homelab/api/v1/unifier/layout/recommendations', 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/unifier/layout/recommendations",
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>',
'goals' => [
'<string>'
],
'compute_profile' => '<string>',
'use_case_settings' => [
],
'use_case_capabilities' => [
],
'pins' => [
]
]),
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/unifier/layout/recommendations"
payload := strings.NewReader("{\n \"stack_id\": \"<string>\",\n \"goals\": [\n \"<string>\"\n ],\n \"compute_profile\": \"<string>\",\n \"use_case_settings\": {},\n \"use_case_capabilities\": {},\n \"pins\": {}\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/unifier/layout/recommendations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"stack_id\": \"<string>\",\n \"goals\": [\n \"<string>\"\n ],\n \"compute_profile\": \"<string>\",\n \"use_case_settings\": {},\n \"use_case_capabilities\": {},\n \"pins\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kombify.io/v1/homelab/api/v1/unifier/layout/recommendations")
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 \"goals\": [\n \"<string>\"\n ],\n \"compute_profile\": \"<string>\",\n \"use_case_settings\": {},\n \"use_case_capabilities\": {},\n \"pins\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"api_version": "<string>",
"state": "<string>",
"scope": "<string>",
"stack_id": "<string>",
"flow": "<string>",
"target": {
"action": "extend",
"stack_id": "<string>",
"stack_name": "<string>",
"server_id": "<string>",
"server_name": "<string>"
},
"outcome": "feasible",
"proposal_digest": "<string>",
"snapshot_digest": "<string>",
"material_digest": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"superseded_by": "<string>",
"catalog_release": "<string>",
"planner": {},
"nodes": [
{}
],
"assignments": [
{}
],
"existing": [
{}
],
"servers": [
{
"id": "<string>",
"name": "<string>",
"stack_id": "<string>",
"stack_name": "<string>",
"connected": true
}
],
"notes": [
{}
],
"conflicts": [
{}
],
"verification": {}
},
"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>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}Compute and record a verified workload layout for a planned change
Plans where the selected goals run for an add-server or add-use-case change. An add-server change is planned on the nodes of its owned StackKit deployment; an add-use-case change is planned over every server of the owner’s homelab in the tenant (all owned deployments and connected bare servers), and target names where it is carried out: extend a deployment (the one in stack_id or another one), or found a new deployment on a bare server (information only). Verifies the option with the pinned StackKits feasibility check and, when it is feasible, records it as an open recommendation the owner can accept inside the wizard run on the target deployment, reject or snooze. An option that is not verified is returned with state unverified and no id. pins carries the owner’s “Choose another server” choices of an add-use-case change (use case id to server id): the planner re-solves with them on the deployment that declares the chosen servers, and the result is verified like any other; a server outside the owner’s deployments in this tenant is refused with layout_pin_server_unavailable. Records the proposal but changes no infrastructure.
curl --request POST \
--url https://api.kombify.io/v1/homelab/api/v1/unifier/layout/recommendations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"stack_id": "<string>",
"goals": [
"<string>"
],
"compute_profile": "<string>",
"use_case_settings": {},
"use_case_capabilities": {},
"pins": {}
}
'import requests
url = "https://api.kombify.io/v1/homelab/api/v1/unifier/layout/recommendations"
payload = {
"stack_id": "<string>",
"goals": ["<string>"],
"compute_profile": "<string>",
"use_case_settings": {},
"use_case_capabilities": {},
"pins": {}
}
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>',
goals: ['<string>'],
compute_profile: '<string>',
use_case_settings: {},
use_case_capabilities: {},
pins: {}
})
};
fetch('https://api.kombify.io/v1/homelab/api/v1/unifier/layout/recommendations', 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/unifier/layout/recommendations",
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>',
'goals' => [
'<string>'
],
'compute_profile' => '<string>',
'use_case_settings' => [
],
'use_case_capabilities' => [
],
'pins' => [
]
]),
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/unifier/layout/recommendations"
payload := strings.NewReader("{\n \"stack_id\": \"<string>\",\n \"goals\": [\n \"<string>\"\n ],\n \"compute_profile\": \"<string>\",\n \"use_case_settings\": {},\n \"use_case_capabilities\": {},\n \"pins\": {}\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/unifier/layout/recommendations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"stack_id\": \"<string>\",\n \"goals\": [\n \"<string>\"\n ],\n \"compute_profile\": \"<string>\",\n \"use_case_settings\": {},\n \"use_case_capabilities\": {},\n \"pins\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kombify.io/v1/homelab/api/v1/unifier/layout/recommendations")
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 \"goals\": [\n \"<string>\"\n ],\n \"compute_profile\": \"<string>\",\n \"use_case_settings\": {},\n \"use_case_capabilities\": {},\n \"pins\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"api_version": "<string>",
"state": "<string>",
"scope": "<string>",
"stack_id": "<string>",
"flow": "<string>",
"target": {
"action": "extend",
"stack_id": "<string>",
"stack_name": "<string>",
"server_id": "<string>",
"server_name": "<string>"
},
"outcome": "feasible",
"proposal_digest": "<string>",
"snapshot_digest": "<string>",
"material_digest": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"superseded_by": "<string>",
"catalog_release": "<string>",
"planner": {},
"nodes": [
{}
],
"assignments": [
{}
],
"existing": [
{}
],
"servers": [
{
"id": "<string>",
"name": "<string>",
"stack_id": "<string>",
"stack_name": "<string>",
"connected": true
}
],
"notes": [
{}
],
"conflicts": [
{}
],
"verification": {}
},
"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>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}