Get a user profile
Added in 8.2.0
Get a user's profile using the unique profile ID.
NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. Elastic reserves the right to change or remove this feature in future releases without prior notice.
Path parameters
-
uid
string | array[string] Required A unique identifier for the user profile.
Query parameters
-
data
string | array[string] A comma-separated list of filters for the
data
field of the profile document. To return all content usedata=*
. To return a subset of content usedata=<key>
to retrieve content nested under the specified<key>
. By default returns nodata
content.
curl \
--request GET 'http://api.example.com/_security/profile/{uid}' \
--header "Authorization: $API_KEY"
{
"profiles": [
{
"uid": "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0",
"enabled": true,
"last_synchronized": 1642650651037,
"user": {
"username": "jacknich",
"roles": [
"admin", "other_role1"
],
"realm_name": "native",
"full_name": "Jack Nicholson",
"email": "jacknich@example.com"
},
"labels": {
"direction": "north"
},
"data": {},
"_doc": {
"_primary_term": 88,
"_seq_no": 66
}
}
]
}
{
"profiles": [
{
"uid": "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0",
"enabled": true,
"last_synchronized": 1642650651037,
"user": {
"username": "jacknich",
"roles": [
"admin", "other_role1"
],
"realm_name": "native",
"full_name": "Jack Nicholson",
"email": "jacknich@example.com"
},
"labels": {
"direction": "north"
},
"data": {
"app1": {
"key1": "value1"
}
},
"_doc": {
"_primary_term": 88,
"_seq_no": 66
}
}
]
}
{
"profiles": [],
"errors": {
"count": 1,
"details": {
"u_FmxQt3gr1BBH5wpnz9HkouPj3Q710XkOgg1PWkwLPBW_5": {
"type": "resource_not_found_exception",
"reason": "profile document not found"
}
}
}
}