Generated from Postwind commit a19b2e4 OpenAPI 0.1.0 synced

Server HTTP API

GET/api/v1/whoami

whoami

Tells which API key this connection uses.

Call it
first, to learn whether the key is an admin key or a project key, which project it works in and what it may do.
Needs
any valid key, nothing else.
Returns
key_id, name, kind (admin or project), project_id (null for an admin key), scopes and expires_at (null: never); the same as GET /api/v1/whoami.

Arguments

No arguments.

No other arguments are accepted.

Result

The result comes back as structuredContent, with the same JSON as a text block.

  • object · all fields required
  • expires_atstring · date-time | null

    When the key stops working; null: never.

  • key_idstring · uuid

    The key’s id: what revoking it takes.

  • The kind of an API key.

    admin Everything, projects and admin keys included.

    project One project, within its scopes.

  • namestring

    The name its owner gave it.

  • project_idstring · uuid | null

    The key’s project; null for an admin key.

  • scopesarray of KeyScope

    What the key may do. An admin key has every scope, and may manage projects and admin keys besides.

Definitions

KeyKind

The kind of an API key.

string · enum

admin Everything, projects and admin keys included.

project One project, within its scopes.

KeyScope

A right of a project key. An admin key has all of them.

string · enum

  • read
  • write
  • send
  • keys

Errors

A failed call answers isError: true with a code from the same table as the HTTP API, and detail. How tools report errors

HTTP API

The same operation over HTTP: GET /api/v1/whoami