npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

apigee-deploy

v2.1.3

Published

Deploy the API proxy

Downloads

1

Readme

Sure, let's integrate the examples along with the commands.


apigee-deploy

apigee-deploy is a package designed to deploy API proxies, shared flows, target servers, developers, products, environments, flow hooks, and apps to Apigee X or Apigee hybrid.

Installation

To install apigee-deploy globally as a command-line tool, use:

npm install -g apigee-deploy

For using it as a library in your Node.js project:

npm install apigee-deploy

Usage

Importing the Package

const apigee = require("apigee-deploy");

API Usage

Deploy API proxies:

apigee.proxyDeploy(path, token, organization, environment, proxy);

Deploy shared flows:

apigee.sharedFlowDeploy(path, token, organization, environment, sharedFlow);

Command Line Usage

Deploy a proxy:

apigee-deploy [path] -r proxy -t [token] -o [organization] -p [proxy] -e [environment]

Deploy a shared flow:

apigee-deploy [path] -r sharedflow -t [token] -o [organization] -s [sharedFlow] -e [environment]

Other Operations

Commands for target servers, developers, products, environments, flow hooks, and apps are available. Here are some examples:

  • Create a target server:
apigee-targetserver-create -d '{  "host": "test2.com",  "port": 443,  "name": "test22",  "isEnabled": true,  "description": "testing"}' -t $(gcloud auth print-access-token) -o organizationName -e eval -n test22
  • Delete a target server:
apigee-targetserver-delete -t $(gcloud auth print-access-token) -o organizationName -e eval -n test4
  • Update a target server:
apigee-targetserver-update -d '{  "host": "test2.com",  "port": 443,  "name": "test4",  "isEnabled": true,  "description": "testing"}' -t $(gcloud auth print-access-token) -o organizationName -e eval -n test4
  • Update target server list:
apigee-targetserver-list-update -nf "$(cat /home/karthik/new.json)" -of "$(cat /home/karthik/old.json)" -t $(gcloud auth print-access-token) -o organizationName -e eval
  • Create a developer app:
apigee-app-create -t $(gcloud auth print-access-token) -o organizationName -d '{"name": "Test"}' -de [email protected]
  • Deploy a proxy:
apigee-deploy "/home/karthik/apigee-ci-cd-repo1/src/main/apigee/apiproxies/ECHO-proxy" -r proxy -t $(gcloud auth print-access-token) -o organizationName -e eval -p helloWorld
  • Update developer details:
apigee-developer-update -t $(gcloud auth print-access-token) -o organizationName -de '[email protected]' -d '{"email": "[email protected]","userName": "nkl963","firstName": "Nikhil","lastName": "D K"}'
  • Delete a developer:
apigee-developer-delete -t $(gcloud auth print-access-token) -o organizationName -de '[email protected]'
  • Create a developer:
apigee-developer-create -t $(gcloud auth print-access-token) -o organizationName -d '{"email": "[email protected]","userName": "nkl963","firstName": "Nikhil","lastName": "D K"}'
  • Get a list of developers:
apigee-developer-get-list -t $(gcloud auth print-access-token) -o organizationName
  • Compare and update developer list:
apigee-developer-list-update -nf "$(cat ./curr_developers.json)" -of "$(cat ./prev_developers.json)" -t $(gcloud auth print-access-token) -o organizationName
  • Create a product:
apigee-product-create -t $(gcloud auth print-access-token) -o organizationName -d '{     "approvalType": "auto",     "displayName": "myProduct",     "environments": [         "eval"     ],     "apiResources": [],     "createdAt": 0,     "attributes": [],     "description": "",     "name": "myProduct",     "quotaCounterScope": "PROXY" } '
  • Get a list of products:
apigee-product-get-list -t $(gcloud auth print-access-token) -o organizationName
  • Update a product:
apigee-product-update -t $(gcloud auth print-access-token) -o organizationName -d '{     "approvalType": "auto",     "displayName": "changeName",     "environments": [         "eval"     ],     "apiResources": [],     "createdAt": 0,     "attributes": [],     "description": "",     "name": "myProduct",     "quotaCounterScope": "PROXY" } ' -n myProduct
  • Delete a product:
apigee-product-delete -t $(gcloud auth print-access-token) -o organizationName -n myProduct
  • Compare and update product list:
apigee-product-list-update -nf "$(cat /home/testVal/development/new.json)" -of "$(cat /home/testVal/development/old.json)" -t $(gcloud auth print-access-token) -o organizationName
  • Create an environment:
apigee-environment-create -t $(gcloud auth print-access-token) -o organizationName -d '{     "apiProxyType": "Programmable",     "deploymentType": "DEPLOYMENT_TYPE_UNSPECIFIED",     "description": "",     "displayName": "Eval-01",     "forwardProxyUri": "",     "hasAttachedFlowHooks": false,     "name": "dev",     "properties": {},     "type": "ENVIRONMENT_TYPE_UNSPECIFIED" } '
  • Get a list of environments:
apigee-environment-get-list -t $(gcloud auth print-access-token) -o organizationName
  • Update an environment:
apigee-environment-update -t $(gcloud auth print-access-token) -o organizationName -d '{     "apiProxyType": "Programmable",     "deploymentType": "DEPLOYMENT_TYPE_UNSPECIFIED",     "description": "",

     "displayName": "newName",     "forwardProxyUri": "",     "hasAttachedFlowHooks": false,     "name": "dev",     "properties": {},     "type": "ENVIRONMENT_TYPE_UNSPECIFIED" }  ' -n dev
  • Delete an environment:
apigee-environment-delete -t $(gcloud auth print-access-token) -o organizationName -n dev
  • Get flow hook details:
apigee-flowHook-get-details -t $(gcloud auth print-access-token) -o organizationName -e eval -fn PreProxyFlowHook
  • Attach a flow hook:
apigee-flowHook-attach -t $(gcloud auth print-access-token) -o organizationName -e eval -fn PreProxyFlowHook -d '{   "continueOnError": false,   "description": "this is test",   "sharedFlow": "new-sharedflow" }'
  • Detach a flow hook:
apigee-flowHook-detach -t $(gcloud auth print-access-token) -o organizationName -e eval -fn PreProxyFlowHook
  • Compare and update flow hooks:
apigee-flowHook-update -t $(gcloud auth print-access-token) -o organizationName -e "eval"
  • Create an app:
apigee-app-create
  • Get a list of apps:
apigee-app-getList -t $(gcloud auth print-access-token) -o organizationName -de "[email protected]"
  • Update an app:
apigee-app-update -t $(gcloud auth print-access-token) -o organizationName -de "[email protected]" -an "test" -d '{"apiProducts":["changeProduct","test"],"name":"Test"}'
  • Delete an app:
apigee-app-delete -t $(gcloud auth print-access-token) -o organizationName -de "[email protected]" -an "Test"

License

This project is licensed under the MIT License. See the LICENSE file for details.

Issues

If you encounter any issues or have any questions, please create an issue on the GitHub repository.

Authors

This package was created by K.V.Rao and Nikhil D.