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.0 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:

    • Core functionality appears to work, but testing has been limited

    • New --async feature has been introduced and appears to function correctly

    • Fixed issue where user roles were not being downloaded correctly during backups

  • 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.55.1.tar.gz (59.9 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.55.1-py3-none-any.whl (83.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for apigeecli-0.55.1.tar.gz
Algorithm Hash digest
SHA256 bf9981f2a51bf5c8262b60f70edaaef363925366c8e9c3030db2aa7458b6ce4c
MD5 eb633f39fa4ee6c14b0be1c20ce33dca
BLAKE2b-256 8e0325df1be578d1aba66ba086a3a72cf4d3f94e520d33894a3ec5dea6cadc06

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apigeecli-0.55.1-py3-none-any.whl
  • Upload date:
  • Size: 83.8 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.55.1-py3-none-any.whl
Algorithm Hash digest
SHA256 68cf0305243e3b865f9d014b8d6bcaaec9ff74154234ab23e93e6f84dfbdde0c
MD5 b894eaa0bac28a2455bf752fca35e899
BLAKE2b-256 fe448382503b5e9b972bbde1b584e0aa41bd6423983279ae3f2e392b530f6f51

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