Query API keys

GET /_security/_query/api_key

Retrieves a paginated list of API keys and their information. You can optionally filter the results with a query.

Query parameters

  • Return the snapshot of the owner user's role descriptors associated with the API key. An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors.

  • Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.

  • typed_keys boolean

    Determines whether aggregation names are prefixed by their respective types in the response.

application/json

Body

Responses

GET /_security/_query/api_key
curl \
 -X GET http://api.example.com/_security/_query/api_key \
 -H "Content-Type: application/json" \
 -d '{"aggregations":{},"query":{"":{"boost":42.0,"_name":"string"},"match":{},"prefix":{},"range":{},"term":{},"wildcard":{}},"from":42.0,"":"string","size":42.0,"search_after":[42.0]}'