Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenAPI specification for update, delete and migrate saved object API #6864

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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:
Expand Down
Loading