mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
## Summary This adds basic Lens CRUD api routes using the Content Management system. | Operation | URI | |--------|--------| | Create | `POST api/lens/visualizations` | | Get | `GET api/lens/visualizations/{id}` | | Search | `GET api/lens/visualizations?query=test` | | Update | `PUT api/lens/visualizations/{id}` | | Delete | `DELETE api/lens/visualizations/{id}` | ### Changes to Lens Content Management The custom `update` method uses `soClient.create` under the hood for reasons (i.e. #160116). However, doing this acts as an update or create method with the provided `id`. I changed this behavior so now any update where the id is not found will return a `404` error. Closes #221941 Closes #221942 - OpenAPI docs auto generate from route schema ### Testing You can testing this locally in kibana dev console like so... ``` GET kbn:/api/lens/visualizations/<id>?apiVersion=1 ``` > The `apiVersion` query param is needed to test `internal` api routes. ## Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co> |
||
---|---|---|
.. | ||
codeql | ||
ISSUE_TEMPLATE | ||
updatecli/values.d | ||
workflows | ||
CODEOWNERS | ||
ISSUE_TEMPLATE.md | ||
paths-labeller.yml | ||
PULL_REQUEST_TEMPLATE.md | ||
relabel.yml | ||
stale.yml |