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
/api/dashboards
/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:
Data views uses /api/data_views/data_view for CRUD routes. Based on a conversation with @mattkime the CRUD routes were likely organized under the data_views domain to allow for future paths like /api/data_vews/default for setting the default data view.
Alerting rules uses /api/alerting/rule for CRUD routes. But there are additional non-CRUD routes under the alerting domain such as rule_types and _health. This path also has the deprecated /api/alerting/alert under the alerting domain.
Elastic agents does not appear to register a Create route. But it uses /api/agents as the basepath for the Read, Update, and Delete routes. Additionally some other operations such as bulk reassign and initiate agent setup fall under the agents domain.
SLOs registers CRUD routes under /api/observability/slos, presumably this allows for other operations or CRUD routes to be created under the observability domain. However, the Synthetics APIs notably do not use the observability domain and instead use the top-level synthetics domain for monitors and params.
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
/api/dashboards
/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 theattributes
in the request body. In the URLid
is the optionally specified saved object id. Ifid
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 theattributes
in the request body. Theid
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:
/api/data_views/data_view
for CRUD routes. Based on a conversation with @mattkime the CRUD routes were likely organized under thedata_views
domain to allow for future paths like/api/data_vews/default
for setting the default data view./api/alerting/rule
for CRUD routes. But there are additional non-CRUD routes under thealerting
domain such as rule_types and _health. This path also has the deprecated/api/alerting/alert
under the alerting domain./api/agents
as the basepath for the Read, Update, and Delete routes. Additionally some other operations such as bulk reassign and initiate agent setup fall under theagents
domain./api/observability/slos
, presumably this allows for other operations or CRUD routes to be created under the observability domain. However, the Synthetics APIs notably do not use theobservability
domain and instead use the top-levelsynthetics
domain formonitors
andparams
.