Managing Cloud APIs and Libraries

You can access Google Cloud products and services from your code using Cloud APIs. These Cloud APIs expose a simple JSON REST interface that you can call via client libraries.

This document describes how to enable Cloud APIs and add Cloud Client Libraries to your project.

Browsing Cloud APIs

To explore all available Google Cloud APIs within your IDE, follow these steps:

  1. Select Tools > Cloud Code > Add Cloud Libraries and Manage Cloud APIs.
  2. Expand the Google Cloud APIs explorer tree to view all available APIs. The explorer groups Cloud APIs by category. You can also look for a specific API using the Search APIs search bar.
  3. Screenshot showing the list of Cloud APIs shown in the tree
            view explorer.
  4. Click on an API to view more details, such as its status, language-specific installation instructions for its corresponding client libraries, and relevant documentation.

Enabling Cloud APIs

Additionally, you can quickly enable Cloud APIs for a project using the API details. To do so:

  1. Within the Cloud API details view, choose a Google Cloud project that you'd like to enable the Cloud API for.
  2. Click on the Enable API button.

    Once the API has been enabled you'll see a message confirming this change.

Adding the Cloud Client Libraries

To add libraries to your project in IntelliJ:

For Java Maven projects

  1. Select Tools > Cloud Code > Add Cloud libraries and Manage Cloud APIs.
  2. The Add Google Cloud Libraries dialog displays the supported libraries.

    Screenshot showing the Add Cloud Libraries dialog. This dialog
          provides a drop-down menu to select a module to add the libraries to,
          displays the list of APIs available to add, and provides a work area
          that displays information about the API.
  3. Select your preferred library type from the choice of Google Cloud Client Library (recommended) or Java Spring GCP Library.
  4. In the Module drop-down menu, select the module that you want to add the library to.
  5. Click Add Maven Dependency to add BOM and client library to your project.

For all other projects

  1. Select Tools > Cloud Code > Add Cloud Libraries and Manage Cloud APIs.
  2. The Add Google Cloud Libraries dialog displays the supported libraries.

    Screenshot showing the Add Cloud Libraries dialog. This
                      dialog displays the list of APIs available to add and
                      provides a work area that displays information about the
                      API.
  3. Install the API using the installation instructions listed on the API details page for your preferred language.

Getting Support

To send feedback, report issues on GitHub, or ask a question on Stack Overflow.