Skip to content

Instantly share code, notes, and snippets.

@adampats
Created June 24, 2015 21:59
Show Gist options
  • Save adampats/485c6783452f9ced7f3b to your computer and use it in GitHub Desktop.
Save adampats/485c6783452f9ced7f3b to your computer and use it in GitHub Desktop.
One liner: Dump NSX Security Groups JSON to file
read -p "Username: " user; read -s -p "Password: " pass; curl -k -X GET https://nsxmanager.domain/api/2.0/services/securitygroup/scope/globalroot-0 -H "Accept: application/json" -u $user:$pass | jq . > prod-nsx-sgs.json
@adampats
Copy link
Author

Requires jq.

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