From 87dc22acce0e37eb523d2b12b246d7fd87713f8b Mon Sep 17 00:00:00 2001 From: "Yuanqi(Ella) Zhu" Date: Thu, 30 May 2024 05:32:30 +0000 Subject: [PATCH 1/3] Add OpenAPI specification for bulk_get saved object APIs Signed-off-by: Yuanqi(Ella) Zhu --- docs/openapi/saved_objects/saved_objects.yml | 34 +++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/docs/openapi/saved_objects/saved_objects.yml b/docs/openapi/saved_objects/saved_objects.yml index 6853873a5352..f14d20c641d1 100644 --- a/docs/openapi/saved_objects/saved_objects.yml +++ b/docs/openapi/saved_objects/saved_objects.yml @@ -170,7 +170,7 @@ paths: example: 1 - in: query name: search - description: The search query that filters the saved objects. + description: The simple_query_string query that filters the objects in the response. schema: type: string example: "open*" @@ -399,6 +399,38 @@ paths: application/json: schema: type: object + /api/saved_objects/_bulk_get: + get: + tags: + - saved objects + summary: Bulk get saved objects + requestBody: + required: true + description: Array of saved objects to update + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + required: true + description: Unique id of the saved object. + type: + type: string + required: true + description: The type of saved object. + fields: + type: array + items: + type: string + description: The fields to return in the attributes key of the object response. + example: + - id: 67a9021c-c97e-4499-8150-9722ab44edd4 + type: visualization + fields: ['title', 'fieldFormatMap'] components: parameters: type: From 1b3ecb1bfef66b4cdefce0ddd46d7d6ba0106949 Mon Sep 17 00:00:00 2001 From: "opensearch-changeset-bot[bot]" <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Date: Thu, 30 May 2024 05:34:27 +0000 Subject: [PATCH 2/3] Changeset file for PR #6860 created/updated --- changelogs/fragments/6860.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/6860.yml diff --git a/changelogs/fragments/6860.yml b/changelogs/fragments/6860.yml new file mode 100644 index 000000000000..8390c9302386 --- /dev/null +++ b/changelogs/fragments/6860.yml @@ -0,0 +1,2 @@ +doc: +- Add OpenAPI specification for bulk_get saved object APIs ([#6860](/~https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6860)) \ No newline at end of file From a3e53aceb490de3141a9c4827a1eb4d2455bcb69 Mon Sep 17 00:00:00 2001 From: "Yuanqi(Ella) Zhu" <53279298+zhyuanqi@users.noreply.github.com> Date: Thu, 30 May 2024 10:23:21 -0700 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Lu Yu Signed-off-by: Yuanqi(Ella) Zhu <53279298+zhyuanqi@users.noreply.github.com> --- docs/openapi/saved_objects/saved_objects.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/openapi/saved_objects/saved_objects.yml b/docs/openapi/saved_objects/saved_objects.yml index f14d20c641d1..365eed02c37f 100644 --- a/docs/openapi/saved_objects/saved_objects.yml +++ b/docs/openapi/saved_objects/saved_objects.yml @@ -406,7 +406,7 @@ paths: summary: Bulk get saved objects requestBody: required: true - description: Array of saved objects to update + description: Array of criteria including id, type, fields used to retrieve matching saved objects content: application/json: schema: