Last active
September 1, 2017 23:10
-
-
Save boina-n/08e24964d1c6ac73a0fd0b8fe7575fef to your computer and use it in GitHub Desktop.
[CloudFoundry][API][ROUTES] - list all routes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for space_guid in `cf curl /v2/spaces | jq -r ".resources[].metadata.guid"` | |
do | |
routes_url=$(cf curl /v2/spaces/$space_guid | jq -r ".entity.routes_url") | |
for route in $(cf curl $routes_url | jq -r ".resources[].metadata.guid") | |
do | |
hostname=$(cf curl /v2/routes/$route | jq -r ".entity.host") | |
domain_guid=$(cf curl /v2/routes/$route | jq -r ".entity.domain_guid") | |
domaine_name=$(cf curl /v2/domains/$domain_guid | jq -r ".entity.name") | |
echo $hostname"."$domaine_name | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment