Create a template
curl --request POST \
--url http://127.0.0.1:8765/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"config": {
"mounts": {},
"io": {
"buffer_bytes": 65536
},
"command_limits": {},
"max_memory": "<string>",
"max_body_bytes": "<string>",
"max_env": "<string>",
"network": true,
"system_time": "<string>",
"clis": {},
"runtimes": [
"<string>"
],
"route_policy": {
"script": {
"source": "<string>",
"language": "python",
"module": false
},
"runtime": "monty",
"env": {}
},
"profiles": {},
"profile": "<string>",
"processes": {
"list": "session",
"kill": "session",
"max": 128
},
"mode": "write",
"default_session_id": "<string>",
"workspace_id": "<string>",
"cache": {
"type": "ram",
"limit": "32MB",
"max_drain_bytes": 123
},
"index": {
"type": "ram",
"ttl": 600
},
"store": {
"type": "ram",
"url": "redis://localhost:6379/0",
"key_prefix": "mirage:",
"root": "~/.mirage/state",
"namespace": {
"type": "ram"
},
"observer": {
"type": "ram"
},
"workspace": {
"type": "ram"
},
"jobs": {
"type": "ram"
}
},
"env": {},
"secrets": {}
},
"description": "<string>"
}
'import requests
url = "http://127.0.0.1:8765/v1/templates"
payload = {
"name": "<string>",
"config": {
"mounts": {},
"io": { "buffer_bytes": 65536 },
"command_limits": {},
"max_memory": "<string>",
"max_body_bytes": "<string>",
"max_env": "<string>",
"network": True,
"system_time": "<string>",
"clis": {},
"runtimes": ["<string>"],
"route_policy": {
"script": {
"source": "<string>",
"language": "python",
"module": False
},
"runtime": "monty",
"env": {}
},
"profiles": {},
"profile": "<string>",
"processes": {
"list": "session",
"kill": "session",
"max": 128
},
"mode": "write",
"default_session_id": "<string>",
"workspace_id": "<string>",
"cache": {
"type": "ram",
"limit": "32MB",
"max_drain_bytes": 123
},
"index": {
"type": "ram",
"ttl": 600
},
"store": {
"type": "ram",
"url": "redis://localhost:6379/0",
"key_prefix": "mirage:",
"root": "~/.mirage/state",
"namespace": { "type": "ram" },
"observer": { "type": "ram" },
"workspace": { "type": "ram" },
"jobs": { "type": "ram" }
},
"env": {},
"secrets": {}
},
"description": "<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({
name: '<string>',
config: {
mounts: {},
io: {buffer_bytes: 65536},
command_limits: {},
max_memory: '<string>',
max_body_bytes: '<string>',
max_env: '<string>',
network: true,
system_time: '<string>',
clis: {},
runtimes: ['<string>'],
route_policy: {
script: {source: '<string>', language: 'python', module: false},
runtime: 'monty',
env: {}
},
profiles: {},
profile: '<string>',
processes: {list: 'session', kill: 'session', max: 128},
mode: 'write',
default_session_id: '<string>',
workspace_id: '<string>',
cache: {type: 'ram', limit: '32MB', max_drain_bytes: 123},
index: {type: 'ram', ttl: 600},
store: {
type: 'ram',
url: 'redis://localhost:6379/0',
key_prefix: 'mirage:',
root: '~/.mirage/state',
namespace: {type: 'ram'},
observer: {type: 'ram'},
workspace: {type: 'ram'},
jobs: {type: 'ram'}
},
env: {},
secrets: {}
},
description: '<string>'
})
};
fetch('http://127.0.0.1:8765/v1/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8765",
CURLOPT_URL => "http://127.0.0.1:8765/v1/templates",
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([
'name' => '<string>',
'config' => [
'mounts' => [
],
'io' => [
'buffer_bytes' => 65536
],
'command_limits' => [
],
'max_memory' => '<string>',
'max_body_bytes' => '<string>',
'max_env' => '<string>',
'network' => true,
'system_time' => '<string>',
'clis' => [
],
'runtimes' => [
'<string>'
],
'route_policy' => [
'script' => [
'source' => '<string>',
'language' => 'python',
'module' => false
],
'runtime' => 'monty',
'env' => [
]
],
'profiles' => [
],
'profile' => '<string>',
'processes' => [
'list' => 'session',
'kill' => 'session',
'max' => 128
],
'mode' => 'write',
'default_session_id' => '<string>',
'workspace_id' => '<string>',
'cache' => [
'type' => 'ram',
'limit' => '32MB',
'max_drain_bytes' => 123
],
'index' => [
'type' => 'ram',
'ttl' => 600
],
'store' => [
'type' => 'ram',
'url' => 'redis://localhost:6379/0',
'key_prefix' => 'mirage:',
'root' => '~/.mirage/state',
'namespace' => [
'type' => 'ram'
],
'observer' => [
'type' => 'ram'
],
'workspace' => [
'type' => 'ram'
],
'jobs' => [
'type' => 'ram'
]
],
'env' => [
],
'secrets' => [
]
],
'description' => '<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 := "http://127.0.0.1:8765/v1/templates"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"config\": {\n \"mounts\": {},\n \"io\": {\n \"buffer_bytes\": 65536\n },\n \"command_limits\": {},\n \"max_memory\": \"<string>\",\n \"max_body_bytes\": \"<string>\",\n \"max_env\": \"<string>\",\n \"network\": true,\n \"system_time\": \"<string>\",\n \"clis\": {},\n \"runtimes\": [\n \"<string>\"\n ],\n \"route_policy\": {\n \"script\": {\n \"source\": \"<string>\",\n \"language\": \"python\",\n \"module\": false\n },\n \"runtime\": \"monty\",\n \"env\": {}\n },\n \"profiles\": {},\n \"profile\": \"<string>\",\n \"processes\": {\n \"list\": \"session\",\n \"kill\": \"session\",\n \"max\": 128\n },\n \"mode\": \"write\",\n \"default_session_id\": \"<string>\",\n \"workspace_id\": \"<string>\",\n \"cache\": {\n \"type\": \"ram\",\n \"limit\": \"32MB\",\n \"max_drain_bytes\": 123\n },\n \"index\": {\n \"type\": \"ram\",\n \"ttl\": 600\n },\n \"store\": {\n \"type\": \"ram\",\n \"url\": \"redis://localhost:6379/0\",\n \"key_prefix\": \"mirage:\",\n \"root\": \"~/.mirage/state\",\n \"namespace\": {\n \"type\": \"ram\"\n },\n \"observer\": {\n \"type\": \"ram\"\n },\n \"workspace\": {\n \"type\": \"ram\"\n },\n \"jobs\": {\n \"type\": \"ram\"\n }\n },\n \"env\": {},\n \"secrets\": {}\n },\n \"description\": \"<string>\"\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("http://127.0.0.1:8765/v1/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"config\": {\n \"mounts\": {},\n \"io\": {\n \"buffer_bytes\": 65536\n },\n \"command_limits\": {},\n \"max_memory\": \"<string>\",\n \"max_body_bytes\": \"<string>\",\n \"max_env\": \"<string>\",\n \"network\": true,\n \"system_time\": \"<string>\",\n \"clis\": {},\n \"runtimes\": [\n \"<string>\"\n ],\n \"route_policy\": {\n \"script\": {\n \"source\": \"<string>\",\n \"language\": \"python\",\n \"module\": false\n },\n \"runtime\": \"monty\",\n \"env\": {}\n },\n \"profiles\": {},\n \"profile\": \"<string>\",\n \"processes\": {\n \"list\": \"session\",\n \"kill\": \"session\",\n \"max\": 128\n },\n \"mode\": \"write\",\n \"default_session_id\": \"<string>\",\n \"workspace_id\": \"<string>\",\n \"cache\": {\n \"type\": \"ram\",\n \"limit\": \"32MB\",\n \"max_drain_bytes\": 123\n },\n \"index\": {\n \"type\": \"ram\",\n \"ttl\": 600\n },\n \"store\": {\n \"type\": \"ram\",\n \"url\": \"redis://localhost:6379/0\",\n \"key_prefix\": \"mirage:\",\n \"root\": \"~/.mirage/state\",\n \"namespace\": {\n \"type\": \"ram\"\n },\n \"observer\": {\n \"type\": \"ram\"\n },\n \"workspace\": {\n \"type\": \"ram\"\n },\n \"jobs\": {\n \"type\": \"ram\"\n }\n },\n \"env\": {},\n \"secrets\": {}\n },\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8765/v1/templates")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"config\": {\n \"mounts\": {},\n \"io\": {\n \"buffer_bytes\": 65536\n },\n \"command_limits\": {},\n \"max_memory\": \"<string>\",\n \"max_body_bytes\": \"<string>\",\n \"max_env\": \"<string>\",\n \"network\": true,\n \"system_time\": \"<string>\",\n \"clis\": {},\n \"runtimes\": [\n \"<string>\"\n ],\n \"route_policy\": {\n \"script\": {\n \"source\": \"<string>\",\n \"language\": \"python\",\n \"module\": false\n },\n \"runtime\": \"monty\",\n \"env\": {}\n },\n \"profiles\": {},\n \"profile\": \"<string>\",\n \"processes\": {\n \"list\": \"session\",\n \"kill\": \"session\",\n \"max\": 128\n },\n \"mode\": \"write\",\n \"default_session_id\": \"<string>\",\n \"workspace_id\": \"<string>\",\n \"cache\": {\n \"type\": \"ram\",\n \"limit\": \"32MB\",\n \"max_drain_bytes\": 123\n },\n \"index\": {\n \"type\": \"ram\",\n \"ttl\": 600\n },\n \"store\": {\n \"type\": \"ram\",\n \"url\": \"redis://localhost:6379/0\",\n \"key_prefix\": \"mirage:\",\n \"root\": \"~/.mirage/state\",\n \"namespace\": {\n \"type\": \"ram\"\n },\n \"observer\": {\n \"type\": \"ram\"\n },\n \"workspace\": {\n \"type\": \"ram\"\n },\n \"jobs\": {\n \"type\": \"ram\"\n }\n },\n \"env\": {},\n \"secrets\": {}\n },\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"description": "<string>",
"config": {}
}{
"detail": "<unknown>",
"errno": "<string>",
"refusal": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<unknown>",
"errno": "<string>",
"refusal": {}
}{
"detail": "<unknown>",
"errno": "<string>",
"refusal": {}
}Templates
Create a template
Save a template: a whole workspace config, checked as a create checks one, and kept as written. A name already saved is a 409.
Create a template
curl --request POST \
--url http://127.0.0.1:8765/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"config": {
"mounts": {},
"io": {
"buffer_bytes": 65536
},
"command_limits": {},
"max_memory": "<string>",
"max_body_bytes": "<string>",
"max_env": "<string>",
"network": true,
"system_time": "<string>",
"clis": {},
"runtimes": [
"<string>"
],
"route_policy": {
"script": {
"source": "<string>",
"language": "python",
"module": false
},
"runtime": "monty",
"env": {}
},
"profiles": {},
"profile": "<string>",
"processes": {
"list": "session",
"kill": "session",
"max": 128
},
"mode": "write",
"default_session_id": "<string>",
"workspace_id": "<string>",
"cache": {
"type": "ram",
"limit": "32MB",
"max_drain_bytes": 123
},
"index": {
"type": "ram",
"ttl": 600
},
"store": {
"type": "ram",
"url": "redis://localhost:6379/0",
"key_prefix": "mirage:",
"root": "~/.mirage/state",
"namespace": {
"type": "ram"
},
"observer": {
"type": "ram"
},
"workspace": {
"type": "ram"
},
"jobs": {
"type": "ram"
}
},
"env": {},
"secrets": {}
},
"description": "<string>"
}
'import requests
url = "http://127.0.0.1:8765/v1/templates"
payload = {
"name": "<string>",
"config": {
"mounts": {},
"io": { "buffer_bytes": 65536 },
"command_limits": {},
"max_memory": "<string>",
"max_body_bytes": "<string>",
"max_env": "<string>",
"network": True,
"system_time": "<string>",
"clis": {},
"runtimes": ["<string>"],
"route_policy": {
"script": {
"source": "<string>",
"language": "python",
"module": False
},
"runtime": "monty",
"env": {}
},
"profiles": {},
"profile": "<string>",
"processes": {
"list": "session",
"kill": "session",
"max": 128
},
"mode": "write",
"default_session_id": "<string>",
"workspace_id": "<string>",
"cache": {
"type": "ram",
"limit": "32MB",
"max_drain_bytes": 123
},
"index": {
"type": "ram",
"ttl": 600
},
"store": {
"type": "ram",
"url": "redis://localhost:6379/0",
"key_prefix": "mirage:",
"root": "~/.mirage/state",
"namespace": { "type": "ram" },
"observer": { "type": "ram" },
"workspace": { "type": "ram" },
"jobs": { "type": "ram" }
},
"env": {},
"secrets": {}
},
"description": "<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({
name: '<string>',
config: {
mounts: {},
io: {buffer_bytes: 65536},
command_limits: {},
max_memory: '<string>',
max_body_bytes: '<string>',
max_env: '<string>',
network: true,
system_time: '<string>',
clis: {},
runtimes: ['<string>'],
route_policy: {
script: {source: '<string>', language: 'python', module: false},
runtime: 'monty',
env: {}
},
profiles: {},
profile: '<string>',
processes: {list: 'session', kill: 'session', max: 128},
mode: 'write',
default_session_id: '<string>',
workspace_id: '<string>',
cache: {type: 'ram', limit: '32MB', max_drain_bytes: 123},
index: {type: 'ram', ttl: 600},
store: {
type: 'ram',
url: 'redis://localhost:6379/0',
key_prefix: 'mirage:',
root: '~/.mirage/state',
namespace: {type: 'ram'},
observer: {type: 'ram'},
workspace: {type: 'ram'},
jobs: {type: 'ram'}
},
env: {},
secrets: {}
},
description: '<string>'
})
};
fetch('http://127.0.0.1:8765/v1/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8765",
CURLOPT_URL => "http://127.0.0.1:8765/v1/templates",
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([
'name' => '<string>',
'config' => [
'mounts' => [
],
'io' => [
'buffer_bytes' => 65536
],
'command_limits' => [
],
'max_memory' => '<string>',
'max_body_bytes' => '<string>',
'max_env' => '<string>',
'network' => true,
'system_time' => '<string>',
'clis' => [
],
'runtimes' => [
'<string>'
],
'route_policy' => [
'script' => [
'source' => '<string>',
'language' => 'python',
'module' => false
],
'runtime' => 'monty',
'env' => [
]
],
'profiles' => [
],
'profile' => '<string>',
'processes' => [
'list' => 'session',
'kill' => 'session',
'max' => 128
],
'mode' => 'write',
'default_session_id' => '<string>',
'workspace_id' => '<string>',
'cache' => [
'type' => 'ram',
'limit' => '32MB',
'max_drain_bytes' => 123
],
'index' => [
'type' => 'ram',
'ttl' => 600
],
'store' => [
'type' => 'ram',
'url' => 'redis://localhost:6379/0',
'key_prefix' => 'mirage:',
'root' => '~/.mirage/state',
'namespace' => [
'type' => 'ram'
],
'observer' => [
'type' => 'ram'
],
'workspace' => [
'type' => 'ram'
],
'jobs' => [
'type' => 'ram'
]
],
'env' => [
],
'secrets' => [
]
],
'description' => '<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 := "http://127.0.0.1:8765/v1/templates"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"config\": {\n \"mounts\": {},\n \"io\": {\n \"buffer_bytes\": 65536\n },\n \"command_limits\": {},\n \"max_memory\": \"<string>\",\n \"max_body_bytes\": \"<string>\",\n \"max_env\": \"<string>\",\n \"network\": true,\n \"system_time\": \"<string>\",\n \"clis\": {},\n \"runtimes\": [\n \"<string>\"\n ],\n \"route_policy\": {\n \"script\": {\n \"source\": \"<string>\",\n \"language\": \"python\",\n \"module\": false\n },\n \"runtime\": \"monty\",\n \"env\": {}\n },\n \"profiles\": {},\n \"profile\": \"<string>\",\n \"processes\": {\n \"list\": \"session\",\n \"kill\": \"session\",\n \"max\": 128\n },\n \"mode\": \"write\",\n \"default_session_id\": \"<string>\",\n \"workspace_id\": \"<string>\",\n \"cache\": {\n \"type\": \"ram\",\n \"limit\": \"32MB\",\n \"max_drain_bytes\": 123\n },\n \"index\": {\n \"type\": \"ram\",\n \"ttl\": 600\n },\n \"store\": {\n \"type\": \"ram\",\n \"url\": \"redis://localhost:6379/0\",\n \"key_prefix\": \"mirage:\",\n \"root\": \"~/.mirage/state\",\n \"namespace\": {\n \"type\": \"ram\"\n },\n \"observer\": {\n \"type\": \"ram\"\n },\n \"workspace\": {\n \"type\": \"ram\"\n },\n \"jobs\": {\n \"type\": \"ram\"\n }\n },\n \"env\": {},\n \"secrets\": {}\n },\n \"description\": \"<string>\"\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("http://127.0.0.1:8765/v1/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"config\": {\n \"mounts\": {},\n \"io\": {\n \"buffer_bytes\": 65536\n },\n \"command_limits\": {},\n \"max_memory\": \"<string>\",\n \"max_body_bytes\": \"<string>\",\n \"max_env\": \"<string>\",\n \"network\": true,\n \"system_time\": \"<string>\",\n \"clis\": {},\n \"runtimes\": [\n \"<string>\"\n ],\n \"route_policy\": {\n \"script\": {\n \"source\": \"<string>\",\n \"language\": \"python\",\n \"module\": false\n },\n \"runtime\": \"monty\",\n \"env\": {}\n },\n \"profiles\": {},\n \"profile\": \"<string>\",\n \"processes\": {\n \"list\": \"session\",\n \"kill\": \"session\",\n \"max\": 128\n },\n \"mode\": \"write\",\n \"default_session_id\": \"<string>\",\n \"workspace_id\": \"<string>\",\n \"cache\": {\n \"type\": \"ram\",\n \"limit\": \"32MB\",\n \"max_drain_bytes\": 123\n },\n \"index\": {\n \"type\": \"ram\",\n \"ttl\": 600\n },\n \"store\": {\n \"type\": \"ram\",\n \"url\": \"redis://localhost:6379/0\",\n \"key_prefix\": \"mirage:\",\n \"root\": \"~/.mirage/state\",\n \"namespace\": {\n \"type\": \"ram\"\n },\n \"observer\": {\n \"type\": \"ram\"\n },\n \"workspace\": {\n \"type\": \"ram\"\n },\n \"jobs\": {\n \"type\": \"ram\"\n }\n },\n \"env\": {},\n \"secrets\": {}\n },\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8765/v1/templates")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"config\": {\n \"mounts\": {},\n \"io\": {\n \"buffer_bytes\": 65536\n },\n \"command_limits\": {},\n \"max_memory\": \"<string>\",\n \"max_body_bytes\": \"<string>\",\n \"max_env\": \"<string>\",\n \"network\": true,\n \"system_time\": \"<string>\",\n \"clis\": {},\n \"runtimes\": [\n \"<string>\"\n ],\n \"route_policy\": {\n \"script\": {\n \"source\": \"<string>\",\n \"language\": \"python\",\n \"module\": false\n },\n \"runtime\": \"monty\",\n \"env\": {}\n },\n \"profiles\": {},\n \"profile\": \"<string>\",\n \"processes\": {\n \"list\": \"session\",\n \"kill\": \"session\",\n \"max\": 128\n },\n \"mode\": \"write\",\n \"default_session_id\": \"<string>\",\n \"workspace_id\": \"<string>\",\n \"cache\": {\n \"type\": \"ram\",\n \"limit\": \"32MB\",\n \"max_drain_bytes\": 123\n },\n \"index\": {\n \"type\": \"ram\",\n \"ttl\": 600\n },\n \"store\": {\n \"type\": \"ram\",\n \"url\": \"redis://localhost:6379/0\",\n \"key_prefix\": \"mirage:\",\n \"root\": \"~/.mirage/state\",\n \"namespace\": {\n \"type\": \"ram\"\n },\n \"observer\": {\n \"type\": \"ram\"\n },\n \"workspace\": {\n \"type\": \"ram\"\n },\n \"jobs\": {\n \"type\": \"ram\"\n }\n },\n \"env\": {},\n \"secrets\": {}\n },\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"description": "<string>",
"config": {}
}{
"detail": "<unknown>",
"errno": "<string>",
"refusal": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<unknown>",
"errno": "<string>",
"refusal": {}
}{
"detail": "<unknown>",
"errno": "<string>",
"refusal": {}
}Authorizations
The server's token (MIRAGE_AUTH_TOKEN) or a JWT. A daemon in the default local mode with no token accepts requests without one.
Body
application/json