Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Your account

The signed-in user's own account: password, sessions, tokens, appearance.

GET /api/v1/me

The signed-in user's account.

Who may call it: a person signed in with a password.

Answers

PATCH /api/v1/me

Change your own name and email (a directory account's come from the directory).

Who may call it: a person signed in with a password.

Body (application/json): ProfileUpdate

Answers

GET /api/v1/me/activity

What you did yourself (and what your tokens did): the same entries, only yours. Anyone signed in with a username and password.

Who may call it: a person signed in with a password.

Parameters

InType
beforequerynumberEntries older than this id.
limitquerynumberAt most 500 (default 50).

Answers

POST /api/v1/me/password

Change your own password. Your other sessions end. Works while a change is required.

Who may call it: a person signed in with a password.

Body (application/json): PasswordChange

Answers

GET /api/v1/me/sessions

Your signed-in browsers.

Who may call it: a person signed in with a password.

Answers

DELETE /api/v1/me/sessions

Sign out everywhere else: every session of yours but this one ends.

Who may call it: a person signed in with a password.

Answers

DELETE /api/v1/me/sessions/{id}

End one of your sessions.

Who may call it: a person signed in with a password.

Parameters

InType
id (required)pathnumberSession id.

Answers

GET /api/v1/me/settings

Your saved appearance (theme and custom colors), which follows you to any browser.

Who may call it: a person signed in with a password.

Answers

PUT /api/v1/me/settings

Save your appearance.

Who may call it: a person signed in with a password.

Body (application/json): Appearance

Answers

GET /api/v1/me/tokens

Your own tokens (live ones).

Who may call it: a person signed in with a password.

Answers

POST /api/v1/me/tokens

Make a token of your own, for scripts. It acts as you at most: never above your role or permissions, and it stops working if you are disabled. Its secret is in this answer only.

Who may call it: a person signed in with a password.

Body (application/json): NewMyToken

Answers

DELETE /api/v1/me/tokens/{name}

Revoke one of your tokens (the name as listed).

Who may call it: a person signed in with a password.

Parameters

InType
name (required)pathtextToken name.

Answers

Shapes

The JSON bodies the operations above take and return.

Appearance

FieldType
colors (optional)object or nullThe custom colors, as the UI saves them (a JSON object).
saved (optional)true or falseWhether this was saved before: false means the UI may offer the browser's own choice.
themetextsystem, light, dark, contrast or custom.

AuditEntry

FieldType
actiontextmessage.payload.read, message.dismiss, user.create, ...
actortextThe user's or token's name when it happened.
actor_kindtextuser, token, system (the engine, or someone at the server's command line) or anonymous (a sign-in as a name nobody has).
attime (RFC 3339)
detail (optional)object or nullMore about it, by action (never a password, token or payload).
idnumber
interface (optional)text or null
ip (optional)text or nullThe address the request came from (a proxy's, if there is one).
message (optional)number or null
outcometextok, denied or failed.
subject (optional)text or nullWhat it was done to: a username, a token, interface/destination.
via (optional)text or nullsession (the web UI), token, cli or engine; none for entries from before the log.

AuditPage

FieldType
entrieslist of AuditEntryNewest first.
next_before (optional)number or nullPass as before for the next (older) page; absent on the last page.

CreatedToken

FieldType
secrettextThe token itself: shown this once, never stored (only its hash is).
tokenTokenInfo

ErrorBody

FieldType
errortextWhat went wrong, in plain words.

NewMyToken

FieldType
nametextWhat it is for, e.g. deploy-script; it is listed as <you>/<name>.
permissions (optional)list of text or nullDefaults to none; never more than you have.
role (optional)text or nullDefaults to your own role; never above it.

PasswordChange

FieldType
currenttextThe password you have now.
newtext

ProfileUpdate

FieldType
display_name (optional)text or null
email (optional)text or null

SessionInfo

FieldType
created_attime (RFC 3339)
currenttrue or falseThe one making this request.
expires_attime (RFC 3339)
idnumber
last_seen_attime (RFC 3339)

TokenInfo

FieldType
created_attime (RFC 3339)
last_used_at (optional)time (RFC 3339) or nullTo the minute.
nametext
owner (optional)text or nullThe user it belongs to; none for a service token made by an admin.
permissionslist of textpayloads, audit (admins' tokens have all).
roletextviewer, operator or admin.

UserInfo

FieldType
created_attime (RFC 3339)
directory_checked_at (optional)time (RFC 3339) or nullA directory account: when the directory was last asked about them (sign-in or refresh).
directory_refusedtrue or falseA directory account the directory refused at its last check (no group, disabled or gone there): it can't sign in or act until the directory says yes again.
disabledtrue or false
display_nametext
emailtext
idnumber
last_sign_in_at (optional)time (RFC 3339) or null
locked_until (optional)time (RFC 3339) or nullRefused after too many wrong passwords, until then.
made_for_ownertrue or falseA directory account the engine made because an owner text names them, before their first sign-in (directory accounts are otherwise made at one).
must_change_passwordtrue or falseAn admin chose the password; the next sign-in can only change it.
permissionslist of textpayloads, audit (admins have both whatever is listed).
roletextviewer, operator or admin.
sourcetextWhere the password is checked: local, or a directory.
usernametext