Issue with bulk download of APIs from Apigee

I found this node js utility for exporting all APIs in an org - https://community.apigee.com/questions/1622/can-i-do-a-bulk-download-of-apigee-edge-proxies.html. It worked for downloading the APIs from edge. However, when i try to use it for an on-prem setup, i am having the below issue - HTTP 401 error. I am using the same credentials as used to login to the mgmt UI.

@DinoAny pointers on what could be wrong here?

I am invoking the node script as

>node bulkExportApis.js --mgmtserver=http://apisb01.test.com --username=xxxx@xxx.com --password=xxxxx --org=sandbox -v

I see the below console output for the error

[2018-Nov-27 15:43:54] connect: {"orgname":"sandbox","user":"xxxx@xxx.com","loginBaseUrl":"https://login.apigee.com","mgmtServer":"http://apisb01.test.com","urlBase":"http://apisb01.test.com/v1/o/sandbox","requestHeaders":{"accept":"application/json"},"verbosity":true} [2018-Nov-27 15:43:54] found no stashed token. [2018-Nov-27 15:43:54] POST https://login.apigee.com/oauth/token [2018-Nov-27 15:43:54] status: 401 [2018-Nov-27 15:43:54] POST error: {"error":"bad status","statusCode":401} [2018-Nov-27 15:43:54] { "error": "bad status", "statusCode": 401 }

0 2 124
2 REPLIES 2

Hi @Nagashree B, in the console output, I see that "loginBaseUrl":"https://login.apigee.com and POST https://login.apigee.com/oauth/token is still pointing to Apigee Cloud URL.

Maybe this needs to be changed to your on-prem login url. But I dont see any option in the bulkExportApis module.

++ @Anil Sagar @ Google

Yes @Siddharth Barahalikar, I noticed the same too. I am unable to override that value. apigeeEdge node module is not considering that as an input parameter