Create a workspace from a template.
curl --request POST \
--url https://api.rigbox.dev/api/v1/quick-deploy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template_id": "<string>",
"app_params": {},
"catalog_ids": [
"<string>"
],
"disk_size_mb": 1,
"env_vars": {},
"name": "<string>",
"ram_mb": 1,
"service_spec_ids": [
"<string>"
],
"setup_script_ids": [
"<string>"
],
"vcpu_count": 1
}
'import requests
url = "https://api.rigbox.dev/api/v1/quick-deploy"
payload = {
"template_id": "<string>",
"app_params": {},
"catalog_ids": ["<string>"],
"disk_size_mb": 1,
"env_vars": {},
"name": "<string>",
"ram_mb": 1,
"service_spec_ids": ["<string>"],
"setup_script_ids": ["<string>"],
"vcpu_count": 1
}
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({
template_id: '<string>',
app_params: {},
catalog_ids: ['<string>'],
disk_size_mb: 1,
env_vars: {},
name: '<string>',
ram_mb: 1,
service_spec_ids: ['<string>'],
setup_script_ids: ['<string>'],
vcpu_count: 1
})
};
fetch('https://api.rigbox.dev/api/v1/quick-deploy', 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.rigbox.dev/api/v1/quick-deploy",
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([
'template_id' => '<string>',
'app_params' => [
],
'catalog_ids' => [
'<string>'
],
'disk_size_mb' => 1,
'env_vars' => [
],
'name' => '<string>',
'ram_mb' => 1,
'service_spec_ids' => [
'<string>'
],
'setup_script_ids' => [
'<string>'
],
'vcpu_count' => 1
]),
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.rigbox.dev/api/v1/quick-deploy"
payload := strings.NewReader("{\n \"template_id\": \"<string>\",\n \"app_params\": {},\n \"catalog_ids\": [\n \"<string>\"\n ],\n \"disk_size_mb\": 1,\n \"env_vars\": {},\n \"name\": \"<string>\",\n \"ram_mb\": 1,\n \"service_spec_ids\": [\n \"<string>\"\n ],\n \"setup_script_ids\": [\n \"<string>\"\n ],\n \"vcpu_count\": 1\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.rigbox.dev/api/v1/quick-deploy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\",\n \"app_params\": {},\n \"catalog_ids\": [\n \"<string>\"\n ],\n \"disk_size_mb\": 1,\n \"env_vars\": {},\n \"name\": \"<string>\",\n \"ram_mb\": 1,\n \"service_spec_ids\": [\n \"<string>\"\n ],\n \"setup_script_ids\": [\n \"<string>\"\n ],\n \"vcpu_count\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rigbox.dev/api/v1/quick-deploy")
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 \"template_id\": \"<string>\",\n \"app_params\": {},\n \"catalog_ids\": [\n \"<string>\"\n ],\n \"disk_size_mb\": 1,\n \"env_vars\": {},\n \"name\": \"<string>\",\n \"ram_mb\": 1,\n \"service_spec_ids\": [\n \"<string>\"\n ],\n \"setup_script_ids\": [\n \"<string>\"\n ],\n \"vcpu_count\": 1\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"workspace": {
"created_at": "2023-11-07T05:31:56Z",
"disk_size_mb": 1,
"id": "<string>",
"image": "<string>",
"name": "<string>",
"node_id": "<string>",
"ram_mb": 1,
"updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"vcpu_count": 1,
"ai_mode": "<string>",
"cloned_from": "<string>",
"creation_attempts": 123,
"creation_started_at": "2023-11-07T05:31:56Z",
"env_vars": {},
"failure_code": "<string>",
"failure_reason": "<string>",
"image_digest": "<string>",
"ip_address": "<string>",
"service_spec_ids": [
"<string>"
],
"setup_script_ids": [
"<string>"
],
"template_id": "<string>"
},
"expected_apps": [
{
"allowed_emails": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"node_id": "<string>",
"port": 1,
"subdomain": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"workspace_id": "<string>",
"app_kind": "<string>",
"custom_domain": "<string>",
"custom_domain_verified": true,
"depends_on": [
"<string>"
],
"description": "<string>",
"managed": true,
"metadata": "<unknown>",
"protocol": "<string>",
"system_tags": [
"<string>"
]
}
],
"installed_apps": [
"<string>"
]
}Templates
Quick Deploy
Create a workspace from a template in one call.
POST
/
api
/
v1
/
quick-deploy
Create a workspace from a template.
curl --request POST \
--url https://api.rigbox.dev/api/v1/quick-deploy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template_id": "<string>",
"app_params": {},
"catalog_ids": [
"<string>"
],
"disk_size_mb": 1,
"env_vars": {},
"name": "<string>",
"ram_mb": 1,
"service_spec_ids": [
"<string>"
],
"setup_script_ids": [
"<string>"
],
"vcpu_count": 1
}
'import requests
url = "https://api.rigbox.dev/api/v1/quick-deploy"
payload = {
"template_id": "<string>",
"app_params": {},
"catalog_ids": ["<string>"],
"disk_size_mb": 1,
"env_vars": {},
"name": "<string>",
"ram_mb": 1,
"service_spec_ids": ["<string>"],
"setup_script_ids": ["<string>"],
"vcpu_count": 1
}
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({
template_id: '<string>',
app_params: {},
catalog_ids: ['<string>'],
disk_size_mb: 1,
env_vars: {},
name: '<string>',
ram_mb: 1,
service_spec_ids: ['<string>'],
setup_script_ids: ['<string>'],
vcpu_count: 1
})
};
fetch('https://api.rigbox.dev/api/v1/quick-deploy', 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.rigbox.dev/api/v1/quick-deploy",
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([
'template_id' => '<string>',
'app_params' => [
],
'catalog_ids' => [
'<string>'
],
'disk_size_mb' => 1,
'env_vars' => [
],
'name' => '<string>',
'ram_mb' => 1,
'service_spec_ids' => [
'<string>'
],
'setup_script_ids' => [
'<string>'
],
'vcpu_count' => 1
]),
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.rigbox.dev/api/v1/quick-deploy"
payload := strings.NewReader("{\n \"template_id\": \"<string>\",\n \"app_params\": {},\n \"catalog_ids\": [\n \"<string>\"\n ],\n \"disk_size_mb\": 1,\n \"env_vars\": {},\n \"name\": \"<string>\",\n \"ram_mb\": 1,\n \"service_spec_ids\": [\n \"<string>\"\n ],\n \"setup_script_ids\": [\n \"<string>\"\n ],\n \"vcpu_count\": 1\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.rigbox.dev/api/v1/quick-deploy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\",\n \"app_params\": {},\n \"catalog_ids\": [\n \"<string>\"\n ],\n \"disk_size_mb\": 1,\n \"env_vars\": {},\n \"name\": \"<string>\",\n \"ram_mb\": 1,\n \"service_spec_ids\": [\n \"<string>\"\n ],\n \"setup_script_ids\": [\n \"<string>\"\n ],\n \"vcpu_count\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rigbox.dev/api/v1/quick-deploy")
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 \"template_id\": \"<string>\",\n \"app_params\": {},\n \"catalog_ids\": [\n \"<string>\"\n ],\n \"disk_size_mb\": 1,\n \"env_vars\": {},\n \"name\": \"<string>\",\n \"ram_mb\": 1,\n \"service_spec_ids\": [\n \"<string>\"\n ],\n \"setup_script_ids\": [\n \"<string>\"\n ],\n \"vcpu_count\": 1\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"workspace": {
"created_at": "2023-11-07T05:31:56Z",
"disk_size_mb": 1,
"id": "<string>",
"image": "<string>",
"name": "<string>",
"node_id": "<string>",
"ram_mb": 1,
"updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"vcpu_count": 1,
"ai_mode": "<string>",
"cloned_from": "<string>",
"creation_attempts": 123,
"creation_started_at": "2023-11-07T05:31:56Z",
"env_vars": {},
"failure_code": "<string>",
"failure_reason": "<string>",
"image_digest": "<string>",
"ip_address": "<string>",
"service_spec_ids": [
"<string>"
],
"setup_script_ids": [
"<string>"
],
"template_id": "<string>"
},
"expected_apps": [
{
"allowed_emails": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"node_id": "<string>",
"port": 1,
"subdomain": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"workspace_id": "<string>",
"app_kind": "<string>",
"custom_domain": "<string>",
"custom_domain_verified": true,
"depends_on": [
"<string>"
],
"description": "<string>",
"managed": true,
"metadata": "<unknown>",
"protocol": "<string>",
"system_tags": [
"<string>"
]
}
],
"installed_apps": [
"<string>"
]
}This is the fastest way to get a workspace running. It provisions the workspace, applies template defaults, raises requested resources to the template/catalog floor when needed, and starts the workspace.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes
Required range:
x >= 0Show child attributes
Show child attributes
Required range:
x >= 0Required range:
x >= 0⌘I