Created
February 1, 2017 20:31
-
-
Save ale7714/b3e46c781bab06d54215919e63f41b60 to your computer and use it in GitHub Desktop.
Script to copy Screendashboard to a new Datadog account
This file contains hidden or 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
| #!/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" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script should be improved to delete main
idfrom screen.json. Will update