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 files <app_name> logs/env.log
- 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.
Note: This option will not work when the application has been stopped or has failed to stage.
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.
Impact
Please use caution when displaying the credentials from your services. The information will be shown in plain text.