Class QueryApiKeysRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.security.QueryApiKeysRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class QueryApiKeysRequest extends RequestBase implements JsonpSerializable
Query API keys. Retrieves a paginated list of API keys and their information. You can optionally filter the results with a query.
See Also:
  • Field Details

  • Method Details

    • of

    • aggregations

      public final Map<String,ApiKeyAggregation> aggregations()
      Any aggregations to run over the corpus of returned API keys. Aggregations and queries work together. Aggregations are computed only on the API keys that match the query. This supports only a subset of aggregation types, namely: terms, range, date_range, missing, cardinality, value_count, composite, filter, and filters. Additionally, aggregations only run over the same subset of fields that query works with.

      API name: aggregations

    • from

      @Nullable public final Integer from()
      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.

      API name: from

    • query

      @Nullable public final ApiKeyQuery query()
      A query to filter which API keys to return. If the query parameter is missing, it is equivalent to a match_all query. The query supports a subset of query types, including match_all, bool, term, terms, match, ids, prefix, wildcard, exists, range, and simple_query_string. You can query the following public information associated with an API key: id, type, name, creation, expiration, invalidated, invalidation, username, realm, and metadata.

      API name: query

    • searchAfter

      public final List<FieldValue> searchAfter()
      Search after definition

      API name: search_after

    • size

      @Nullable public final Integer size()
      The number of hits to return. 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.

      API name: size

    • sort

      public final List<SortOptions> sort()
      Other than id, all public fields of an API key are eligible for sorting. In addition, sort can also be applied to the _doc field to sort by index order.

      API name: sort

    • withLimitedBy

      @Nullable public final Boolean withLimitedBy()
      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.

      API name: with_limited_by

    • withProfileUid

      @Nullable public final Boolean withProfileUid()
      Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.

      API name: with_profile_uid

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • setupQueryApiKeysRequestDeserializer

      protected static void setupQueryApiKeysRequestDeserializer(ObjectDeserializer<QueryApiKeysRequest.Builder> op)