From 0a3d14b203f12a741c89feddff3d36ab32655f19 Mon Sep 17 00:00:00 2001 From: Chenyang Ji Date: Tue, 22 Oct 2024 11:34:13 -0700 Subject: [PATCH] add changelog Signed-off-by: Chenyang Ji --- CHANGELOG.md | 1 + spec/namespaces/insights.yaml | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6cee833..f291cd4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,6 +103,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added ability to pass `InlineScript` as a simple string ([#605](https://github.com/opensearch-project/opensearch-api-specification/pull/605)) - Added `config_id` and `config_id_list` to `/_plugins/_notifications/configs` query parameters ([#594](https://github.com/opensearch-project/opensearch-api-specification/pull/594)) - Added a release workflow triggered on a tag ([#635](https://github.com/opensearch-project/opensearch-api-specification/pull/635)) +- Added API spec for query insights plugin ([#625](https://github.com/opensearch-project/opensearch-api-specification/pull/625)) ### Changed diff --git a/spec/namespaces/insights.yaml b/spec/namespaces/insights.yaml index 7787d105..165e1630 100644 --- a/spec/namespaces/insights.yaml +++ b/spec/namespaces/insights.yaml @@ -6,20 +6,18 @@ info: paths: /_insights/top_queries: get: - operationId: insights.getTopQueries - x-operation-group: insights + operationId: insights.top_queries.0 + x-operation-group: insights.top_queries description: Retrieves the top queries based on the given metric type (latency, CPU, or memory). parameters: - - $ref: '#/components/parameters/type' + - $ref: '#/components/parameters/insights.top_queries::type' responses: '200': - content: - application/json: - schema: - $ref: '../schemas/query_insights._common.yaml#/components/schemas/TopQueriesResponse' + $ref: '#/components/responses/insight.top_queries@200' + components: parameters: - type: + insights.top_queries::type: name: type in: query required: true @@ -27,3 +25,9 @@ components: schema: type: string enum: [cpu, latency, memory] + responses: + insight.top_queries@200: + content: + application/json: + schema: + $ref: '../schemas/insights._common.yaml#/components/schemas/TopQueriesResponse'