Get User List

get

/user

Retrieves a list of users.

Request

There are no request parameters for this operation.

Back to Top

Response

200 Response

The list of users was retrieved successfully.
Back to Top

Examples

The following example shows how to retrieve details of all users by submitting a GET request on the REST resource using cURL. For more information about cURL, see "Use cURL".

curl -X GET "hostname:port/user" -H "accept: */*"

Example of Response Body

If successful, the response code 200 is returned with a response body. For example:

{
  "total": 5,
  "limit": 10,
  "offset": 0,
  "page": 1,
  "pages": 1,
  "docs": [
    {
      "_id": 1,
      "email": "example@oracle.com",
      "isAdmin": 1,
      "lastName": "admin",
      "username": "admin",
      "firstName": "admin",
      "middleName": "admin",
      "profilePic": null,
      "displayName": "Admin"
    },
    {
      "_id": 2,
      "email": "example@oracle.com",
      "isAdmin": 1,
      "lastName": "tesuser",
      "username": "tesuser",
      "firstName": "tesuser",
      "middleName": "tesuser",
      "profilePic": null,
      "displayName": "TES User"
    },
    {
      "_id": 3,
      "email": "example@oracle.com",
      "isAdmin": 0,
      "lastName": "Wayne",
      "username": "example@oracle.com",
      "firstName": "John",
      "middleName": "middle-nameno",
      "profilePic": "",
      "displayName": "jwayne"
    },
    {
      "_id": 6,
      "email": "example@oracle.com",
      "isAdmin": 0,
      "lastName": "Smith",
      "username": "example@oracle.com",
      "firstName": "Mary",
      "middleName": "middle-name",
      "profilePic": "",
      "displayName": "Mary"
    },
    {
      "_id": 7,
      "email": "email@example.com",
      "isAdmin": 0,
      "lastName": "Sharma",
      "username": "email@example.com",
      "firstName": "Amit",
      "middleName": "middle-name",
      "profilePic": "",
      "displayName": "Adarsh Sharma"
    }
  ]
}

If the request fails, the response includes the appropriate HTTP code. For a 4xx/5xx code, the message body also contains a ProblemDetails structure with the cause attribute set to the appropriate application error.

Back to Top