WhoAmI

WhoAmI provides information about the client making an API request.

It can be used to help troubleshoot configuration by verifying authentication and the client IP address for audit and network access restrictions. For more information, see Host Attributes.

URI

 
GET /whoami

Example with curl

 
$ curl -H "$(conjur authn authenticate -H)" https://eval.conjur.org/whoami

Curl output:

 
{"client_ip":"12.16.23.10","user_agent":"curl/7.64.1","account":"demo","username":"admin","token_issued_at":"2020-09-14T19:50:42.000+00:00"}

Headers

Field

Description

Example

Authorization

Conjur access token

Token token=“eyJkYX…Rhb=”

Response

Code

Description

200

The response body is the information about the client making the API request.

401

Invalid token or no token provided.

Response 200

The endpoint returns the following JSON structure:

Headers

 
Content-Type: application/json

Body

 
{
    "client_ip": "192.168.192.1",
    "user_agent": "PostmanRuntime/7.26.1",
    "account": "myorg",
    "username": "admin",
    "token_issued_at": "2020-07-17T21:11:56.000+00:00"
}

 

Field

Description

client_ip The request client IP address as determined by Conjur. This same IP address appears in application logs and audit logs.
user_agent The incoming request HTTP user agent header.
account The account attribute of the client provided access token.
username The username attribute of the provided access token.
token_issued_at The issued timestamp, that is, when the provided access token was created (iat field in the JWT).