Last active
December 18, 2015 08:19
-
-
Save bacongobbler/5752975 to your computer and use it in GitHub Desktop.
Script to make calls to the Stackato API
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
#!/bin/sh | |
TARGET=$(cat ~/.stackato/client/target) | |
TOKEN=$(json < ~/.stackato/client/token [\"$TARGET\"]) | |
curl -X $1 --silent -k --header "Authorization:${TOKEN}" $TARGET$2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requirements:
sudo apt-get update && sudo apt-get install curl
Also needs
json
available in your terminal: https://github.com/trentm/json/blob/master/README.md#installationYou have to also be logged into a cluster via
stackato target && stackato login
.