Skip to content

Commit fccf397

Browse files
committed
Introduce NodeStatsLevel enum for nodes stats API
It supports 'node' instead of 'cluster' like Level, which is really ClusterStatsLevel.
1 parent 59ed86c commit fccf397

File tree

5 files changed

+58
-22
lines changed

5 files changed

+58
-22
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 35 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_types/common.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,14 @@ export enum HttpMethod {
245245
HEAD
246246
}
247247

248+
// This is the ClusterStatsLevel enum in Elasticsearch
248249
export enum Level {
250+
cluster,
251+
indices,
252+
shards
253+
}
254+
255+
export enum NodeStatsLevel {
249256
node,
250257
indices,
251258
shards

specification/nodes/stats/NodesStatsRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { RequestBase } from '@_types/Base'
21-
import { Fields, Level, Metrics, NodeIds } from '@_types/common'
21+
import { Fields, Metrics, NodeIds, NodeStatsLevel } from '@_types/common'
2222
import { Duration } from '@_types/Time'
2323

2424
/**
@@ -82,7 +82,7 @@ export interface Request extends RequestBase {
8282
*/
8383
include_segment_file_sizes?: boolean
8484
/** Indicates whether statistics are aggregated at the cluster, index, or shard level. */
85-
level?: Level
85+
level?: NodeStatsLevel
8686
/**
8787
* Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
8888
* @server_default 30s

0 commit comments

Comments
 (0)