Project

apigee_cli

0.0
No commit activity in last 3 years
No release in over 3 years
A CLI for Apigee
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
~> 0.10.1
~> 0.6.3
~> 10.4
~> 3.1
~> 1.21.0

Runtime

~> 0.9.1
~> 1.2
~> 3.3
~> 0.13
~> 0.19
 Project Readme

ApigeeCli

An API Wrapper and CLI for Apigee

Installation

Add this line to your application's Gemfile:

gem 'apigee_cli'

And then execute:

$ bundle
$ npm install -g apigeetool # this makes use of the apigeetool JS library

Or install it yourself as:

$ gem install apigee_cli

Setting up your User Credentials

Assuming you have an Apigee account, set your user credentials in ~/.apigeerc:

org: APIGEE_ORG
username: APIGEE_USERNAME
password: APIGEE_PASSWORD
environment: ENVIRONMENT

Commands

Top level commands

Commands:
  apigee apigeetool [COMMAND]  # Run a command using the apigeetool Node.js module
  apigee config [COMMAND]      # Run a command within the context of an app configuration
  apigee help [COMMAND]        # Describe available commands or one specific command
  apigee resource [COMMAND]    # Run a command within the context of a resource
  apigee settings              # Show the current apigeerc settings
  apigee version               # Shows the Apigee CLI version number

To see sublevel commands, you can run:

apigee help apigeetool
apigee help config
apigee help resource

Usage

A. Deployment (leverages apigeetool Node.js module)

apigee apigeetool listdeployments [DEFAULT]

# by environment
$ apigee apigeetool listdeployments -e=ENVIRONMENT

# by proxy name
$ apigee apigeetool listdeployments -n PROXY_NAME

apigee apigeetool deploy

$ apigee apigeetool deploy -e=ENVIRONMENT -n PROXY_NAME -d ROOT_DIR_OF_PROXY -V

apigee apigeetool nodedeploy

$ apigee apigeetool nodedeploy -e=ENVIRONMENT -n NODE_PROXY_NAME -d ROOT_DIR_OF_NODE_PROXY -m MAIN_JS_FILE -b BASE_PATH -v secure

apigee apigeetool undeploy

$ apigee apigeetool undeploy -e=ENVIRONMENT -n PROXY_NAME -D

apigee apigeetool fetchproxy

$ apigee apigeetool fetchproxy -n PROXY_NAME -r REVISION_NUMBER

apigee apigeetool delete

NOTE: This deletes all revisions of PROXY_NAME. It is an error to delete a proxy that still has deployed revisions. Revisions must be undeployed using "undeploy" before this command may be used.

$ apigee apigeetool delete -n PROXY_NAME

apigee apigeetool getlogs [from a Node app]

$ apigee apigeetool getlogs -e=ENVIRONMENT -n NODE_PROXY_NAME

B. Configuration Settings on Apigee Server

apigee config list [DEFAULT]

# defaults
-e=test|--environment=test

# List configs for default environment of test
$ apigee config list

# List config for a particular config_name
$ apigee config list --config_name=configuration_one

apigee config push

# defaults
-e=test|--environment=test
--config_name=configuration

# Create config key-value map
$ apigee config push --config_name=new_config

# Update config key-value pair
$ apigee config push key_one=value_one

# Overwrite existing config key-value pair
$ apigee config push key_one=changed_value_one --overwrite=true

apigee config delete

# defaults
-e=test|--environment=test
--config_name=configuration

# Delete config key-value pair (default config_name is configuration)
$ apigee config delete --entry_name=key_one

# Delete config for that config_name
$ apigee config delete --config_name=configuration_one

C. Resource Files on Apigee Server

apigee resource list [DEFAULT]

# List resource files for organization
$ apigee resource list

# Get resource file with resource_name
$ apigee resource list --name=testing.js

apigee resource upload

# Upload resource files from resource_folder
$ apigee resource upload --folder=jsc

# Upload specific resource file from resource folder
$ apigee resource upload --folder=jsc --name=testing.js

apigee resource delete

# Delete resource file of resource_name
$ apigee resource delete --name=testing.js

Contributing

  1. Fork it ( http://github.com//apigee_cli/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request