GET
/_security/user
Console
GET /_security/user/jacknich?with_profile_uid=true
resp = client.security.get_user(
username="jacknich",
with_profile_uid=True,
)
const response = await client.security.getUser({
username: "jacknich",
with_profile_uid: "true",
});
response = client.security.get_user(
username: "jacknich",
with_profile_uid: "true"
)
$resp = $client->security()->getUser([
"username" => "jacknich",
"with_profile_uid" => "true",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/user/jacknich?with_profile_uid=true"
Response examples (200)
A successful response from `GET /_security/user/jacknich?with_profile_uid=true`. It includes the user `profile_uid` as part of the response.
{
"jacknich": {
"username": "jacknich",
"roles": [
"admin", "other_role1"
],
"full_name": "Jack Nicholson",
"email": "jacknich@example.com",
"metadata": { "intelligence" : 7 },
"enabled": true,
"profile_uid": "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0"
}
}