Query for a list of users using a list of parameters.The size of the result set can be retrieved by using the Get User Count method.

Method

GET /user

Parameters

Query Parameters

Name Description
id Filter by the id of the user.
firstName Filter by the firstname of the user.
firstNameLike Filter by the firstname that the parameter is a substring of.
lastName Filter by the lastname of the user.
lastNameLike Filter by the lastname that the parameter is a substring of.
email Filter by the email of the user.
emailLike Filter by the email that the parameter is a substring of.
memberOfGroup Filter for users which are members of a group.
memberOfTenant Filter for users which are members of the given tenant.
sortBy Sort the results lexicographically by a given criterion. Valid values are userId, firstName, lastName and email. Must be used in conjunction with the sortOrder parameter.
sortOrder Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.
firstResult Pagination of results. Specifies the index of the first result to return.
maxResults Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.

Result

A JSON array of user objects.Each user object has the following properties:

Name Value Description
id String The id of the user.
firstName String The firstname of the user.
lastName String The lastname of the user.
email String The email of the user.

Response Codes

Code Media type Description
200 application/json Request successful.
400 application/json Returned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy is specified. See the Introduction for the error response format.

Example

Request

GET /user?firstName=John

Response

Status 200.

  1. [{"id":"jonny1",
  2. "firstName":"John",
  3. "lastName":"Doe",
  4. "email":"anEmailAddress"},
  5. {"id":"jonny2",
  6. "firstName":"John",
  7. "lastName":"Smoe",
  8. "email":"anEmailAddress"}]

原文: https://docs.camunda.org/manual/7.9/reference/rest/user/get-query/