Skip to content

Instantly share code, notes, and snippets.

@tomkinsc
Created April 15, 2023 08:41
Show Gist options
  • Save tomkinsc/7619aa52b0ef4468a00dd11c07c74c28 to your computer and use it in GitHub Desktop.
Save tomkinsc/7619aa52b0ef4468a00dd11c07c74c28 to your computer and use it in GitHub Desktop.
#!/bin/bash
# First get auth token: https://api.firecloud.org/#/Profile/getProxyGroup
# Check to see if a pipe exists on stdin.
if [ -p /dev/stdin ]; then
while IFS= read emailaddress; do
printf "$emailaddress\t"
curl -X 'GET' \
"https://api.firecloud.org/api/proxyGroup/$(echo $emailaddress | sed 's/@/%40/')" \
-H 'accept: application/json' \
-H 'Authorization: Bearer AUTH_TOKEN_HERE' | sed 's/"//g'
echo ""
done
else
echo "No input was piped to script"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment