Last active
November 8, 2016 22:26
-
-
Save jim80net/19b7ed7bd720996b3082e7587fd61c1c to your computer and use it in GitHub Desktop.
up to CF v245: Query CCDB in Cloud Foundry for the app(s) that correspond to a domain
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
# CF <= v245 | |
USE ccdb; | |
SELECT | |
apps.id AS AppID, | |
apps.name AS AppName, | |
apps.guid AS AppGUID, | |
apps.state AS AppState, | |
routes.id AS RouteID, | |
routes.host as RouteHost, | |
routes.path AS RoutePath, | |
routes.space_id AS SpaceID, | |
spaces.name AS SpaceName, | |
organizations.id AS OrganizationID, | |
organizations.name AS OrganizationName, | |
domains.id AS DomainID, | |
domains.name AS DomainName | |
FROM routes | |
INNER JOIN domains ON routes.domain_id=domains.id | |
INNER JOIN spaces ON routes.space_id=spaces.id | |
INNER JOIN organizations ON spaces.organization_id=organizations.id | |
INNER JOIN apps_routes ON routes.id=apps_routes.route_id | |
INNER JOIN apps ON apps.id=apps_routes.app_id | |
WHERE domains.name='example.com' | |
LIMIT 5; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CF >= v246 use