Listing Services (original) (raw)

Stay organized with collections Save and categorize content based on your preferences.

This document describes how to list the APIs and services that are enabled or available in a Google Cloud project. The list of available or enabled APIs and services can contain both publicGoogle Cloud services such asPub/Sub, and any APIs and services shared privately with you, such as services created using Cloud Endpoints. For more information on the differences between public and private APIs and services, seePublic and Private Services.

Before you begin

To list the enabled and available APIs and services you need:

List enabled services in an organization

To list which services are enabled across an organization useCloud Asset Inventory, which allows exporting the state of all projects under the control of an organization in a single RPC call. Cloud Asset Inventory can also be used tomonitor for state changes. To export all enabled services for a particular organization, follow the Cloud Asset Inventory docs for Listing Assets.

To list the enabled APIs for an organization, run the following command after you set your organization and billing project IDs:

NOW=$(TZ=GMT date +"%Y-%m-%dT%H:%M:%SZ") gcloud asset list
--organization='ORGANIZATION_ID'
--billing-project='BILLING_PROJECT_ID'
--asset-types='serviceusage.googleapis.com/Service'
--snapshot-time=$NOW
--content-type='resource'

Executing the previous command lets a sufficiently privileged user list the set of enabled services for all projects in an organization.

To experiment with Cloud Asset Inventory commands, apply these commands to a specific project. For example, the following command lists all enabled services for a particular project:

NOW=$(TZ=GMT date +"%Y-%m-%dT%H:%M:%SZ") gcloud asset list
--project='PROJECT_ID'
--billing-project='BILLING_PROJECT_ID'
--asset-types='serviceusage.googleapis.com/Service'
--snapshot-time=$NOW
--content-type='resource'

List enabled services in a project

Listing enabled services uses quota from theserviceusage.googleapis.com/list_enabled_requests quota metric. The default available quota is 10 queries per second (QPS).

console

To list the enabled APIs and services in a project:

  1. Go to the Google Cloud consoleAPI Dashboardpage.
    go to the API Dashboard page
  2. Select your Google Cloud project by performing one of the following:
    • Click on a Google Cloud project under Select a recent project.
    • Use the Google Cloud project browser by performing the following steps:
      1. Click Select project to open the Google Cloud project browser.
      2. Find your project and then click on the Google Cloud project name.
      3. Click Open to open the project.

The APIs & Services page appears. You can find the list of APIs enabled in your Google Cloud project in the table on this page.

gcloud

To list the enabled APIs and services in your current project, run the following command:

gcloud services list

The command produces output similar to the following:

NAME TITLE pubsub.googleapis.com Google Cloud Pub/Sub API bigquery.googleapis.com BigQuery API cloudtrace.googleapis.com Stackdriver Trace API servicemanagement.googleapis.com Google Service Management API monitoring.googleapis.com Stackdriver Monitoring API storage-api.googleapis.com Google Cloud Storage JSON API logging.googleapis.com Stackdriver Logging API clouddebugger.googleapis.com Stackdriver Debugger API ...

curl

To list enabled services, call theservices.listmethod with the state:ENABLED filter.

To list the enabled APIs and services in your project, run the following command:

gcurl "https://serviceusage.googleapis.com/v1/projects/${PROJECT_NUMBER}/services?filter=state:ENABLED"

List available services in a project

Listing all available services uses quota from theserviceusage.googleapis.com/list_available_requests quota. The default available quota is 1 QPS. The set of available services rarely changes and can be cached for extended periods of time.

console

To list the APIs and services available to you in a project:

  1. Go to the Google Cloud consoleAPI Librarypage.
    Go to the API Library page
  2. Select your Google Cloud project by performing one of the following:
    • Click on a Google Cloud project under Select a recent project.
    • Use the Google Cloud project browser by performing the following steps:
      1. Click Select project to open the Google Cloud project browser.
      2. Find your project and then click on the Google Cloud project name.
      3. Click Open to open the project.

The API Library screen appears. You can search for or scroll through available APIs from this screen.

gcloud

To list the APIs and services available to you in your current project, run the following command:

gcloud services list --available

The results include any services that have already been enabled, as well as services that are available to be enabled for the current project. The command produces output similar to the following:

NAME TITLE places-backend.googleapis.com Google Places API Web Service clouderrorreporting.googleapis.com Stackdriver Error Reporting API analyticsreporting.googleapis.com Google Analytics Reporting API youtube.googleapis.com YouTube Data API v3 adsense.googleapis.com AdSense Management API sqladmin.googleapis.com Google Cloud SQL API genomics.googleapis.com Genomics API adexchangebuyer.googleapis.com Ad Exchange Buyer API II ...

curl

To list available services, call theservices.listmethod.

To list the available APIs and services in your project, run the following command:

gcurl "https://serviceusage.googleapis.com/v1/projects/${PROJECT_NUMBER}/services"

The result includes all public services, all services for which the calling user has the servicemanagement.services.bind permission, and all services that have already been enabled on the project.

It is possible to exclude the services that are currently active on the project by passing filter=state:DISABLED to the previous call.

Next steps

For information about how to enable or disable services in your Google Cloud project, seeEnabling and Disabling Services.