GET /userservice/api/users

Deprecated as of version 2021 Winter. Please use the user-controller of the Tenant Management API instead.

As of Version

product version 2021 Summer | component version 

Request MethodGET
Response FormatJSON
Description

Retrieve information on all users, optionally filtered by a search query defined in the request URL.

Add the query parameter search=<any string> with a string value to the request URL to get only users for which the specified string is contained in user name, first name, last name or email.

Add the query parameter size=<N> with any integer value N to the request URL to divide the hit list into sections. Each of them contains N users. Only one section is returned in the response body.

Add the query parameter page=<n> with any integer value n to the request URL to retrieve the hit list section of index n.

Add the query parameter sort with value asc (desc) to sort the hit list in ascending (descending) order.

Response HTTP status codes:

HTTP Status CodeDescription
200OK
401Unauthorized
Request Example

https://<host>/userservice/api/users?page=1&search=mueller&size=2&sort=desc

Response Example

200 OK

response body
{
  "objects": [
    {
      "id": "12345678-abcd-ef90-b620-0e92d5b7140c",
      "foreignId": null,
      "username": "hans",
      "firstname": "Hans",
      "lastname": "Mueller",
      "email": "mueller@example.de",
      "authorities": null,
      "tenant": "mytenant",
      "enabled": true,
      "accountNonExpired": true,
      "accountNonLocked": true,
      "credentialsNonExpired": true
    },
    {
      "id": "12345678-abcd-ef90-b620-0e92d5b72222",
      "foreignId": null,
      "username": "am",
      "firstname": "Annemarie",
      "lastname": "Mustermann",
      "email": "annemarie.mustermann@mueller-cars.com",
      "authorities": null,
      "tenant": "mytenant",
      "enabled": true,
      "accountNonExpired": true,
      "accountNonLocked": true,
      "credentialsNonExpired": true
    }
  ],
  "numItems": 2,
  "totalNumItems": 4,
  "hasMoreItems": false
}