Skip to content

Commit

Permalink
Done
Browse files Browse the repository at this point in the history
  • Loading branch information
albertzaharovits committed Mar 14, 2024
1 parent f6ec736 commit 0540460
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
17 changes: 15 additions & 2 deletions specification/security/query_api_keys/QueryApiKeysRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* under the License.
*/

import { Dictionary } from '@spec_utils/Dictionary'
import { AggregationContainer } from '@_types/aggregations/AggregationContainer'
import { RequestBase } from '@_types/Base'
import { integer } from '@_types/Numeric'
import { QueryContainer } from '@_types/query_dsl/abstractions'
Expand All @@ -42,9 +44,20 @@ export interface Request extends RequestBase {
}
body: {
/**
* 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.
* @aliases aggs */
aggregations?: Dictionary<string, AggregationContainer>
/**
* A query to filter which API keys to return.
* The query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `ids`, `prefix`, `wildcard`, and `range`.
* You can query all public information associated with an API key.
* 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`.
*/
query?: QueryContainer
/**
Expand Down
7 changes: 7 additions & 0 deletions specification/security/query_api_keys/QueryApiKeysResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

import { ApiKey } from '@security/_types/ApiKey'
import { integer } from '@_types/Numeric'
import { Dictionary } from '@spec_utils/Dictionary'
import { Aggregate } from '@_types/aggregations/Aggregate'
import { AggregateName, Id, ScrollId, SuggestionName } from '@_types/common'

export class Response {
body: {
Expand All @@ -34,5 +37,9 @@ export class Response {
* A list of API key information.
*/
api_keys: ApiKey[]
/**
* The aggregations result, if requested.
*/
aggregations?: Dictionary<AggregateName, Aggregate>
}
}

0 comments on commit 0540460

Please sign in to comment.