C_CPE_2409 · Question #67
Which command is used to set the API endpoint in the Cloud Foundry CLI?
The correct answer is D. cf api. cf api is correct because it is the dedicated Cloud Foundry CLI command for setting (or viewing) the API endpoint URL of a Cloud Foundry instance - for example, cf api https://api.example.com. Without this step, the CLI has no target platform to communicate with. Why the…
Question
Which command is used to set the API endpoint in the Cloud Foundry CLI?
Options
- Acf login
- Bcf target
- Ccf endpoint
- Dcf api
How the community answered
(30 responses)- A7% (2)
- B3% (1)
- C3% (1)
- D87% (26)
Explanation
cf api is correct because it is the dedicated Cloud Foundry CLI command for setting (or viewing) the API endpoint URL of a Cloud Foundry instance - for example, cf api https://api.example.com. Without this step, the CLI has no target platform to communicate with.
Why the distractors are wrong:
- A.
cf loginauthenticates you (username/password/SSO) against an already-configured endpoint - it does not set the endpoint itself. - B.
cf targetswitches your active org and space after you're already logged in; it does not configure the API URL. - C.
cf endpointis not a real Cloud Foundry CLI command and does not exist.
Memory tip: Think of cf api as "telling the CLI where the API lives" - it's always the first command you run before cf login, so API → Login → Target is the natural setup sequence to remember.
Topics
Community Discussion
No community discussion yet for this question.