9

I am trying to login to bluemix account through cloud foundry cli using command CF login and I am getting output as 'API endpoints > ' I tried CF API then I got message as 'No API endpoint set . Use 'cf api' to set an endpoint .' what is the API endpoint ?

vinay
  • 167
  • 1
  • 4
  • 12

2 Answers2

12

The API endpoint is the server your CLI program talks to to execute the commands and obtain information. For IBM Bluemix the API endpoints are documented here.

You could do cf api api.eu-de.bluemix.net to set the endpoint for Bluemix in Frankfurt, Germany. Or cf api api.ng.bluemix.net to configure Dallas, USA, as endpoint. See the above linked documentation for the full list of Bluemix Public. Bluemix Dedicated and Bluemix Local have other API endpoints.

You can also set the api endpoint and login using just one command using, e.g. for the Dallas, USA, endpoint:

cf login -a https://api.ng.bluemix.net
data_henrik
  • 16,724
  • 2
  • 28
  • 49
6

Alternatively you can use new API endpoints:

https://api.us-south.cf.cloud.ibm.com
https://api.eu-gb.cf.cloud.ibm.com
https://api.eu-de.cf.cloud.ibm.com
https://api.au-syd.cf.cloud.ibm.com

with:

cf login -a <API_ENDPOINT>

or you can use ibmcloud cli:

ibmcloud login -a 'https://cloud.ibm.com' -r 'us-south'
ibmcloud target --cf-api 'https://api.us-south.cf.cloud.ibm.com'
To Kra
  • 3,344
  • 3
  • 38
  • 45