GET /api-web/api/users/whoami

Deprecated as of version 2023 Spring. Please use the idm-controller endpoints instead.

As of Version

product version 2021 Summer | component version 

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/users/whoami

no request body

Response Example

200 OK

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

product version 2021 Summer | component version 

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/users/whoami

no request body

Response Example

200 OK

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