Sandboxes

Mint a token for a service of a rig on your own host

Changed on

For callers that are not browsers, such as curl or a script: send the token in the returned header as Bearer <token> to the returned url. Only for rigs on the organization's own hosts; never for amikad.

post/api/v0beta1/sandboxes/{id}/services/{ref}/tokens

Request

  • Base URL
    https://app.amika.dev (the document declares no server; this is the origin it was published from)
  • URL
    https://app.amika.dev/api/v0beta1/sandboxes/{id}/services/{ref}/tokens
  • Auth
    • HTTP bearer
    • or API key in cookie wos-session

Path parameters

idstring required
refstring required

Service reference: its name (default) or row id. Use by to choose.

Query parameters

sandbox_by'name' | 'id' | 'ref' | 'name_or_id'

How to interpret the sandbox {id} path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match with 409 resource_ref_ambiguous), name, or id.

by'name' | 'id' | 'ref' | 'name_or_id'

How to interpret the service {ref}: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).

ttl_secondsinteger

How long the token lives, in seconds: 1 to 86400. Defaults to an hour.

Response

Token minted.

urlstring required

The service's address on the rig's host, ending in /. It carries no credential.

headerstring required

The request header the token goes in, as Bearer <token>.

tokenstring required

Example response

{
  "header": "X-Amika-Authorization"
}

Changes