Skip to content

Instantly share code, notes, and snippets.

@bacongobbler
Last active December 18, 2015 08:19
Show Gist options
  • Save bacongobbler/5752975 to your computer and use it in GitHub Desktop.
Save bacongobbler/5752975 to your computer and use it in GitHub Desktop.
Script to make calls to the Stackato API
#!/bin/sh
TARGET=$(cat ~/.stackato/client/target)
TOKEN=$(json < ~/.stackato/client/token [\"$TARGET\"])
curl -X $1 --silent -k --header "Authorization:${TOKEN}" $TARGET$2
@bacongobbler
Copy link
Author

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#installation

You have to also be logged into a cluster via stackato target && stackato login.

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