diff --git a/api/api/searchable_snapshots.js b/api/api/searchable_snapshots.js index 26ea70b83..a1ba82d0a 100644 --- a/api/api/searchable_snapshots.js +++ b/api/api/searchable_snapshots.js @@ -23,7 +23,7 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'index', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'master_timeout', 'wait_for_completion', 'storage'] +const acceptedQuerystring = ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'index', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'master_timeout', 'wait_for_completion', 'storage', 'level'] const snakeCase = { ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', waitForCompletion: 'wait_for_completion' } function SearchableSnapshotsApi (transport, ConfigurationError) { diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 3fdf52737..38131ec47 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -2167,6 +2167,7 @@ export interface SearchableSnapshotsRepositoryStats extends Generic { export interface SearchableSnapshotsStats extends Generic { index?: string | string[]; + level?: 'cluster' | 'indices' | 'shards'; } export interface SecurityAuthenticate extends Generic { diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index dc231a9d2..f6a4b5516 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -9042,7 +9042,8 @@ link:{ref}/searchable-snapshots-apis.html[Documentation] + [source,ts] ---- client.searchableSnapshots.stats({ - index: string | string[] + index: string | string[], + level: 'cluster' | 'indices' | 'shards' }) ---- link:{ref}/searchable-snapshots-apis.html[Documentation] + @@ -9051,6 +9052,10 @@ link:{ref}/searchable-snapshots-apis.html[Documentation] + |`index` |`string \| string[]` - A comma-separated list of index names +|`level` +|`'cluster' \| 'indices' \| 'shards'` - Return stats aggregated at cluster, index or shard level + +_Default:_ `indices` + |=== [discrete]