Retrieve a User
get
/api/v2/users/{id}/
Make GET request to this resource to retrieve a single user record 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)modified
: Timestamp when this user was last modified. (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)
Request
Supported Media Types
- application/json
Path Parameters
Query Parameters
-
search: string
A search term.
Response
Supported Media Types
- application/json
200 Response
Example Response (application/json)
{
"auth":[
],
"created":"2018-02-01T08:00:00.000000Z",
"email":"",
"external_account":null,
"first_name":"",
"id":"1",
"is_superuser":true,
"is_system_auditor":false,
"last_login":null,
"last_name":"",
"ldap_dn":"",
"modified":null,
"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":true
}
},
"type":"user",
"url":"/api/v2/users/1/",
"username":"admin"
}