Use Apigee Managent APIs to list all products by proxies and all proxies by products
In this repo is a simple Node.js script that uses Apigee X Management APIs to list all the proxies within the org and the associated products for each as well as the products within the org and the associated proxies for each. For products by proxies I am using a popular NPM library, apigee-edge-js. For proxies by products I am using the raw HTTPS Apigee X Management APIs.
To run the script, follow these steps:
- Download and install Node.js and npm to your computer
- Download and install the gcloud tool to your computer. Sign into the tool using the command
gcloud init
- Clone this repository and using your machine's command line terminal navigate to the appropriate folder
- Using the gcloud tool, print your OAuth token using the following command
gcloud auth print-access-token
. Copy this value for the next step - Create a file called
.env
and within it write the following key value pairs
org=[YOUR_APIGEE_ORG]
token=[YOUR_GOOGLE_OAUTH_TOKEN]
- From your terminal, run the command
npm i
to install the needed dependencies - From your terminal, run the command
npm start
to run the application - Finally, navigate to http://localhost:8080 to run the script and see the results.