elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.74k stars 8.14k forks source link

[Dashboards] Public API URL path #193758

Open nickpeihl opened 21 hours ago

nickpeihl commented 21 hours ago

Prior to making the Dashboards Public API available, we should decide on how best to organize the base URL path for the CRUD routes.

Two suggested base paths are

  1. /api/dashboards
  2. /api/dashboards/dashboard

The expected CRUD routes for Dashboards use the following HTTP verbs and URL templates.

Create POST <BASEPATH>/{id?} - creates a new Dashboard using the attributes in the request body. In the URL id is the optionally specified saved object id. If id is not provided, then a random uuid is used.

Read GET <BASEPATH>/{id} - retrieves a Dashboard with the matching saved object id.

Update PUT <BASEPATH>/{id} - updates an existing Dashboard using the attributes in the request body. The id in the URL is required and must match an existing saved object.

Delete DELETE <BASEPATH>/{id} - deletes an existing Dashboard that matches the provided saved object id.

List GET <BASEPATH> - retrieves a paginated list of Dashboards. The URL may contain a query string that can be used to filter dashboards.

Kibana has a mixed usage when it comes to organizing API paths for CRUD:

elasticmachine commented 21 hours ago

Pinging @elastic/kibana-presentation (Team:Presentation)