Skip to content

Commit

Permalink
Allow either node ID or metric in /_nodes.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock committed Jul 15, 2024
1 parent 9e90ca8 commit 5b399e3
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions spec/namespaces/nodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ paths:
responses:
'200':
$ref: '#/components/responses/nodes.usage@200'
/_nodes/{node_id}:
/_nodes/{node_id_or_metric}:
get:
operationId: nodes.info.1
x-operation-group: nodes.info
Expand All @@ -262,7 +262,7 @@ paths:
externalDocs:
url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-info/
parameters:
- $ref: '#/components/parameters/nodes.info::path.node_id'
- $ref: '#/components/parameters/nodes.info::path.node_id_or_metric'
- $ref: '#/components/parameters/nodes.info::query.flat_settings'
- $ref: '#/components/parameters/nodes.info::query.timeout'
responses:
Expand Down Expand Up @@ -530,15 +530,19 @@ components:
description: The type to sample.
schema:
$ref: '../schemas/nodes._common.yaml#/components/schemas/SampleType'
nodes.info::path.metric:
nodes.info::path.node_id_or_metric:
in: path
name: metric
description: Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest.
name: node_id_or_metric
description: |
Limits the information returned to a list of node IDs or specific metrics.
Supports a comma-separated list, such as node1,node2 or http,ingest.
required: true
schema:
type: array
items:
$ref: '../schemas/nodes.info.yaml#/components/schemas/Metric'
anyOf:
- $ref: '../schemas/_common.yaml#/components/schemas/NodeIds'
- $ref: '../schemas/nodes.info.yaml#/components/schemas/Metric'
style: simple
nodes.info::path.node_id:
in: path
Expand All @@ -548,6 +552,16 @@ components:
schema:
$ref: '../schemas/_common.yaml#/components/schemas/NodeIds'
style: simple
nodes.info::path.metric:
in: path
name: metric
description: Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest.
required: true
schema:
type: array
items:
$ref: '../schemas/nodes.info.yaml#/components/schemas/Metric'
style: simple
nodes.info::query.flat_settings:
in: query
name: flat_settings
Expand Down

0 comments on commit 5b399e3

Please sign in to comment.