Skip to content

Instantly share code, notes, and snippets.

@dserodio
Created February 28, 2023 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dserodio/d2bb27140954124a3f8335a7049b76dd to your computer and use it in GitHub Desktop.
Save dserodio/d2bb27140954124a3f8335a7049b76dd to your computer and use it in GitHub Desktop.
Datadog snippets
# 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