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

Rename saved objects bulk_get and find endpoints #17512

Merged

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Apr 3, 2018

Part of #17510
Pairs with #17511

With #17510 we will be adding POST support to the find endpoint for saved objects, which means we need to disambiguate a POST to find from a POST to create an object without an id. To accomplish that this PR renames the find endpoint to GET /api/saved_objects/_find and only supports sending the type as a query string parameter.

  • GET /api/saved_objects is now GET /api/saved_objects/_find
  • GET /api/saved_objects/visualization is now GET /api/saved_objects/_find?type=visualization

While I'm in here I also updated the bulk_get API to be /api/saved_objects/_bulk_get.

release note:
In order to support sending larger and more expressive queries to the Saved Objects find API we will be adding a POST endpoint for find and therefore need a way to disambiguate the find API from from the POST API used to create Saved Objects. Starting in Kibana 6.3 endpoints that are not simple CRUD operations on a single object will be named and their name will start with an underscore, like in Elasticsearch: "GET /api/saved_objects" is now "GET /api/saved_objects/_find", "GET /api/saved_objects/{type}" is now "GET /api/saved_objects/_find?type={type}", and "GET /api/saved_objects/bulk_get" is now "GET /api/saved_objects/_bulk_get"

@spalger spalger added review Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.0.0 v6.3.0 labels Apr 3, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@spalger spalger force-pushed the rename/saved-objects/bulk-get-and-find branch from a4155e4 to b064cb1 Compare April 3, 2018 05:34
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@@ -21,11 +18,6 @@ export const createFindRoute = (prereqs) => ({
},
handler(request, reply) {
const options = keysToCamelCaseShallow(request.query);

if (request.params.type) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I ❤️ that we're getting rid of this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@spalger
Copy link
Contributor Author

spalger commented Apr 10, 2018

jenkins, test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@spalger
Copy link
Contributor Author

spalger commented Apr 11, 2018

6.3/6.x: 079f303

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:breaking review Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v6.3.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants