elastic / kibana

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

API does not provide sufficient feedback #184123

Open slawomirbabicz opened 5 months ago

slawomirbabicz commented 5 months ago

Kibana version: 8.13.3 Elasticsearch version: 8.13.3

Describe the bug: API does not provide HTTP status code while deleting

Steps to reproduce: Run in the Kibana's dev tools

  1. Enable default monitoring rules POST kbn:/api/monitoring/v1/alerts/enable?per_page=10000
  2. Get existing monitoring rules: GET kbn:/api/alerting/rules/_find?search_fields=consumer&search=monitoring
  3. Try to run delete query using either curl or any other programming language. POST kbn:/api/alerting/rule/c0ee348b-0eb9-44e3-b5af-a0fe06864229/_disable or DELETE kbn:/api/alerting/rule/c0ee348b-0eb9-44e3-b5af-a0fe06864229

There is no response status code or anything like that returned correctly.

Expected behavior: Respond with a json, eg: {"status": "disabled"}

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

elasticmachine commented 4 months ago

Pinging @elastic/kibana-core (Team:Core)

elasticmachine commented 4 months ago

Pinging @elastic/response-ops (Team:ResponseOps)

cnasikas commented 1 month ago

Hey @slawomirbabicz! Both the Disable rule API and the Delete rule API return a 204 status code and an empty content (which is intentional).