Skip to content

Instantly share code, notes, and snippets.

@ale7714
Created February 1, 2017 20:31
Show Gist options
  • Save ale7714/b3e46c781bab06d54215919e63f41b60 to your computer and use it in GitHub Desktop.
Save ale7714/b3e46c781bab06d54215919e63f41b60 to your computer and use it in GitHub Desktop.
Script to copy Screendashboard to a new Datadog account
#!/bin/sh
# inspired from https://gist.github.com/lrascao/f57312ff33b799c4c0db56b10e80fe26
app_key="$1"
api_key="$2"
screen_id="$3"
request_url="https://app.datadoghq.com/api/v1/screen/$screen_id?api_key=$api_key&application_key=$app_key"
curl -X GET "$request_url" > screen.json
read -p "New app key: " napp_key
read -p "New api key: " napi_key
curl -X POST -H "Content-type: application/json" -d @screen.json "https://app.datadoghq.com/api/v1/screen?api_key=$napi_key&application_key=$napp_key"
@ale7714
Copy link
Author

ale7714 commented Feb 1, 2017

This script should be improved to delete main id from screen.json. Will update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment