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 (opensearch-project#6864)

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

Signed-off-by: Lu Yu <nluyu@amazon.com>

* Changeset file for PR opensearch-project#6864 created/updated

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and LDrago27 committed Jun 3, 2024
1 parent aa539bc commit e391481
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 @@ -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

0 comments on commit e391481

Please sign in to comment.