Public URLs

Point a public URL at another port

Change the port the URL serves, who may open it, or both. The label is the URL and does not change. The body is at most 4096 bytes (413). The errors this route adds are { error, code }, except that a body that is not JSON or not a JSON object, the 413, and a computer or URL that is not found carry error alone:

  • 400 INVALID_BODY: the body names neither port nor access, or has a field other than port and access (named in the error, and nothing changes).
  • 400 INVALID_PORT or INVALID_ACCESS: as on create.
  • 404 PUBLIC_URLS_DISABLED: public URLs are not enabled here.
  • 409 WORKSPACE_MOVING: a change of this computer’s workspace is unsettled, with reason as on create.

Requires the member role or higher.

patch/computers/{id}/public-urls/{urlId}

Request

  • Base URL: https://app.mandala.computer/api/v1
  • URL: https://app.mandala.computer/api/v1/computers/{id}/public-urls/{urlId}
  • Auth: HTTP bearer

Path parameters

idstring required

The computer id.

urlIdstring required

A public URL id from GET /computers/{id}/public-urls (pu- followed by 16 hex characters).

Request body

portinteger

The port inside the computer to serve, 1 to 65535 except 22.

access'public' | 'private'

public or private.

Response

The URL as stored.

idstring required

pu- and sixteen hex characters.

urlstring required

The address to open: https://<label>.<base_domain>, on port 443, with no port in it.

hostnamestring required

<label>.<base_domain>.

labelstring required

The name before the domain: 3 to 40 lowercase letters, digits and hyphens, a letter or digit at each end.

portinteger required

The port inside the computer this URL serves. The app must listen on 0.0.0.0, not 127.0.0.1.

access'public' | 'private' required

public: anyone with the link. private: only a request carrying an API key of this account as Authorization: Bearer (a key confined to a workspace, only for that workspace’s computers), or a browser signed in to this URL through the dashboard’s Open; neither credential reaches the app. See POST /computers/{id}/public-urls.

disabledboolean required

true when the platform has turned this URL off, by its name, its computer or its account; it answers 404 until the platform turns it back on. Deleting it and making it again does not.

created_atstring required

RFC 3339 timestamp.

updated_atstring required

RFC 3339 timestamp of the last change to its port or access.

Changes

No recorded changes to this operation across all 1 revision of this API.