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, 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.0.tar.gz (58.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.54.0-py3-none-any.whl (82.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apigeecli-0.54.0.tar.gz
  • Upload date:
  • Size: 58.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.54.0.tar.gz
Algorithm Hash digest
SHA256 d52de115e2b0b2ed2583145f5f072343d222de70a64a98bfe2e025da1ebc9389
MD5 23c75ce8368f65f578e0230449126cbb
BLAKE2b-256 7dc9e64cfd4be753c0f6a926354d72a63a8ccdec98028fb91b20231dcf2aefb1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apigeecli-0.54.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6599fe3974164ec0ee2c1ecae72963e1a198949c5bc1f3900406c39b29dbdf58
MD5 71ee5273baa17963e8eb8fa4b387594b
BLAKE2b-256 6df9d36252c52f2c2ca75d4a52c4479351e64be286b7fec927a807a665dab49e

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