Skip to content

Instantly share code, notes, and snippets.

@n8felton
Created March 23, 2018 12:46
Show Gist options
  • Save n8felton/9c49bac4f16c8da6f128bd401aa1a839 to your computer and use it in GitHub Desktop.
Save n8felton/9c49bac4f16c8da6f128bd401aa1a839 to your computer and use it in GitHub Desktop.
DeployStudio API Notes
# Replace with the username and password of an account that has access to your DeployStudio instances
python -c 'import base64; print "Authorization: Basic %s" % base64.b64encode("USERNAME:PASSWORD")'
# Authorization: Basic VVNFUk5BTUU6UEFTU1dPUkQ=
AUTH="Authorization: Basic VVNFUk5BTUU6UEFTU1dPUkQ="
SERVER="https://localhost:60443"
# Grab the workflows (as a binary plist), convert them to XML, and dump to stdout
curl -sk -X GET \
-H "${AUTH}" \
"${SERVER}/workflows/get/all" \
| plutil -convert xml1 -o - -
# Request a specific workflow based on ID
curl -sk -X GET \
-H "${AUTH}" \
"${SERVER}/workflows/get/entry?id=FA2868F6-B3C4-4845-BC97-9CE5B6FA5775" \
| plutil -convert xml1 -o - -
# List all the computers
curl -sk -X GET \
-H "${AUTH}" \
"${SERVER}/computers/get/all" \
| plutil -convert xml1 -o - -
# Grab a specific computers
curl -sk -X GET \
-H "${AUTH}" \
"${SERVER}/computers/get/entry?id=D24DQ000DKQ4" \
| plutil -convert xml1 -o - -
curl -sk -X GET \
-H "${AUTH}" \
"${SERVER}/computers/groups/get/all" \
| plutil -convert xml1 -o - -
curl -sk -X GET \
-H "${AUTH}" \
"${SERVER}/computers/groups/get/entry?id=Library" \
| plutil -convert xml1 -o - -
curl -sk -X GET \
-H "${AUTH}" \
"${SERVER}/computers/groups/get/default" \
| plutil -convert xml1 -o - -
curl -sk -X GET \
-H "${AUTH}" \
"${SERVER}/computers/status/get/all" \
| plutil -convert xml1 -o - -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment