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 bulk_get saved object APIs #6860

Merged
merged 3 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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/6860.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
doc:
- Add OpenAPI specification for bulk_get saved object APIs ([#6860](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6860))
34 changes: 33 additions & 1 deletion docs/openapi/saved_objects/saved_objects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,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*"
Expand Down Expand Up @@ -399,6 +399,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 saved objects to update
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To update or to retrieve? The array is search criteria, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THanks for pointing this out. Will make the change

zhyuanqi marked this conversation as resolved.
Show resolved Hide resolved
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:
Expand Down
Loading