Getting started using gcloud with Apigee

This pageapplies toApigee andApigee hybrid.

View Apigee Edge documentation.

Thegcloud apigee CLI enables you to perform the following:

  • View API proxies
  • Create and manage API products
  • Deploy and undeploy API proxies, and view deployment details
  • View information about developers and apps
  • List your environments and organizations
  • Manage third-party applications that call Apigee API proxies

In addition, thegcloud beta apigee CLI enables you to deploy and manage archives in your Apigee environment.

The following sections describe how to install, authorize, and use thegcloud apigee andgcloud beta apigee CLIs, and optionally set environment variables.

Before you begin

Ensure that you have met theprerequisites for using Apigee, including installing theGoogle Cloud SDK.

Note: As an alternative, you can use theGoogle Cloud Shell. The Google Cloud Shell is a command-line environment that already includes the Google Cloud SDK, so you wouldn't need to install it.

Installing the gcloud beta apigee components

To access thegcloud beta apigee commands, you must install the complete gcloud beta component, as follows:

gcloud components install beta

To confirm that the beta component has been installed, enter the following command:

gcloud components list

You should see the beta component in the list, as follows:

StatusNameIDSize
Installedgcloud Beta Commandsbeta< 1 MiB

For more information, seeManaging SDK components.

Authorizing access to gcloud

Authorize access to thegloud CLI by following the steps described inAuthorizing Cloud SDK tools.

For example, to authorizes access using your user account and perform other common Cloud SDK setup steps, use the following command:

gcloud init

Follow the prompts to authenticate the account, grant access permissions, and initialize your Cloud SDK installation, as described inInitializing Cloud SDK.

Alternatively, to authorize access without performing any additional set up, use the following command:

gcloud auth login

Follow the browser-based authorization flow to authenticate the account and grant access permissions.

For more information about authorizing and revoking access to the gcloud CLI, seeCredentials.

Setting environment variables for gcloud commands

The Apigee API and gcloud CLI examples provided throughout the documentation use one or more of the environment variables defined in the following table.

By setting the environment variables upfront to meaningful values in your environment, you can copy and paste the example requests to execute them in your own environment with minimal or no modifications.

Environment variableDescription
$APIName of your API proxy.
$APIPRODUCTName of the API product.
$APPID of an app.
$DEVELOPER_EMAILEmail address of the developer.
$ENVName of your environment, such astest orprod.
$IDResource ID.
$KEYConsumer key.
$NAMEName of your resource.
$ORGYour Apigee organization.
$REVRevision number of your API proxy.
$SHAREDFLOWName of your shared flow.
$TYPEResource type.

Using the gcloud CLI

Use thegcloud CLI as follows:

gcloud apigeeGROUP [GCLOUD_WIDE_FLAG …]

For more information about the available command groups and flags, seegcloud apigee.

For example, the following command lists the API proxies in your organization:

gcloud apigee apis list --organization=$ORG

The following provides an example of the response for themy-org organization:

Using Apigee organization `myorg` - hello-world - weather-app

More information

For more information, see:

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-17 UTC.