From 5f0e098ec9d6ccc4a72b117a8e1e5803802dcb02 Mon Sep 17 00:00:00 2001 From: Lu Yu Date: Thu, 30 May 2024 18:11:59 +0000 Subject: [PATCH 1/2] add OpenAPI specification for update, delete and migrate saved object API Signed-off-by: Lu Yu --- docs/openapi/saved_objects/saved_objects.yml | 89 ++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/docs/openapi/saved_objects/saved_objects.yml b/docs/openapi/saved_objects/saved_objects.yml index 6853873a535..593cbf1b8c0 100644 --- a/docs/openapi/saved_objects/saved_objects.yml +++ b/docs/openapi/saved_objects/saved_objects.yml @@ -137,6 +137,95 @@ paths: application/json: schema: $ref: '#/components/schemas/400_bad_request' + put: + tags: + - saved objects + summary: Update existing saved object + parameters: + - $ref: '#components/parameters/type' + - $ref: '#components/parameters/id' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - attributes + properties: + attributes: + type: object + description: The metadata of the saved object to be updated, and the object is not validated. + version: + type: string + references: + description: List of objects that describe other saved objects the created object references. + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + responses: + '200': + description: The update request is successful. + content: + application/json: + schema: + type: object + '404': + description: The saved object does not exist. + content: + application/json: + schema: + type: object + delete: + tags: + - saved objects + summary: Delete a saved object + parameters: + - $ref: '#components/parameters/type' + - $ref: '#components/parameters/id' + - in: query + name: force + description: If set to true, will force deletion of an object that exists in multiple namespaces. + schema: + type: boolean + responses: + '200': + description: The deletion request is successful. + content: + application/json: + schema: + type: object + '404': + description: The saved object does not exist. + content: + application/json: + schema: + type: object + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400_bad_request' + /api/saved_objects/_migrate: + post: + tags: + - saved objects + summary: Migrate existing saved objects + responses: + '200': + description: The migration is executed. + content: + application/json: + schema: + type: object /api/saved_objects/_find: get: tags: From d665cf137f8b28814a2938f003b9ef9ff55c93bc 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 18:16:55 +0000 Subject: [PATCH 2/2] Changeset file for PR #6864 created/updated --- changelogs/fragments/6864.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/6864.yml diff --git a/changelogs/fragments/6864.yml b/changelogs/fragments/6864.yml new file mode 100644 index 00000000000..aaab0a92be3 --- /dev/null +++ b/changelogs/fragments/6864.yml @@ -0,0 +1,2 @@ +doc: +- Add OpenAPI specification for update, delete and migrate saved object API ([#6864](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6864)) \ No newline at end of file