Create order draft worker bootstrap
curl --request POST \
--url https://api.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ttl_seconds": 43230
}
'import requests
url = "https://api.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap"
payload = { "ttl_seconds": 43230 }
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({ttl_seconds: 43230})
};
fetch('https://api.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap', 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.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap",
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([
'ttl_seconds' => 43230
]),
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.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap"
payload := strings.NewReader("{\n \"ttl_seconds\": 43230\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.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ttl_seconds\": 43230\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap")
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 \"ttl_seconds\": 43230\n}"
response = http.request(request)
puts response.read_body{
"token": "<string>",
"expires_at": 1,
"command": "<string>",
"cloud_init": "<string>",
"artifacts": {
"linux": {
"amd64": {
"supported": true,
"command": "<string>",
"download_url": "<string>",
"cloud_init": "<string>"
},
"arm64": {
"supported": true,
"command": "<string>",
"download_url": "<string>",
"cloud_init": "<string>"
}
},
"windows": {
"amd64": {
"supported": true,
"command": "<string>",
"download_url": "<string>",
"cloud_init": "<string>"
},
"arm64": {
"supported": true,
"command": "<string>",
"download_url": "<string>",
"cloud_init": "<string>"
}
}
}
}{
"success": false,
"errors": [
{
"code": 7002,
"message": "Resource not found",
"path": [
"body",
"name"
],
"metadata": {}
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": 7002,
"message": "Resource not found",
"path": [
"body",
"name"
],
"metadata": {}
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": 7002,
"message": "Resource not found",
"path": [
"body",
"name"
],
"metadata": {}
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": 7002,
"message": "Resource not found",
"path": [
"body",
"name"
],
"metadata": {}
}
],
"result": {}
}Order Drafts
Create order draft worker bootstrap
Creates a short-lived worker bootstrap token and renders command/cloud-init data for the cluster allocated to this order draft. Only valid while the draft is waiting for compute bootstrap.
POST
/
order_drafts
/
{id}
:createWorkerBootstrap
Create order draft worker bootstrap
curl --request POST \
--url https://api.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ttl_seconds": 43230
}
'import requests
url = "https://api.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap"
payload = { "ttl_seconds": 43230 }
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({ttl_seconds: 43230})
};
fetch('https://api.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap', 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.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap",
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([
'ttl_seconds' => 43230
]),
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.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap"
payload := strings.NewReader("{\n \"ttl_seconds\": 43230\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.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ttl_seconds\": 43230\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.akua.dev/v1/order_drafts/{id}:createWorkerBootstrap")
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 \"ttl_seconds\": 43230\n}"
response = http.request(request)
puts response.read_body{
"token": "<string>",
"expires_at": 1,
"command": "<string>",
"cloud_init": "<string>",
"artifacts": {
"linux": {
"amd64": {
"supported": true,
"command": "<string>",
"download_url": "<string>",
"cloud_init": "<string>"
},
"arm64": {
"supported": true,
"command": "<string>",
"download_url": "<string>",
"cloud_init": "<string>"
}
},
"windows": {
"amd64": {
"supported": true,
"command": "<string>",
"download_url": "<string>",
"cloud_init": "<string>"
},
"arm64": {
"supported": true,
"command": "<string>",
"download_url": "<string>",
"cloud_init": "<string>"
}
}
}
}{
"success": false,
"errors": [
{
"code": 7002,
"message": "Resource not found",
"path": [
"body",
"name"
],
"metadata": {}
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": 7002,
"message": "Resource not found",
"path": [
"body",
"name"
],
"metadata": {}
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": 7002,
"message": "Resource not found",
"path": [
"body",
"name"
],
"metadata": {}
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": 7002,
"message": "Resource not found",
"path": [
"body",
"name"
],
"metadata": {}
}
],
"result": {}
}Authorizations
workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at https://akua.dev/developers/api-tokens
Path Parameters
Order draft ID
Required string length:
1 - 55Example:
"odft_j572abc..."
Body
application/json
Required range:
60 <= x <= 86400Response
Worker bootstrap data
Short-lived worker join token (one-time view).
Token expiry time (unix seconds).
Required range:
x >= 0Bash bootstrap command with the token already substituted, ready to run on a worker node.
Cloud-init YAML with the token already substituted, ready to use as worker-node user-data.
Platform-specific bootstrap artifacts with tokens already substituted. Populated only on create responses.
Show child attributes
Show child attributes
⌘I