Skip to main content
POST
Publish files in one request

Authorizations

Authorization
string
header
required

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

Idempotency-Key
string

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, except after a failure that proves nothing happened: that is kept for one minute, and one that sets Retry-After is not kept, so a retry after it runs the request again; reusing it with different input returns 409.

Required string length: 1 - 128
Pattern: ^[!-~]+$
Example:

"req_01J6M6Y9TF9Q9QF6M1ZP8K4R2A"

Query Parameters

computer
string

Existing computer ID or name to publish to. Omit it to create a computer. Without an account, only the unclaimed computer the Claim key belongs to.

Minimum string length: 1
name
string

Name for a created computer, such as agent-atlas. Unless the release declares run, it is at most 56 characters, leaving room for release hostnames up to r9999-- in one DNS label; slug_too_long_for_releases otherwise. A computer name, its address .cool.computer: lowercase letters and digits in words joined by single hyphens. The service names in not.enum are reserved.

Maximum string length: 63
Pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
visibility
enum<string>

Visibility of a created computer: private serves it only to the account and the people it is shared with; public is the default. Only without computer (visibility_on_existing_computer otherwise), and only with an account (sign_in_required_for_private otherwise).

Available options:
public,
private

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.

computer
object
required
release
object
required
url
string<uri>
required

The computer's URL, which serves the live release.

vm
boolean
required

Whether the computer's VM serves its URL, because a server on it answered.

next
object
required

What to do next: upload the missing hashes, finalize, or nothing (done).

release_url
string<uri>

This release's own hostname r--. Absent once the computer's VM serves its URL.