Checklist:
This article demonstrates how to locate the credentials and connection information for a service instance that is bound to an application running on Cloud Foundry. This is useful if you need to connect directly to the service in question.
There are three options to retrieve the connection information.
Web Browser & Developer Console
- Access the Console application in your browser.
- Select the organization and space where your service is deployed.
- Under the Services section, locate the service itself.
- Click the Manage link next to the service. The service provider should then display your credentials.
Terminal & CF CLI - Option #1
- Open a terminal.
- Login with cf, select your organization and space.
- Run cf env <app_name>
- The output will show the environment variables accessible to your application which includes the service's credentials. In particular, check the VCAP_SERVICES environment variable.
Terminal & CF CLI - Option #2
- Open a terminal.
- Login with cf, select your organization and space.
- Run cf curl /v2/apps
- This will output a JSON blob. Locate resources → <app_name> → service_bindings_url
- Run cf curl <service_bindings_url>
- This will output a JSON blob for each bound service that includes the credentials.