Skip to main content

Apigee Management API command-line interface with multi-factor authentication

Project description

Upload Python Package badge Python package badge Code style: black PyPI License

DISCLAIMER:
  • This package is highly experimental and conventions will probably break down across modules (mainly so I can play around with learning Python)

  • This is not an officially supported Google product

  • Features are added as needed based on client requests

  • This package is highly experimental. It’s important so I said it twice.

MAJOR CHANGES COMING SOON (MAYBE):
  • I have been working on migrating from argparse to click for the command-line interface (CLI) API. This includes simplifying the package architecture for better readability, testability and overall maintainability. The external behaviour of the CLI should not change much (with the exception of a few nuances). If this continues to go well, I will be applying the changes in a future update.

  • Plans for a stable release 1.0.0 towards the end of the year.

  • Unit tests

This package provides a command-line interface for the Apigee Management API with multi-factor authentication.

Documentation: The Apigee Management API command-line interface documentation

usage: apigee [-h] [-V]
          {apiproducts,apiprods,prods,products,apis,apps,authorization,auth,backup,caches,configure,debug,trace,debugsessions,deployments,deps,developers,devs,keyvaluemaps,kvms,maskconfigs,masks,permissions,perms,restore,sharedflows,sf,stats,targetservers,ts,userroles,roles}
          ...

positional arguments

This section lists some useful commands. To find more commands use the -h, --help flag.

apiproducts (apiprods, prods, products)

API products enable you to bundle and distribute your APIs to multiple developer groups simultaneously, without having to modify code.

apis

The proxy APIs let you perform operations on API proxies, such as create, delete, update, and deploy.

Upload and deploy an apiproxy/ bundle:

apigee apis deploy --directory APIPROXY_BUNDLE --environment ENVIRONMENT --name API_NAME

List the names of all API proxies:

apigee apis list

Download an API proxy revision, along with any referenced key/value maps, target servers and caches:

apigee apis pull \
    --environment ENVIRONMENT \
    --name API_NAME \
    --revision-number REVISION_NUMBER \
    --work-tree TARGET_DIRECTORY

Delete all undeployed revisions of an API proxy:

apigee apis clean --name API_NAME

options:

--save-last N

denotes not to delete the N most recent revisions

--dry-run

show revisions to be deleted but do not delete

apps

Management APIs available for working with developer apps.

authorization (auth)

Custom authorization commands. More information on the use cases for these commands are yet to be documented.

backup

Downloads Apigee Edge configuration files for API proxies, key value maps, target servers, caches, developers, API products, developer apps, and user roles (including permissions and associated users).

caches

A lightweight persistence store that can be used by policies or code executing on the Apigee Edge. To support data segregation, cache resources are scoped to environments.

configure

Configure Apigee Edge credentials.

debug (trace, debugsessions)

Manage sessions configured in Apigee Edge to record specified messages and associated pipeline processing metadata for debugging purposes

deployments (deps)

API proxies that are actively deployed in environments on Apigee Edge.

developers (devs)

Developers implement client/consumer apps and must be registered with an organization on Apigee Edge.

keyvaluemaps (kvms)

Key/value maps at the environment scope can be accessed by any API proxy in the environment (such as test or prod). In the management UI (APIs > Environment Configuration), key/value maps are at the environment scope.

maskconfigs (masks)

Specify data that will be filtered out of trace sessions.

permissions (perms)

Permissions for roles in an organization on Apigee Edge.

restore

Restore specific resources from backups generated by the backup command.

sharedflows (sf)

APIs to manage shared flows and flow hooks.

stats

A source of metrics collected by Apigee Edge that measure API consumption and performance, used to build Analytics reports.

targetservers (ts)

TargetServers are used to decouple TargetEndpoint HTTPTargetConnections from concrete URLs for backend services.

userroles (roles)

Roles for users in an organization on Apigee Edge. User roles form the basis of role-based access in Apigee Edge. Users are associated with one or more userroles. Each userrole defines a set of permissions (GET, PUT, DELETE) on RBAC resources (defined by URI paths).

optional arguments

-h, --help

show this help message and exit

-V, --version

show program’s version number and exit

--silent

toggle silent output

-v, --verbose

toggle verbose output

Installation

The apigee-cli package works on Python versions:

  • 3.6.x and greater

  • 3.7.x and greater

  • 3.8.x and greater

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 Help

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.37.4.tar.gz (66.6 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.37.4-py3-none-any.whl (101.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apigeecli-0.37.4.tar.gz
  • Upload date:
  • Size: 66.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for apigeecli-0.37.4.tar.gz
Algorithm Hash digest
SHA256 2140dc138c6a3f0d000e1979da6308f4b4b44fb6e3c94f4995a282bc9a95d227
MD5 ed137514af2a3c98d1d765be2e1479af
BLAKE2b-256 00b5d50272ad0cb05d59fa7c249d375c602ef2891bd16ab095fcb4307dbb265d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apigeecli-0.37.4-py3-none-any.whl
  • Upload date:
  • Size: 101.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for apigeecli-0.37.4-py3-none-any.whl
Algorithm Hash digest
SHA256 be204d4868bf94a6a9666801f0f18e1c761daf4b3b5d5228127f78caf107e555
MD5 b501b5b95d75e278ef4226e9ebab4b6f
BLAKE2b-256 33f25506712b1bd0af0588792256c48c4c82d16dc5d18c6273ed519e7741e3dd

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