Find API keys with a query
- POST also GET /_security/_query/api_key
Get a paginated list of API keys and their information. You can optionally filter the results with a query.
To use this API, you must have at least the manage_own_api_key or the read_security cluster privileges.
If you have only the manage_own_api_key privilege, this API returns only the API keys that you own.
If you have the read_security, manage_api_key, or greater privileges (including manage_security), this API returns all API keys regardless of ownership.
Refer to the linked documentation for examples of how to find API keys:
- Cluster privileges:
manage_own_api_key,read_security
Query Parameters
-
with_limited_byboolean · default: false 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 (effectively limited by it). An API key cannot retrieve any API key’s limited-by role descriptors (including itself) unless it has
manage_api_keyor higher privileges.-
with_profile_uidboolean · default: false Determines whether to also retrieve the profile UID for the API key owner principal. If it exists, the profile UID is returned under the
profile_uidresponse field for each API key.-
typed_keysboolean · default: false Determines whether aggregation names are prefixed by their respective types in the response.
Request
-
aggregationsmap string to ApiKeyAggregationContainer -
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, andfilters. Additionally, aggregations only run over the same subset of fields that query works with. -
<string>ApiKeyAggregationContainer -
aggregationsmap string to ApiKeyAggregationContainer -
Sub-aggregations for this aggregation. Only applies to bucket aggregations.
-
metaMetadata -
cardinalityCardinalityAggregation -
A single-value metrics aggregation that calculates an approximate count of distinct values.
-
fieldstring Field -
The field on which to run the aggregation.
-
missingboolean | number | string -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
scriptstring Script -
precision_thresholdnumber · default: 3000 -
A unique count below which counts are expected to be close to accurate. This allows to trade memory for accuracy.
-
rehashboolean -
execution_hintCardinalityExecutionMode -
Mechanism by which cardinality aggregations is run.
Supported values include:
global_ordinals: Run the aggregation by using global ordinals of the field and resolving those values after finishing a shard.segment_ordinals: Run the aggregation by using segment ordinal values and resolving those values after each segment.direct: Run the aggregation by using field values directly.save_memory_heuristic: Heuristic-based mode, default in Elasticsearch 8.3 and earlier.save_time_heuristic: Heuristic-based mode, default in Elasticsearch 8.4 and later.
-
Values:
global_ordinalssegment_ordinalsdirectsave_memory_heuristicsave_time_heuristic -
compositeCompositeAggregation -
A multi-bucket aggregation that creates composite buckets from different sources. Unlike the other multi-bucket aggregations, you can use the
compositeaggregation to paginate all buckets from a multi-level aggregation efficiently. -
afterCompositeAggregateKey -
When paginating, use the
after_keyvalue returned in the previous response to retrieve the next page. -
sizenumber · default: 10 -
The number of composite buckets that should be returned.
-
sourcesstring to CompositeAggregationSource -
The value sources used to build composite buckets. Keys are returned in the order of the
sourcesdefinition. -
date_rangeDateRangeAggregation -
A multi-bucket value source based aggregation that enables the user to define a set of date ranges - each representing a bucket.
-
fieldstring Field -
The date field whose values are use to build ranges.
-
formatstring -
The date format used to format
fromandtoin the response. -
missingboolean | number | string -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
rangesDateRangeExpression -
Array of date ranges.
-
time_zonestring -
Time zone used to convert dates from another time zone to UTC.
-
keyedboolean -
Set to
trueto associate a unique string key with each bucket and returns the ranges as a hash rather than an array. -
filterApiKeyQueryContainer -
A single bucket aggregation that narrows the set of documents to those that match a query.
-
boolBoolQuery -
Matches documents matching boolean combinations of other queries.
-
boostnumber · default: 1 -
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
-
_namestring -
filteroneOf -
The clause (query) must appear in matching documents. However, unlike
must, the score of the query will be ignored. -
minimum_should_matchnumber | string MinimumShouldMatch -
Specifies the number or percentage of
shouldclauses returned documents must match. -
mustoneOf -
The clause (query) must appear in matching documents and will contribute to the score.
-
must_notoneOf -
The clause (query) must not appear in the matching documents. Because scoring is ignored, a score of
0is returned for all documents. -
shouldoneOf -
The clause (query) should appear in the matching document.
-
existsExistsQuery -
Returns documents that contain an indexed value for a field.
-
boostnumber · default: 1 -
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
-
_namestring -
fieldstring Fieldrequired -
Name of the field you wish to search.
-
idsIdsQuery -
Returns documents based on their IDs. This query uses document IDs stored in the
_idfield. -
boostnumber · default: 1 -
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
-
_namestring -
valuesstring Ids -
An array of document IDs.
-
matchmap string to MatchQuery -
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
<string>MatchQuery -
boostnumber · default: 1 -
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
-
_namestring -
analyzerstring -
Analyzer used to convert the text in the query value into tokens.
-
auto_generate_synonyms_phrase_queryboolean · default: true -
If
true, match phrase queries are automatically created for multi-term synonyms. -
cutoff_frequencynumberdeprecated -
fuzzinessnumber | string Fuzziness -
Maximum edit distance allowed for matching.
-
fuzzy_rewritestring -
Method used to rewrite the query.
-
fuzzy_transpositionsboolean · default: true -
If
true, edits for fuzzy matching include transpositions of two adjacent characters (for example,abtoba). -
lenientboolean · default: false -
If
true, format-based errors, such as providing a text query value for a numeric field, are ignored. -
max_expansionsnumber · default: 50 -
Maximum number of terms to which the query will expand.
-
minimum_should_matchnumber | string MinimumShouldMatch -
Minimum number of clauses that must match for a document to be returned.
-
operatorOperator · default: 'or' -
Boolean logic used to interpret text in the query value.
-
Values:
andANDorOR -
prefix_lengthnumber · default: 0 -
Number of beginning characters left unchanged for fuzzy matching.
-
queryboolean | number | stringrequired -
Text, number, boolean value or date you wish to find in the provided field.
-
zero_terms_queryZeroTermsQuery · default: 'none' -
Indicates whether no documents are returned if the
analyzerremoves all tokens, such as when using astopfilter.Supported values include:
all: Returns all documents, similar to amatch_allquery.none: No documents are returned if theanalyzerremoves all tokens.
-
Values:
allnone -
match_allMatchAllQuery -
Matches all documents, giving them all a
_scoreof 1.0. -
prefixmap string to PrefixQuery -
Returns documents that contain a specific prefix in a provided field.
-
<string>PrefixQuery -
boostnumber · default: 1 -
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
-
_namestring -
rewritestring -
Method used to rewrite the query.
-
valuestringrequired -
Beginning characters of terms you wish to find in the provided field.
-
case_insensitiveboolean · default: false -
Allows case insensitive matching of the value with the indexed field values when set to
true. Default isfalsewhich means the case sensitivity of matching depends on the underlying field’s mapping. -
rangemap string to RangeQuery -
Returns documents that contain terms within a provided range.
-
simple_query_stringSimpleQueryStringQuery -
Returns documents based on a provided query string, using a parser with a limited but fault-tolerant syntax.
-
boostnumber · default: 1 -
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
-
_namestring -
analyzerstring -
Analyzer used to convert text in the query string into tokens.
-
analyze_wildcardboolean · default: false -
If
true, the query attempts to analyze wildcard terms in the query string. -
auto_generate_synonyms_phrase_queryboolean · default: true -
If
true, the parser creates a match_phrase query for each multi-position token. -
default_operatorOperator · default: 'or' -
Default boolean logic used to interpret text in the query string if no operators are specified.
-
Values:
andANDorOR -
fieldsstring Field -
Array of fields you wish to search. Accepts wildcard expressions. You also can boost relevance scores for matches to particular fields using a caret (
^) notation. Defaults to theindex.query.default_field indexsetting, which has a default value of*. -
flagsSimpleQueryStringFlags · default: ALL -
List of enabled operators for the simple query string syntax.
-
Values:
NONEANDNOTORPREFIXPHRASEPRECEDENCEESCAPEWHITESPACEFUZZYNEARSLOPALL -
fuzzy_max_expansionsnumber · default: 50 -
Maximum number of terms to which the query expands for fuzzy matching.
-
fuzzy_prefix_lengthnumber · default: 0 -
Number of beginning characters left unchanged for fuzzy matching.
-
fuzzy_transpositionsboolean -
If
true, edits for fuzzy matching include transpositions of two adjacent characters (for example,abtoba). -
lenientboolean · default: false -
If
true, format-based errors, such as providing a text value for a numeric field, are ignored. -
minimum_should_matchnumber | string MinimumShouldMatch -
Minimum number of clauses that must match for a document to be returned.
-
querystringrequired -
Query string in the simple query string syntax you wish to parse and use for search.
-
quote_field_suffixstring -
Suffix appended to quoted text in the query string.
-
termmap string to TermQuery -
Returns documents that contain an exact term in a provided field. To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.
-
<string>TermQuery -
boostnumber · default: 1 -
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
-
_namestring -
valueFieldValuerequired -
Term you wish to find in the provided field.
-
case_insensitiveboolean · default: false -
Allows case insensitive matching of the value with the indexed field values when set to
true. Whenfalse, the case sensitivity of matching depends on the underlying field’s mapping. -
termsTermsQuery -
Returns documents that contain one or more exact terms in a provided field. To return a document, one or more terms must exactly match a field value, including whitespace and capitalization.
-
wildcardmap string to WildcardQuery -
Returns documents that contain terms matching a wildcard pattern.
-
<string>WildcardQuery -
boostnumber · default: 1 -
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
-
_namestring -
case_insensitiveboolean -
Allows case insensitive matching of the pattern with the indexed field values when set to true. Default is false which means the case sensitivity of matching depends on the underlying field’s mapping.
-
rewritestring -
Method used to rewrite the query.
-
valuestring -
Wildcard pattern for terms you wish to find in the provided field. Required, when wildcard is not set.
-
wildcardstring -
Wildcard pattern for terms you wish to find in the provided field. Required, when value is not set.
-
filtersApiKeyFiltersAggregation -
A multi-bucket aggregation where each bucket contains the documents that match a query.
-
filtersBucketsApiKeyQueryContainer -
Collection of queries from which to build buckets.
-
other_bucketboolean -
Set to
trueto add a bucket to the response which will contain all documents that do not match any of the given filters. -
other_bucket_keystring · default: _other_ -
The key with which the other bucket is returned.
-
keyedboolean · default: true -
By default, the named filters aggregation returns the buckets as an object. Set to
falseto return the buckets as an array of objects. -
missingMissingAggregation -
rangeRangeAggregation -
A multi-bucket value source based aggregation that enables the user to define a set of ranges - each representing a bucket.
-
fieldstring Field -
The date field whose values are use to build ranges.
-
missingnumber -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
rangesAggregationRange -
An array of ranges used to bucket documents.
-
scriptstring Script -
keyedboolean -
Set to
trueto associate a unique string key with each bucket and return the ranges as a hash rather than an array. -
formatstring -
termsTermsAggregation -
A multi-bucket value source based aggregation where buckets are dynamically built - one per unique value.
-
collect_modeTermsAggregationCollectMode -
Determines how child aggregations should be calculated: breadth-first or depth-first.
Supported values include:
depth_first: Expands all branches of the aggregation tree in one depth-first pass, before any pruning occurs.breadth_first: Caches the set of documents that fall into the uppermost buckets for subsequent replay.
-
Values:
depth_firstbreadth_first -
excludeTermsExclude -
Values to exclude. Accepts regular expressions and partitions.
-
execution_hintTermsAggregationExecutionHint -
Determines whether the aggregation will use field values directly or global ordinals.
-
Values:
mapglobal_ordinalsglobal_ordinals_hashglobal_ordinals_low_cardinality -
fieldstring Field -
The field from which to return terms.
-
includeTermsInclude -
Values to include. Accepts regular expressions and partitions.
-
min_doc_countnumber · default: 1 -
Only return values that are found in more than
min_doc_counthits. -
missingboolean | number | string -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
missing_orderMissingOrder -
Values:
firstlastdefault -
missing_bucketboolean -
value_typestring -
Coerced unmapped fields into the specified type.
-
orderAggregateOrder -
Specifies the sort order of the buckets. Defaults to sorting by descending document count.
-
scriptstring Script -
shard_min_doc_countnumber -
Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the
min_doc_count. Terms will only be considered if their local shard frequency within the set is higher than theshard_min_doc_count. -
shard_sizenumber -
The number of candidate terms produced by each shard. By default,
shard_sizewill be automatically estimated based on the number of shards and thesizeparameter. -
show_term_doc_count_errorboolean -
Set to
trueto return thedoc_count_error_upper_bound, which is an upper bound to the error on thedoc_countreturned by each shard. -
sizenumber · default: 10 -
The number of buckets returned out of the overall terms list.
-
formatstring -
value_countValueCountAggregation -
A single-value metrics aggregation that counts the number of values that are extracted from the aggregated documents.
-
queryApiKeyQueryContainer -
A query to filter which API keys to return. If the query parameter is missing, it is equivalent to a
match_allquery. The query supports a subset of query types, includingmatch_all,bool,term,terms,match,ids,prefix,wildcard,exists,range, andsimple_query_string. You can query the following public information associated with an API key:id,type,name,creation,expiration,invalidated,invalidation,username,realm, andmetadata.NOTE: The queryable string values associated with API keys are internally mapped as keywords. Consequently, if no
analyzerparameter is specified for amatchquery, then the provided match query string is interpreted as a single keyword value. Such a match query is hence equivalent to atermquery. -
fromnumber · default: 0 -
The starting document offset. It must not be negative. By default, you cannot page through more than 10,000 hits using the
fromandsizeparameters. To page through more hits, use thesearch_afterparameter. -
sortSort -
The sort definition. Other than
id, all public fields of an API key are eligible for sorting. In addition, sort can also be applied to the_docfield to sort by index order. - Reference
-
sizenumber · default: 10 -
The number of hits to return. It must not be negative. The
sizeparameter can be set to0, in which case no API key matches are returned, only the aggregation results. By default, you cannot page through more than 10,000 hits using thefromandsizeparameters. To page through more hits, use thesearch_afterparameter.
Response
-
totalnumberrequired -
The total number of API keys found.
-
countnumberrequired -
The number of API keys returned in the response.
-
api_keysApiKeyrequired -
A list of API key information.
-
idstring Idrequired -
Id for the API key
-
namestring Namerequired -
Name of the API key.
-
typeApiKeyTyperequired -
The type of the API key (e.g.
restorcross_cluster). -
Values:
restcross_cluster -
creationEpochTimeUnitMillisrequired -
Creation time for the API key in milliseconds.
-
expirationEpochTimeUnitMillis -
Expiration time for the API key in milliseconds.
-
invalidatedbooleanrequired -
Invalidation status for the API key. If the key has been invalidated, it has a value of
true. Otherwise, it isfalse. -
invalidationEpochTimeUnitMillis -
If the key has been invalidated, invalidation time in milliseconds.
-
usernamestringrequired -
Principal for which this API key was created
-
realmstringrequired -
Realm name of the principal for which this API key was created.
-
realm_typestring -
Realm type of the principal for which this API key was created
-
metadataMetadatarequired -
Metadata of the API key
-
role_descriptorsmap string to RoleDescriptor -
The role descriptors assigned to this API key when it was created or last updated. An empty role descriptor means the API key inherits the owner user’s permissions.
-
<string>RoleDescriptor -
clusterClusterPrivilege -
A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute.
-
Values:
allcancel_taskclone_api_keycreate_snapshotcross_cluster_replicationcross_cluster_searchdelegate_pkigrant_api_keymanagemanage_api_keymanage_autoscalingmanage_behavioral_analyticsmanage_ccrmanage_data_frame_transformsmanage_data_stream_global_retentionmanage_enrichmanage_esqlmanage_ilmmanage_index_templatesmanage_inferencemanage_ingest_pipelinesmanage_logstash_pipelinesmanage_mlmanage_oidcmanage_own_api_keymanage_pipelinemanage_reindexmanage_rollupmanage_samlmanage_search_applicationmanage_search_query_rulesmanage_search_synonymsmanage_securitymanage_service_accountmanage_slmmanage_tokenmanage_transformmanage_user_profilemanage_watchermonitormonitor_data_frame_transformsmonitor_data_stream_global_retentionmonitor_enrichmonitor_esqlmonitor_inferencemonitor_mlmonitor_reindexmonitor_rollupmonitor_snapshotmonitor_statsmonitor_text_structuremonitor_transformmonitor_watchernonepost_behavioral_analytics_eventread_ccrread_fleet_secretsread_ilmread_pipelineread_securityread_slmtransport_clientwrite_connector_secretswrite_fleet_secrets -
indicesIndicesPrivileges -
A list of indices permissions entries.
-
field_securityFieldSecurity -
The document fields that the owners of the role have read access to.
- Reference
-
namesIndexName | IndexNamerequired -
A list of indices (or index name patterns) to which the permissions in this entry apply.
-
privilegesIndexPrivilegerequired -
The index level privileges that owners of the role have on the specified indices.
-
Values:
allauto_configurecreatecreate_doccreate_indexcreate_viewcross_cluster_replicationcross_cluster_replication_internaldeletedelete_indexdelete_viewindexmaintenancemanagemanage_data_stream_lifecyclemanage_follow_indexmanage_ilmmanage_leader_indexmanage_viewmonitornonereadread_cross_clusterread_view_metadataview_index_metadatawrite -
queryIndicesPrivilegesQuery -
A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role.
-
allow_restricted_indicesboolean · default: false -
Set to
trueif using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in thenameslist, Elasticsearch checks privileges against these indices regardless of the value set forallow_restricted_indices. -
remote_indicesRemoteIndicesPrivileges -
A list of indices permissions for remote clusters.
-
clustersstring Namesrequired -
A list of cluster aliases to which the permissions in this entry apply.
-
field_securityFieldSecurity -
The document fields that the owners of the role have read access to.
- Reference
-
namesIndexName | IndexNamerequired -
A list of indices (or index name patterns) to which the permissions in this entry apply.
-
privilegesIndexPrivilegerequired -
The index level privileges that owners of the role have on the specified indices.
-
Values:
allauto_configurecreatecreate_doccreate_indexcreate_viewcross_cluster_replicationcross_cluster_replication_internaldeletedelete_indexdelete_viewindexmaintenancemanagemanage_data_stream_lifecyclemanage_follow_indexmanage_ilmmanage_leader_indexmanage_viewmonitornonereadread_cross_clusterread_view_metadataview_index_metadatawrite -
queryIndicesPrivilegesQuery -
A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role.
-
allow_restricted_indicesboolean · default: false -
Set to
trueif using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in thenameslist, Elasticsearch checks privileges against these indices regardless of the value set forallow_restricted_indices. -
remote_clusterRemoteClusterPrivileges -
A list of cluster permissions for remote clusters. NOTE: This is limited a subset of the cluster permissions.
-
clustersstring Namesrequired -
A list of cluster aliases to which the permissions in this entry apply.
-
privilegesRemoteClusterPrivilegerequired -
The cluster level privileges that owners of the role have on the remote cluster.
-
Values:
monitor_enrichmonitor_stats -
globalGlobalPrivilege -
An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware.
-
applicationApplicationGlobalUserPrivileges -
manageManageUserPrivilegesrequired -
applicationsstringrequired -
profileWriteProfileGlobalUserPrivileges -
A privilege that grants the ability to write the
dataandaccesssections of user profiles for the specified applications. -
writeManageUserPrivileges -
The applications for which user profile data can be written. Absent when the
profilesection is present but grants no privileges. -
applicationsstringrequired -
roleManageRolesGlobalUserPrivileges -
A privilege that grants the ability to manage roles that are scoped to the specified indices.
-
manageManageRolesPrivileges -
The index-scoped role management privileges. Absent when the
rolesection is present but grants no privileges. -
indicesManageRolesIndexPermissionsrequired -
namesstringrequired -
A list of indices (or index name patterns) that the owners of the role can manage roles for.
-
privilegesstringrequired -
The index privileges that the managed roles are allowed to grant on the specified indices.
-
data_sourceDataSourcePrivileges -
A list of data source privilege entries, used to grant access to ES|QL data sources.
-
namesstringrequired -
A list of data source names or wildcard patterns to which the permissions in this entry apply.
-
privilegesDataSourcePrivilegerequired -
The data source privileges that owners of the role have for the specified data sources.
Supported values include:
create: Grants privilege to create a data source with a matching name.delete: Grants privilege to delete a data source with a matching name.read_metadata: Grants privilege to read a data source's metadata.read: Grants privilege to attach a dataset to a data source with a matching name.manage: Grants all data source privileges, includingcreate,delete,read, andread_metadata.
-
Values:
createdeleteread_metadatareadmanage -
applicationsApplicationPrivileges -
A list of application privilege entries
-
applicationstringrequired -
The name of the application to which this entry applies.
-
privilegesstringrequired -
A list of strings, where each element is the name of an application privilege or action.
-
resourcesstringrequired -
A list resources to which the privileges are applied.
-
metadataMetadata -
Optional meta-data. Within the metadata object, keys that begin with
_are reserved for system usage. -
run_asstring -
A list of users that the API keys can impersonate. NOTE: In Elastic Cloud Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty
run_asfield, but a non-empty list will be rejected. - Reference
-
descriptionstring -
Optional description of the role descriptor
-
restrictionRestriction -
Restriction for when the role descriptor is allowed to be effective.
-
workflowsRestrictionWorkflowrequired -
A list of workflows to which the API key is restricted. NOTE: In order to use a role restriction, an API key must be created with a single role descriptor.
-
Values:
search_application_query -
transient_metadatamap string to object -
limited_bystring to RoleDescriptor -
The owner user’s permissions associated with the API key. It is a point-in-time snapshot captured at creation and subsequent updates. An API key’s effective permissions are an intersection of its assigned privileges and the owner user’s permissions.
-
accessAccess -
The access granted to cross-cluster API keys. The access is composed of permissions for cross cluster search and cross cluster replication. At least one of them must be specified. When specified, the new access assignment fully replaces the previously assigned access.
-
replicationReplicationAccess -
A list of indices permission entries for cross-cluster replication.
-
namesIndexName | IndexNamerequired -
A list of indices (or index name patterns) to which the permissions in this entry apply.
-
allow_restricted_indicesboolean · default: false -
This needs to be set to true if the patterns in the names field should cover system indices.
-
searchSearchAccess -
A list of indices permission entries for cross-cluster search.
-
field_securityFieldSecurity -
The document fields that the owners of the role have read access to.
- Reference
-
namesIndexName | IndexNamerequired -
A list of indices (or index name patterns) to which the permissions in this entry apply.
-
queryIndicesPrivilegesQuery -
A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role.
-
allow_restricted_indicesboolean · default: false -
Set to
trueif using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in thenameslist, Elasticsearch checks privileges against these indices regardless of the value set forallow_restricted_indices. -
certificate_identitystring -
The certificate identity associated with a cross-cluster API key. Restricts the API key to connections authenticated by a specific TLS certificate. Only applicable to cross-cluster API keys.
-
profile_uidstring -
The profile uid for the API key owner principal, if requested and if it exists
-
_sortSortResults -
Sorting values when using the
sortparameter with thesecurity.query_api_keysAPI. -
aggregationsmap string to ApiKeyAggregate -
The aggregations result, if requested.