brooklyn.storage.softlayer.slapi.sh Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brooklyn-clocker-docker Show documentation
Show all versions of brooklyn-clocker-docker Show documentation
Clocker Brooklyn entities and locations for Docker integration.
#!/bin/sh
APIUSER='shwetas'
APIKEY='12345'
APIENDPOINT='api.softlayer.com/rest/v3'
# escape brackets from bash for object masks
ARGS=$(echo "$@" | sed -e "s/\[/\\\[/g" -e "s/\]/\\\]/g")
# When passing values with POST, the json must look like the following:
# '{"parameters": [THINGS]}'
curl -s --max-time 40 -H 'Accept: application/json' https://$APIUSER:$APIKEY@$APIENDPOINT/SoftLayer_$ARGS | python -m json.tool