Coder Social home page Coder Social logo

apigee-edge-js-examples's Introduction

apigee-edge-js-examples's People

Contributors

dinochiesa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

apigee-edge-js-examples's Issues

findAppForProxy.js : TypeError: Cannot read properties of undefined (reading 'indexOf')

Hi @DinoChiesa ,

Hope you are doing great!

I came across a requirement to retrieve all app's associated to a API Product or Proxy , I found these scripts in git. but unfortunately both the scripts giving me below error. Required libraries were installed. I'm using other scripts like listProduct.js, listProxy.js etc. without issue. Only for "find" js scripts, I'm facing this issue. Kindly suggest?

findAppForProxy.js
Command executed: node .\findAppForProxy.js -o $ORG -P testapi --apigeex apigee.googleapis.com --token $token
Parameters passed:
--token ApigeeX gcloud access token
-P Proxy name "testapi"

node .\findAppForProxy.js -o $ORG -P testapi --apigeex apigee.googleapis.com --token $token
Apigee Edge findAppForProxy.js tool, version: 20190211-1313
Node.js v20.11.1

[2024-Mar-18 12:23:43] start
[2024-Mar-18 12:23:43] searching...
[2024-Mar-18 12:23:44] total count of API products for that org: 105
C:\Users\Desktop\git-repos\apigee-edge-js-examples\findAppForProxy.js:65
return (product.proxies.indexOf(opt.options.proxy) >= 0);
^

TypeError: Cannot read properties of undefined (reading 'indexOf')
at C:\Users\Desktop\git-repos\apigee-edge-js-examples\findAppForProxy.js:65:35
at Array.filter ()
at C:\Users\Desktop\git-repos\apigee-edge-js-examples\findAppForProxy.js:64:40
at Request._callback (C:\Users\Desktop\git-repos\apigee-edge-js-examples\node_modules\apigee-edge-js\lib\common.js:91:7)
at self.callback (C:\Users\Desktop\git-repos\apigee-edge-js-examples\node_modules\postman-request\request.js:311:12)
at Request.emit (node:events:518:28)
at Request. (C:\Users\Desktop\git-repos\apigee-edge-js-examples\node_modules\postman-request\request.js:1577:10)
at Request.emit (node:events:518:28)
at IncomingMessage. (C:\Users\Desktop\git-repos\apigee-edge-js-examples\node_modules\postman-request\request.js:1448:12)
at Object.onceWrapper (node:events:632:28)
at IncomingMessage.emit (node:events:530:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

findAppForApiProduct.js
Same issue when using findAppForApiProduct.js:
Command executed: node .\findAppForApiProduct.js -o $ORG -P testapi-product --apigeex apigee.googleapis.com --token $token
Parameters passed:
--token ApigeeX gcloud access token
-P Product name "testapi-product"

Apigee findAppForApiProduct.js tool, version: 20220929-0953
Node.js v20.11.1

[2024-Mar-15 12:46:39] start
[2024-Mar-15 12:46:39] connect: {"orgname":"dev","loginBaseUrl":"https://login.apigee.com","user":null,"mgmtServer":"https://apigee.googleapis.com"}
[2024-Mar-15 12:46:39] searching...
[2024-Mar-15 12:46:39] GET https://apigee.googleapis.com/v1/organizations/dev/apps?expand=true
[2024-Mar-15 12:47:00] status: 200
[2024-Mar-15 12:47:00] total count of apps for that org: 26
while executing, error: TypeError: Cannot read properties of undefined (reading 'find')
at C:\Users\Desktop\git-repos\apigee-edge-js-examples\findAppForApiProduct.js:66:30
at Array.filter ()
at C:\Users\Desktop\git-repos\apigee-edge-js-examples\findAppForApiProduct.js:65:58
at Array.filter ()
at C:\Users\Desktop\git-repos\apigee-edge-js-examples\findAppForApiProduct.js:64:33
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Thanks In Advance for your support.

Regards,
Yuvi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.