Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

Resolve the caller identity

GET/v1/whoami
API playground

Disclaimer: This beta endpoint is evolving; the API contract may change.

Returns the identity of the authenticated caller. For a user (JWT or clickhousectl token) the result carries the user fields; for an organization API key it carries the key fields instead. Use actorType to tell the two apart.

Authorizations

Response

JSON

200

Successful response

JSON
  • statusoptionalnumber

    HTTP status code.

    Example: 200
  • requestIdoptionalstring

    Unique id assigned to every request. UUIDv4

    format: uuid
  • resultoptionalWhoamiUserorWhoamiApiKey
    2 variants

    One of the following:

    • WhoamiUser
      5 properties
      • actorTypestringrequired

        Discriminator identifying the caller as a user (JWT or clickhousectl token).

      • userIdstringrequired

        Unique ID of the user.

        format: uuid
      • emailstringrequired

        Email address of the user.

        format: email
      • namestringrequired

        Full name of the user.

      • organizationsarray ofobjectrequired

        Organizations the user belongs to.

        2 properties
        • organizationIdstringrequired

          ID of the organization the user belongs to.

          format: uuid
        • organizationNamestringrequired

          Name of the organization.

    • 4 properties
      • actorTypestringrequired

        Discriminator identifying the caller as an organization API key.

      • keyIdstringrequired

        Unique ID of the API key.

      • namestringrequired

        Name of the API key.

      • organizationIdstringrequired

        ID of the organization that owns the API key.

        format: uuid