From be70326df382694e2e7fc4677544bfe107be7350 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 May 2024 18:29:21 +0000 Subject: [PATCH] Add OpenAPI specification for bulk_get saved object APIs (#6860) * Add OpenAPI specification for bulk_get saved object APIs Signed-off-by: Yuanqi(Ella) Zhu * Changeset file for PR #6860 created/updated * Apply suggestions from code review Co-authored-by: Lu Yu Signed-off-by: Yuanqi(Ella) Zhu <53279298+zhyuanqi@users.noreply.github.com> --------- Signed-off-by: Yuanqi(Ella) Zhu Signed-off-by: Yuanqi(Ella) Zhu <53279298+zhyuanqi@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: Lu Yu (cherry picked from commit 6b2db4dc0b8063a0a3ab5afeb827e4143d027554) Signed-off-by: github-actions[bot] --- changelogs/fragments/6860.yml | 2 ++ docs/openapi/saved_objects/saved_objects.yml | 34 +++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) 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 diff --git a/docs/openapi/saved_objects/saved_objects.yml b/docs/openapi/saved_objects/saved_objects.yml index 443d37ada9b4..373954f1465d 100644 --- a/docs/openapi/saved_objects/saved_objects.yml +++ b/docs/openapi/saved_objects/saved_objects.yml @@ -126,7 +126,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*" @@ -355,6 +355,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 criteria including id, type, fields used to retrieve matching saved objects + 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: