GET /api-web/api/idm/whoami

As of Version

product version 2023 Spring

Request MethodGET
Response FormatJSON
Description

This request retrieves the user information of the current logged in user.

Per default, whoami requests the yuuvis® user-service which in turn requests the identity provider service (IPS) Keycloak. Beginning with version 2021 Autumn: If you need to request a different IPS, you can build a custom microservice that answers in the same way, and configure its endpoint in the application.yml file, or better in the api-web-prod.yml file as shown below.

Note: Keep in mind that a session cookie is created that may have to be ignored by your custom microservice.

whoami:
  endpoint: http://whoamitest

Response HTTP status codes:

HTTP Status CodeMeaning
200 OKSuccessful.
401 UnauthorizedNot successful.
Request Example

https://<host>/api-web/api/idm/whoami

no request body

Response Example

200 OK

{
  "username": "string",
  "id": "string",
  "foreignid": "string",
  "type": "string",
  "title": "string",
  "email": "string",
  "firstname": "string",
  "lastname": "string",
  "domain": "string",
  "tenant": "string",
  "authorities": [
    "string"
  ],
  "substituteOf": [
    "string"
  ],
  "accountNonExpired": true,
  "accountNonLocked": true,
  "credentialsNonExpired": true,
  "enabled": true,
  "displayName": "string"
}