Search code examples
authenticationibm-cloudapiconnect

Bluemix APIConnect Publishing a loopback project from command line


I am following the APIC tutorial documented here:

Publishing a project from the command line

I have gone through the steps in the tutorial to get into the APIConnect dashboard in Bluemix and into the Sandbox catalog.

I get the baseURL under api management:

e.g. https://api.us.apiconnect.ibmcloud.com/FREDusibmcom-dev/sb

Then I use that to

apic config:set 
catalog=apic-catalog://api.us.apiconnect.ibmcloud.com/orgs/FREDusibmcom-dev/catalogs/sb 
app=apic-app://api.us.apiconnect.ibmcloud.com/orgs/FREDusibmcom-dev/apps/acme-bank-Fred

After this as per the instructions, I try to login using my Bluemix credentials

apic login --server api.us.apiconnect.ibmcloud.com -u fred -p mypassword

This fails with:

ERROR Login to api.us.apiconnect.ibmcloud.com failed, please verify the servername and credential

Am I doing something wrong in regards to the servername or credentials that I am using? Thanks!


Solution

  • For your server argument in the login command, use us.apiconnect.ibmcloud.com instead. I think the api portion is throwing things off.

    Once successful there, I also recommend that you run apic edit and proceed to Log in with Bluemix there, as that will ensure that you're able to publish applications to Bluemix from the CLI or API Designer.