promscale
promscale copied to clipboard
Deleting non-existing metric using delete_series API returns "Status:OK"
curl --insecure -X POST -g 'http://localhost:9201/delete_series?match[]=metric_that_doesnt_exists'
Actual Behavior: {"status":"OK","data":"deleted [] series IDs from [] metrics, affecting 0 rows in total."}
Expected Behavior: It would be preferable if the response could include the fact that the metric does not exist.
I am not sure that returning a status non-OK will be best since deletion of data is sometimes, implemented as part of CI where deleting an already deleted series happens, in which case it will error if we return non-OK. What we can rather do, have a param as error-on-not-found=true
and based on this bool, we change the status if not found. Will that work?
Whatever you decide, I only suggested that the API response should make it clear if a non-existing metric is attempted to be deleted.
closing this issue, as we haven’t received multiple requests from users for this feature and it's quite stale! :)
If you still have a need for this, Please open a new issue.
Thanks!