Hosts

Enrol a tunnel host with its gateway

Changed on

Returns everything amika-hostd needs to dial out: the credential, the generation the gateway fences on, and the gateway address with its path. Only for a host in tunnel mode; a listen host binds a port and is reached at its registered URL, so it is refused with 400. Only a signed-in user can enrol a host; an API key or other service identity is refused with 403. A POST rather than a GET so the credential is never cached or prefetched.

post/api/v0beta1/hosts/{id}/enrolment

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/hosts/{id}/enrolment
  • Auth
    • HTTP bearer
    • or API key in cookie wos-session

Path parameters

idstring required

Response

What the host needs to dial out.

credentialstring required

The host's secret, whole and opaque. Sent as x-amika-host-credential when the host dials the gateway.

generationinteger required

How many times this host's credential has been replaced. The gateway fences a stale connection with it, so a daemon that reconnects sends the generation it enrolled with.

gateway_urlstring required

The WebSocket address to dial, path included.

transport_mode'tunnel' required

Always tunnel. A listen host is refused: it binds a port and is reached at its registered URL.

Changes