Find users with a query Added in 8.14.0
Get information for users in a paginated manner. You can optionally filter the results with a query.
Query parameters
-
with_profile_uid boolean
If true will return the User Profile ID for the users in the query result, if any.
Body
-
query object
Additional properties are allowed.
-
from number
Starting document offset. By default, you cannot page through more than 10,000 hits using the from and size parameters. To page through more hits, use the
search_after
parameter. -
size number
The number of hits to return. By default, you cannot page through more than 10,000 hits using the
from
andsize
parameters. To page through more hits, use thesearch_after
parameter. -
search_after array[number | string | boolean | null | object]
A field value.
One of: Additional properties are allowed.
GET /_security/_query/user
curl \
-X GET http://api.example.com/_security/_query/user \
-H "Content-Type: application/json" \
-d '{"query":{"match":{},"prefix":{},"range":{},"term":{},"wildcard":{}},"from":42.0,"":"string","size":42.0,"search_after":[42.0]}'
Request examples
{
"query": {
"match": {},
"prefix": {},
"range": {},
"term": {},
"wildcard": {}
},
"from": 42.0,
"": "string",
"size": 42.0,
"search_after": [
42.0
]
}
Response examples (200)
{
"total": 42.0,
"count": 42.0,
"users": [
{
"email": "string",
"full_name": "string",
"metadata": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"roles": [
"string"
],
"username": "string",
"enabled": true,
"profile_uid": "string",
"_sort": [
42.0
]
}
]
}