Import stack-spec.yaml as a StackKit deployment
curl --request POST \
--url https://api.kombify.io/v1/homelab/api/v1/stacks/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/yaml' \
--data '<string>'import requests
url = "https://api.kombify.io/v1/homelab/api/v1/stacks/import"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/yaml"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/yaml'},
body: '<string>'
};
fetch('https://api.kombify.io/v1/homelab/api/v1/stacks/import', 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/stacks/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/yaml"
],
]);
$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/stacks/import"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/yaml")
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/stacks/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/yaml")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kombify.io/v1/homelab/api/v1/stacks/import")
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/yaml'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"stack_id": "<string>",
"server_id": "<string>",
"job_id": "<string>",
"name": "<string>",
"state": "provisioning",
"message": "<string>",
"operations_url": "/stacks?stack_id=stack_123",
"idempotent_replay": true,
"bootstrap_token": "<string>",
"bootstrap_token_expires_at": "2023-11-07T05:31:56Z",
"owner_spec_endpoint": "/api/v1/stacks/stack_123/owner-spec",
"owner_spec_scopes": [
"read:owner-spec"
]
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}Stacks - Import/Export
Import stack-spec.yaml as a StackKit deployment
Imports YAML or JSON as a deployment under the authenticated owner’s Homelab.
POST
/
api
/
v1
/
stacks
/
import
Import stack-spec.yaml as a StackKit deployment
curl --request POST \
--url https://api.kombify.io/v1/homelab/api/v1/stacks/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/yaml' \
--data '<string>'import requests
url = "https://api.kombify.io/v1/homelab/api/v1/stacks/import"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/yaml"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/yaml'},
body: '<string>'
};
fetch('https://api.kombify.io/v1/homelab/api/v1/stacks/import', 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/stacks/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/yaml"
],
]);
$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/stacks/import"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/yaml")
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/stacks/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/yaml")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kombify.io/v1/homelab/api/v1/stacks/import")
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/yaml'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"stack_id": "<string>",
"server_id": "<string>",
"job_id": "<string>",
"name": "<string>",
"state": "provisioning",
"message": "<string>",
"operations_url": "/stacks?stack_id=stack_123",
"idempotent_replay": true,
"bootstrap_token": "<string>",
"bootstrap_token_expires_at": "2023-11-07T05:31:56Z",
"owner_spec_endpoint": "/api/v1/stacks/stack_123/owner-spec",
"owner_spec_scopes": [
"read:owner-spec"
]
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "<string>",
"details": "<unknown>"
}
}Autorizaciones
Cuerpo
application/yamlapplication/json
The body is of type string.
Respuesta
Import accepted
