Re: CF // Login using REST API

Daniel Mikusa

On Mon, Jul 27, 2015 at 4:58 AM, Brena, Juan Antonio (ext) <
juan.brena.external(a)> wrote:

Good morning,

I have installed CF using the following installer:

Using the following request:

** <>

Y receive the following information:

"name": "vcap",
"build": "2222",
"support": "",
"version": 2,
"description": "Cloud Foundry sponsored by Pivotal",
"authorization_endpoint": "https://uaa.",
"token_endpoint": "https://uaa.",
"min_cli_version": null,
"min_recommended_cli_version": null,
"api_version": "2.25.0",
"logging_endpoint": "wss://loggregator."

I would like to know, how to get a token (Login process) to get apps:

** <>

Many thanks in advance.

If you just want to login and use your system, install the cf cli.

Then run `cf api` followed by `cf login`. This will
prompt you for your credentials. I can't recall what that installer set's
up, but it'll be something like admin / admin or admin / admin-secret.
Check the docs, it'll probably say.

For additional help with cf, run `cf -h` to see the available commands or
`cf command -h` to get details on a particular command.

If you want to login programmatically (like if you're going to write an app
to interact with CF) then you need to go through one of the Oauth2 work
flows. If you're unfamiliar with Oauth2, google has lots of resources on
the flows and how it works.

As far as CF, a couple things to get you started...

1.) Run `CF_TRACE=true cf login` (or `set CF_TRACE=true` followed by `cf
login` on Windows) and watch the output. It'll dump the HTTP request and
response data, so you can see how the cli does it.

2.) Beyond that, more detail can be found here.

I have found this particular document to be useful.

and of course, post any follow up questions to the list.



cf-dev mailing list

Join { to automatically receive all group messages.