Hello Team,
I have an requirement to identify the Api proxies using a particular target host
For example:
I have a target host: muleTarget.
Need to get the list of proxies consuming this muleTarget in TargetEndpoint Configurations.
Thanks in advance
This utility will do that.
https://github.com/DinoChiesa/apigee-edge-js-examples/blob/main/findProxyWithHttpTarget.js
It requires node .
Example usage:
node ./findProxyWithHttpTarget.js --apigeex --token $TOKEN -o $ORG \
--filter latest \
--targeturlregexp https://my-mule-target.net
@dchiesa1 I am getting the below error
Error: Cannot find module 'apigee-edge-js'
Require stack:
- C:\Users\aravi\Downloads\findProxyWithHttpTarget.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (C:\Users\aravi\Downloads\findProxyWithHttpTarget.js:22:28)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'C:\\Users\\aravi\\Downloads\\findProxyWithHttpTarget.js' ]
}
you need to run npm install. This is described in the READMe.
Thanks for your reply. Actually, I am using Apigee edge surrounded with zone admin SSO. I am executing the code as mentioned below ending with an error. Requesting your suggestion to take it forward.
C:\Users\aravi\Downloads\apigee-edge-js-examples-main\apigee-edge-js-examples-main>node ./findProxyWithHttpTarget.js -o somayajula1996-eval \ --filter latest \ --targeturlregexp https://my-mule-target.net
Apigee findProxyWithTargetType.js tool, version: 20230925-1013
Node.js v18.18.0
[2023-Sep-27 08:30:56] start
USER NAME : <PII removed by staff>
Password for <PII removed by staff> : ***********
C:\Users\aravi\Downloads\apigee-edge-js-examples-main\apigee-edge-js-examples-main\findProxyWithHttpTarget.js:134
apigee.connect(common.optToOptions(opt))
^
TypeError: Cannot read properties of undefined (reading 'connect')
at Object.<anonymous> (C:\Users\aravi\Downloads\apigee-edge-js-examples-main\apigee-edge-js-examples-main\findProxyWithHttpTarget.js:134:8)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
at node:internal/main/run_main_module:23:47
Node.js v18.18.0
Oh I'm sorry about that
That shouldn't happen.
But if you're using zone SSO, then you should supply not a username + password, but instead an OAuth token.
node ./findProxyWithHttpTarget.js -o somayajula1996-eval \
--token TOKEN \
--filter latest \
--targeturlregexp https://my-mule-target.net
And you would get that token from the get_token utility.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |