About apigeecli
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.
Installation
apigeecli is a binary and you can download the appropriate one for your platform from here. Run this script to download & install the latest version (on Linux or Darwin)
curl -L https://raw.githubusercontent.com/apigee/apigeecli/main/downloadLatest.sh | sh -Getting Started
User Tokens
The simplest way to get started with apigeecli is
token=$(gcloud auth print-access-token)
apigeecli orgs list -t $tokenMetadata OAuth2 Access Tokens
If you are using apigeecli on Cloud Shell, GCE instances, Cloud Build, then you can use the metadata to get the access token
apigeecli orgs list --metadata-tokenGoogle Default Application Credentials
You can configure gcloud to setup/create default application credentials. These credentials can be used by apigeecli.
gcloud auth application-default login
apigeecli orgs list --default-tokenor through impersonation
gcloud auth application-default login --impersonate-service-account <SA>
apigeecli orgs list --default-token