Skip to main content

(DEPRECATED) apigeecli simplifies and automates Apigee Edge API usage.

Project description

Python version Downloads License

The Apigee Edge command-line interface is an unofficial Python command-line tool built to simplify and automate Apigee Edge API usage, with support for SSO, MFA, and basic authentication.

Why use this instead of the official tool

While the official Apigee CLI is powerful, this tool was created to better support Darumatic clients’ CI/CD and self-service workflows that were difficult to manage with the official tool, using simple and easily editable code to demonstrate how to leverage the Apigee Admin APIs.

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.

Running Tests

This project uses unittest for testing its codebase. In order to run the tests, you will need to install the coverage.py tool. You can install it using pip:

pip3 install coverage

Once coverage.py is installed, you can run the tests using the runtests script:

./runtests

This script will run all the tests in the tests directory and generate a coverage report.

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.53.11.tar.gz (71.7 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.53.11-py3-none-any.whl (94.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for apigeecli-0.53.11.tar.gz
Algorithm Hash digest
SHA256 5d5b1c35e741aa7f456663a9b75d3e65e12b24ae6f483f0eefa5325f63671012
MD5 dcbc97f61accccbafafa1fc3b95afebc
BLAKE2b-256 800b9301478275f920a73082439b24fa99b8b26395b829692740e5982de7c036

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apigeecli-0.53.11-py3-none-any.whl
  • Upload date:
  • Size: 94.9 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.53.11-py3-none-any.whl
Algorithm Hash digest
SHA256 07a879906ff2b7557d76f59922590f6f2420aecec9c2696a3367a9cd9606f6fa
MD5 c43238a4c7297293e2d84cfdfe8d2bcd
BLAKE2b-256 d8a6124203773e948c00b4dfef973ed91463496422a50aadd820b7595461991d

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