Retrieve Information About the Current User

get

/api/v2/me/

Make a GET request to retrieve user information about the current user.

One result should be returned containing the following fields:

  • id: Database ID for this user. (integer)
  • type: Data type for this user. (choice)
  • url: URL for this user. (string)
  • related: Data structure with URLs of related resources. (object)
  • summary_fields: Data structure with name/description for related resources. The output for some objects may be limited for performance reasons. (object)
  • created: Timestamp when this user was created. (datetime)
  • username: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (string)
  • first_name: (string)
  • last_name: (string)
  • email: (string)
  • is_superuser: Designates that this user has all permissions without explicitly assigning them. (boolean)
  • is_system_auditor: (boolean)

  • ldap_dn: (string)

  • last_login: (datetime)
  • external_account: Set if the account is managed by an external service (field)

Use the primary URL for the user (/api/v2/users/N/) to modify the user.

Request

Supported Media Types
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

Body
Example Response (application/json)
{
    "count":1,
    "next":null,
    "previous":null,
    "results":[
        {
            "auth":[
            ],
            "created":"2018-02-01T08:00:00.000000Z",
            "email":"",
            "external_account":"enterprise",
            "first_name":"",
            "id":1,
            "is_superuser":true,
            "is_system_auditor":false,
            "last_login":null,
            "last_name":"",
            "ldap_dn":"",
            "related":{
                "access_list":"/api/v2/users/1/access_list/",
                "activity_stream":"/api/v2/users/1/activity_stream/",
                "admin_of_organizations":"/api/v2/users/1/admin_of_organizations/",
                "authorized_tokens":"/api/v2/users/1/authorized_tokens/",
                "credentials":"/api/v2/users/1/credentials/",
                "organizations":"/api/v2/users/1/organizations/",
                "personal_tokens":"/api/v2/users/1/personal_tokens/",
                "projects":"/api/v2/users/1/projects/",
                "roles":"/api/v2/users/1/roles/",
                "teams":"/api/v2/users/1/teams/",
                "tokens":"/api/v2/users/1/tokens/"
            },
            "summary_fields":{
                "user_capabilities":{
                    "delete":false,
                    "edit":false
                }
            },
            "type":"user",
            "url":"/api/v2/users/1/",
            "username":"admin"
        }
    ]
}
Back to Top