This is a tool to interact with Apigee APIs for Apigee hybrid and Apigee's managed offering. The tool lets you manage (Create,Get, List, Update, Delete, Export and Import) Apigee entities like proxies, products etc. The tools also helps you create Service Accounts in Google IAM to operate Apigee hybrid runtime.
To install via brew,
brew tap srinandan/homebrew-tap
brew install apigeecli
apigeecli
is a binary and you can download the appropriate one for your platform from here
NOTE: Supported platforms are:
- Darwin
- Windows
- Linux
You must have an account on Apigee to perform any apigeecli
functions. These functions include: proxies, API Products, Environments, Org details etc.
You need to be familiar with basic concepts and features of Apigee such as API proxies, organizations, and environments.
For more information, refer to the Apigee API Reference.
Create a service account with appropriate persmissions. Use apigeecli
to create service accounts (apigeecli iam
). Read more here
apigeecli
can use the service account directly and obtain an access token.
apigeecli token gen -a serviceaccount.json
Parameters The following parameters are supported. See Common Reference for a list of additional parameters.
--account -a
(required) Service Account in json format
Use this access token for all subsequent calls (token expires in 1 hour)
The following options are available for security
Pass the access token
apigeecli <flags> -t $TOKEN
Pass the service account
apigeecli <flags> -a orgadmin.json
apigeecli
caches the OAuth Access token for subsequent calls (until the token expires). The access token is stored in $HOME/.apigeecli
. This path must be readable/writeable by the apigeecli
process.
apigeecli token cache -a serviceaccount.json
or
apigeecli orgs get -o org-name -a serviceaccount.json
Subsequent commands do not need the token or service account flag
Users can set a default org via preferences and that org name will be used for all subsequent commands
apigeecli prefs set -o org-name
apigeecli orgs get
NOTE: the second command uses the org name from perferences
apigeecli is can also be used as a golang based client library. Look at this sample for more details
Use apigecli via docker
docker run --name apigeecli -v path-to-service-account.json:/etc/client_secret.json --rm nandanks/apigeecli:v{Tag} orgs list -a /etc/client_secret.json
Here is a list of available commands
This is not an officially supported Google product