Documentation

Me API Endpoint

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

GET /api/v2/me/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
X-API-Node: localhost
X-API-Time: 0.185s


{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 1,
            "type": "user",
            "url": "/api/v2/users/1/",
            "related": {
                "admin_of_organizations": "/api/v2/users/1/admin_of_organizations/",
                "organizations": "/api/v2/users/1/organizations/",
                "roles": "/api/v2/users/1/roles/",
                "access_list": "/api/v2/users/1/access_list/",
                "teams": "/api/v2/users/1/teams/",
                "credentials": "/api/v2/users/1/credentials/",
                "activity_stream": "/api/v2/users/1/activity_stream/",
                "projects": "/api/v2/users/1/projects/"
            },
            "summary_fields": {
                "user_capabilities": {
                    "edit": true,
                    "delete": false
                }
            },
            "created": "2017-09-06T02:55:30.492Z",
            "username": "admin",
            "first_name": "",
            "last_name": "",
            "email": "[email protected]",
            "is_superuser": true,
            "is_system_auditor": false,
            "ldap_dn": "",
            "external_account": null,
            "auth": []
        }
    ]
}

One result should be returned containing the following fields:

  • id: Database ID for this user. (integer)
  • type: Data type for this user. (multiple choice)
  • user: User
  • 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. (object)
  • created: Timestamp when this user was created. (datetime)
  • username: Required. 30 characters or fewer. Letters, numbers and @/./+/-/_ characters (string)
  • first_name: (string)
  • last_name: (string)
  • email: (email)
  • is_superuser: Designates that this user has all permissions without explicitly assigning them. (boolean)
  • is_system_auditor: (boolean)
  • ldap_dn: (string)
  • 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.

Reviewing the Options Endpoint

The Options Endpoint table offers a view of the Options for this endpoint. When viewing the endpoint in the browsable API, clicking the “Options” button gives you the raw JSON for the following:

name Me
description Make a GET request to retrieve user information about the current user.
renders
0 application/json
1 text/html
parses
0 application/json
added_in_version 1.2
actions
GET
id
type integer
label ID
help_text Database ID for this user.
type
type choice
label Type
help_text Data type for this user.
choices
0
0 user
1 User
url
type string
help_text URL for this user.
related
type object
help_text Data structure with URLs of related resources.
summary_fields
type object
label Summary fields
help_text Data structure with name/description for related resources.
created
type datetime
help_text Timestamp when this user was created.
username
type string
label Username
help_text Required. 30 characters or fewer. Letters, numbers and @/./+/-/_ only.
first_name
type string
label First name
last_name
type string
label Last name
email
type string
label Email address
is_superuser
type boolean
label Superuser status
help_text Designates that this user has all permissions without explicitly assigning them.
is_system_auditor
type boolean
label Is system auditor
ldap_dn
type string
label Ldap dn
external_account
type field
label External account
help_text Set if the account is managed by an external service.
types
0 user
search_fields
0 username
1 first_name
2 last_name
3 email