/auth/v1/users/<user ID>: GET

Gets the details of a specific user.

The following table shows which roles can access this REST API endpoint:
Table 1. Access by role
Data admin Data user Collection Admin Admin Service user
1 1 1
1The specified user ID must be the same as the requesting user ID. Otherwise the command fails with error 403, "Not authorized". An exception is if the user ID is "me", the result is the details of the current user.

Synopsis of the request URL

curl -k -H ‘Authorization: Bearer <token>’ https://<spectrum_discover_host>/auth/v1/users/<user_ID>

Supported request types and response formats

Supported request types:
  • GET
Supported response formats:
  • JSON

Examples

The following example shows how to get the details of a specific user.

Request:
curl -k -H ‘Authorization: Bearer <token>’ https://<spectrum_discover_host>/auth/v1/users/4ee5b47f439640d29b6fac7253a64290

Response:

200 OK: 
{ 
    "domain_id": "default", 
    "email": "testuser@ibm.com", 
    "enabled": true, 
    "id": "5b3cd6af1c38479aa3a8cb220230c651", 
    "name": "testuser", 
    "options": {}, 
    "password_expires_at": null 
} 

The following special case returns the current user's details.

Request:
curl -k -H ‘Authorization: Bearer <token>’ https://<spectrum_discover_host>/auth/v1/users/me