Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api] [monitors] Add option for force delete. #6595

Merged
merged 1 commit into from
Feb 7, 2020
Merged

Conversation

phillip-dd
Copy link
Contributor

What does this PR do?

Adds documentation and examples of using monitor delete with force, these options were added to clients and released:

Motivation

MA-17

Preview link

https://docs-staging.datadoghq.com/pb/mon-del-force/api

Additional Notes

@phillip-dd phillip-dd requested a review from a team as a code owner February 6, 2020 15:45
@@ -8,3 +8,6 @@ monitor_id=<YOUR_MONITOR_ID>

# Delete a monitor
curl -X DELETE "https://api.datadoghq.com/api/v1/monitor/${monitor_id}?api_key=${api_key}&application_key=${app_key}"

# Force delete a monitor
curl -X DELETE "https://api.datadoghq.com/api/v1/monitor/${monitor_id}?force=true&api_key=${api_key}&application_key=${app_key}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: missing new line

Copy link

@athap athap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@iminoso iminoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update!

@zhengshizhao
Copy link
Contributor

zhengshizhao commented Feb 6, 2020

can we also update the code example for ruby client? and also fix typo in the ruby example https://a.cl.ly/z8unyXKr 62_625 => 62625
https://docs-staging.datadoghq.com/pb/mon-del-force/api/?lang=ruby#delete-a-monitor

@phillip-dd
Copy link
Contributor Author

62_625 => 62625

Probably not a typo 😀 , valid ruby syntax, underscores can be used to separate digits, typically done as a replacement for commas for every 3 digits for readability.

@zhengshizhao
Copy link
Contributor

62_625 => 62625

Probably not a typo 😀 , valid ruby syntax, underscores can be used to separate digits, typically done as a replacement for commas for every 3 digits for readability.

ah, thanks for checking that! my bad, will be more careful next time when I comment on any ruby code.

@ykyr
Copy link

ykyr commented Jun 2, 2020

Hi guys,
Are you sure API works according to the documentation?

I'm not able to force delete the monitor (that has reference in composite monitor) via API:
curl -X DELETE "https://api.datadoghq.com/api/v1/monitor/${monitor_id}?force=true&api_key=${api_key}&application_key=${app_key}"

{"errors":["Monitor is part of the following composite monitors: Test composite"]}

@ykyr
Copy link

ykyr commented Jun 11, 2020

Fixed by DD already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants