Created
February 28, 2023 18:27
-
-
Save dserodio/d2bb27140954124a3f8335a7049b76dd to your computer and use it in GitHub Desktop.
Datadog snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Posted by Benjamin Lush on Datadog Slack | |
# | |
# I haven't tested it yet | |
import requests | |
url = "https://app.datadoghq.com/api/v1/dashboard_search?with_suggested=true&query=in%3Apreset_dashboard_list%2F1%20&start=0&count=1&sort=" | |
result = requests.get(url, headers).json() | |
count = 50 | |
for index in range(int(result['total']) // count + 1): | |
url = "https://app.datadoghq.com/api/v1/dashboard_search?with_suggested=true&query=in%3Apreset_dashboard_list%2F1%20&start={START}&count={COUNT}&sort=".format(START=index*count, COUNT=count) | |
result = requests.get(url, headers).json() | |
for d in dashboards: | |
if d['popularity'] == 0: | |
print(d['title']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment