Who Am I?
- reference
An Operational Insights user can check their id (or username), domain, roles, and other details.
Description
The call returns an object that contains the following:
-
roles. An object containing a key-value pair for every role assigned to the user. For example,"role": "analytics_reader". -
id. The user’s id (or username). -
domain. The user’s authentication domain, which can belocalorexternal. For information, see Authentication. -
name. The user’s full name, if specified. -
password_change_date. The date on which the user’s password was last changed. For example,"2020-02-13T04:08:31.000Z".
Responses
If successful, the call returns 200 OK, and an object that contains information about the user’s id, domain, name, roles, and date of last password-change.
A malformed URI returns 404 Object Not Found. Failure to authenticate returns 401 Unauthorized.
Example
The following call returns information about a user whose id is multiRoleAdmin.
Note that the output is piped to the jq command, to facilitate output-readability.
curl -X GET -u multiRoleAdmin:multiRoleAdminPassword \ http://10.143.194.101:8091/whoami | jq
If successful, the command returns output such as the following:
{
"roles": [
{
"role": "analytics_reader"
},
{
"role": "analytics_access"
},
{
"role": "security_admin"
}
],
"id": "multiRoleAdmin",
"domain": "local",
"name": "John Smith",
"password_change_date": "2020-02-13T04:08:31.000Z"
}
See Also
An overview of Operational Insights authentication, and of authentication domains, is provided in Authentication.