Skip to content

Commit

Permalink
Add OpenAPI specification for update, delete and migrate saved object…
Browse files Browse the repository at this point in the history
… API (#6864) (#6866)

* add OpenAPI specification for update, delete and migrate saved object API



* Changeset file for PR #6864 created/updated

---------



(cherry picked from commit bfe0e14)

Signed-off-by: Lu Yu <nluyu@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored May 30, 2024
1 parent 1863581 commit 83eccef
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/6864.yml
Original file line number Diff line number Diff line change
@@ -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))
89 changes: 89 additions & 0 deletions docs/openapi/saved_objects/saved_objects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,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:
Expand Down

0 comments on commit 83eccef

Please sign in to comment.