curl --request POST \
--url https://api.cool.computer/api/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-tar' \
--data '"<string>"'import requests
url = "https://api.cool.computer/api/publish"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-tar"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/x-tar'},
body: JSON.stringify('<string>')
};
fetch('https://api.cool.computer/api/publish', 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.cool.computer/api/publish",
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('<string>'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-tar"
],
]);
$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.cool.computer/api/publish"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-tar")
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.cool.computer/api/publish")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-tar")
.body("\"<string>\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cool.computer/api/publish")
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/x-tar'
request.body = "\"<string>\""
response = http.request(request)
puts response.read_body{
"computer": {
"id": "<string>",
"hostname": "<string>",
"slug": "<string>",
"ip": "<string>",
"status": "<string>",
"visibility": "private",
"access": "owner",
"site": true,
"network_policy": {
"mode": "open",
"allowed_hosts": [
"api.example.com"
]
},
"created_at": "2023-11-07T05:31:56Z",
"public_url": "<string>",
"email_address": "jsmith@example.com",
"auto_delete_at": "2023-11-07T05:31:56Z",
"creation_mode": "<string>"
},
"release": {
"number": 2,
"state": "uploading",
"live": true,
"files": 1,
"bytes": 1,
"created_at": "2023-11-07T05:31:56Z",
"ready_at": "2023-11-07T05:31:56Z"
},
"url": "<string>",
"vm": true,
"next": {
"action": "upload",
"upload": {
"method": "PUT",
"href": "<string>"
},
"finalize": {
"method": "PUT",
"href": "<string>"
}
},
"release_url": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}Publish files in one request
curl --request POST \
--url https://api.cool.computer/api/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-tar' \
--data '"<string>"'import requests
url = "https://api.cool.computer/api/publish"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-tar"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/x-tar'},
body: JSON.stringify('<string>')
};
fetch('https://api.cool.computer/api/publish', 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.cool.computer/api/publish",
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('<string>'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-tar"
],
]);
$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.cool.computer/api/publish"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-tar")
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.cool.computer/api/publish")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-tar")
.body("\"<string>\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cool.computer/api/publish")
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/x-tar'
request.body = "\"<string>\""
response = http.request(request)
puts response.read_body{
"computer": {
"id": "<string>",
"hostname": "<string>",
"slug": "<string>",
"ip": "<string>",
"status": "<string>",
"visibility": "private",
"access": "owner",
"site": true,
"network_policy": {
"mode": "open",
"allowed_hosts": [
"api.example.com"
]
},
"created_at": "2023-11-07T05:31:56Z",
"public_url": "<string>",
"email_address": "jsmith@example.com",
"auto_delete_at": "2023-11-07T05:31:56Z",
"creation_mode": "<string>"
},
"release": {
"number": 2,
"state": "uploading",
"live": true,
"files": 1,
"bytes": 1,
"created_at": "2023-11-07T05:31:56Z",
"ready_at": "2023-11-07T05:31:56Z"
},
"url": "<string>",
"vm": true,
"next": {
"action": "upload",
"upload": {
"method": "PUT",
"href": "<string>"
},
"finalize": {
"method": "PUT",
"href": "<string>"
}
},
"release_url": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}Authorizations
A Cool Computers API key, user access token, or claimed agent access token in the Authorization header. Follow https://www.cool.computer/auth.md for agent registration and https://www.cool.computer/authentication.md for direct user credentials.
Headers
A caller-generated key for safely retrying this side effect. The server retains the key and response for 24 hours. Reusing it with the same request replays the original response; reusing it with different input returns 409.
1 - 128^[!-~]+$"req_01J6M6Y9TF9Q9QF6M1ZP8K4R2A"
Query Parameters
Existing computer ID or slug to publish to. Omit it to create a computer. Without an account, only the unclaimed computer the Claim key belongs to.
1Slug for a created computer. Unless the release declares run, it must leave room for release hostnames up to r9999--, so 56 characters at most; slug_too_long_for_releases otherwise.
^[a-z0-9]{1,63}$Body
The body is of type file.
Response
The computer and the receipt of its new live release. A publish without an account answers AnonymousPublishResult.
- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The computer's URL, which serves the live release.
Whether the computer's VM serves its URL, because a server on it answered.
What to do next: upload the missing hashes, finalize, or nothing (done).
Show child attributes
Show child attributes
This release's own hostname r--. Absent once the computer's VM serves its URL.

