Skip to main content

User-friendly wrapper for the Apigee Edge admin APIs.

Project description

Python version Downloads License

TL;DR

For a more stable experience, install version 0.53.11 or earlier:

pip install apigeecli==0.53.11

Versions 0.54 and above are maintenance-only releases (refactoring and ad-hoc fixes). See the Forked repository for the current maintained source code.

If you encounter any broken versions, please report them via the Forked repository, thanks.

Maintenance Status

This tool is no longer actively maintained.

It remains usable, but no new features or fixes are planned.

Authentication Support Notice

We exclusively use SSO.

Basic and MFA authentication may still work, but they are no longer tested or guaranteed.

Overview

The Apigee Edge command-line interface is an unofficial Python CLI built to simplify and automate Apigee API usage.

  • Originally built for Darumatic clients

  • Designed for Apigee Edge

  • Supports common API management workflows

Recently Tested

The following commands and features were validated during final updates and refactoring:

Authentication

  • SSO login flow (primary supported method)

  • Basic auth (not actively tested)

  • MFA auth (not actively tested)

Core Functionality

  • list and get subcommands for:

    • apis

    • keyvaluemaps

    • caches

    • targetservers

    • sharedflows

    • apps

  • deploy command for:

    • apis

  • push and delete commands for:

    • keyvaluemaps

    • caches

    • targetservers

  • backups command (appears to work, but only limited testing has been performed)

  • More commands and features will be tested and added here over time.

Deprecation

This tool was designed for Apigee Edge, which is being phased out in favor of Apigee X (ApigeeX).

  • No major enhancements for ApigeeX compatibility are planned

  • Some commands may not fully align with ApigeeX APIs

  • Long-term usage is not recommended for new projects

Recommendation

For new implementations, consider:

  • Official Google Cloud / Apigee tooling

  • Direct ApigeeX API usage

  • Modern CI/CD integrations

This CLI is best suited for:

  • Legacy automation

  • Transitional environments

  • Existing scripts that depend on it

Installation

The easiest way to install apigee-cli is to use pip in a virtualenv:

$ pip install apigeecli

or, if you are not installing in a virtualenv, to install globally:

$ sudo pip install apigeecli

or for your user:

$ pip install --user apigeecli

If you have the apigee-cli installed and want to upgrade to the latest version you can run:

$ pip install --upgrade apigeecli

Getting Started

Before using apigee-cli, you need to tell it about your Apigee Edge credentials. You can do this in three ways:

  • Environment variables

  • Config file

  • Command-line arguments

The steps below show how to use command-line arguments to configure your Apigee Edge credentials.

Basic authentication

$ apigee configure -P default -u MY_EMAIL -p MY_PASS -o MY_ORG -mfa '' -z '' --no-token --prefix ''

Multi-factor authentication (MFA)

$ apigee configure -P default -u MY_EMAIL -p MY_PASS -o MY_ORG -mfa MY_KEY -z '' --no-token --prefix ''

SSO authentication

$ apigee configure -P default -u MY_EMAIL -p none -o MY_ORG -mfa '' -z MY_ZONENAME --no-token --prefix ''

If you are not currently signed in by your identity provider, you will be prompted to sign in:

$ apigee apis list
SSO authorization page has automatically been opened in your default browser.
Follow the instructions in the browser to complete this authorization request.

If your browser did not automatically open, go to the following URL and sign in:

https://{zoneName}.login.apigee.com/passcode

then copy the Temporary Authentication Code.

Please enter the Temporary Authentication Code:

zoneName will be the Identity zone name you previously configured.

Refer to the official Apigee documentation to learn more about how to Access the Edge API with SAML.

Testing your credentials

Run the following command to get a list of API proxies in your default Apigee organization:

$ apigee apis list
["helloworld", "oauth"]

Troubleshooting

If you encounter issues with commands, check the log file for detailed debug information and error messages:

~/.apigee/exceptions.log

This file can help diagnose installation problems, missing dependencies, or errors related to Apigee Edge.

You can also use the verbose flags -v or -vv with commands to see more detailed request information.

SSL / TLS Issues

If you encounter SSL errors such as:

requests.adapters.SSLError

This may be caused by corporate security proxies.

As a workaround, you can disable SSL verification by setting the following environment variable.

export APIGEE_CLI_ENABLE_SSL_VERIFY=false

Plugins (Remote Installation Example)

The following demonstrates how to install plugins from a remote repository (example plugins repo).

You can configure plugin sources in three ways: a one-liner, manual config, or via the CLI.

Option 1: One-liner (quick setup)

echo -e '[sources]\npublic = https://github.com/mdelotavo/apigee-cli-plugins' >> ~/.apigee/plugins/config

Option 2: Interactive CLI configuration

apigee plugins configure -a

This will open your default text editor, allowing you to define remote plugin sources.

If you do not want changes to be automatically applied after saving, run:

apigee plugins configure

In this case, you will need to run the update command manually.

Option 3: Manual configuration

Edit the file ~/.apigee/plugins/config and add:

[sources]
public = https://github.com/mdelotavo/apigee-cli-plugins

Install and manage plugins

Update and install plugins:

apigee plugins update

Inspect available plugins:

apigee plugins show
apigee plugins show -n public

Install required dependencies:

pip install $(apigee plugins show -n public --show-dependencies-only)

Getting Help

Disclaimer

This tool is not affiliated with Apigee or Google and is highly experimental.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apigeecli-0.54.1.tar.gz (59.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apigeecli-0.54.1-py3-none-any.whl (82.3 kB view details)

Uploaded Python 3

File details

Details for the file apigeecli-0.54.1.tar.gz.

File metadata

  • Download URL: apigeecli-0.54.1.tar.gz
  • Upload date:
  • Size: 59.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for apigeecli-0.54.1.tar.gz
Algorithm Hash digest
SHA256 b8bc1166368f8225ae7241b87074342cf00420ac984b436c9bc3926a5f9d2f6d
MD5 93eea1a9ee7795f6e981c000a2917a0c
BLAKE2b-256 245b724c109091eff762d1f88a96b717d2cff19baa492545aea1ba7e13252170

See more details on using hashes here.

File details

Details for the file apigeecli-0.54.1-py3-none-any.whl.

File metadata

  • Download URL: apigeecli-0.54.1-py3-none-any.whl
  • Upload date:
  • Size: 82.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for apigeecli-0.54.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ef78ef646715739beeba8d4d3b22df463fe0f3ce8604140baf268248227ae2c6
MD5 159dc6b6a3f86c4ebeb971b6f4b3a600
BLAKE2b-256 6c01531e3f76b104f007ee138e2f84f0f7b33a6e773b62e1b4a19bbd61b08fb4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page