Get started with API hub

You're viewing Apigee X documentation.
View Apigee Edge documentation.

Prerequisites

You must meet the following prerequisites:

Done? Prerequisite Description
Google Cloud billing account

You must have a Google Cloud account with active billing.

For more information, see Create a new billing account.

Google Cloud project

Create a new Google Cloud project.

Project names must adhere to the following guidelines:

  • Start with a lower-case letter. For example, my-org is OK, but _my-org is not.
  • Include only lowercase letters, numbers, or hyphens (-).

For more information, see Creating a project.

Software

Install the following software on your administrative machine:

  • Google Cloud SDK (required for command line; recommended for UI-based installations)
  • curl (optional but strongly suggested)
Permissions

To call any of the Provisioning APIs, you must have the Apigee Registry Admin role.

For the P4SA and CMEK setup, you should have either the Owner (roles/owner) or Cloud KMS Admin (roles/cloudkms.admin) role. See Before you begin for more information.

For information on granting roles, see Manage access to projects, folders, and organizations.

Encryption key

You must have a customer managed encryption key (CMEK).

If you don't have one already, you can create one as part of the provisioning process as described in Create P4SA and CMEK..

Set up gcloud

Set up Google Cloud CLI (gcloud):

  1. Complete the setup requirements listed in Prerequisites.
  2. Initialize the Cloud SDK, as described in Initializing Cloud SDK, or otherwise ensure that the Google Cloud project you created in Prerequisites is the default project for gcloud.
  3. Set the project property:
    gcloud config set project PROJECT_ID
    

    Where PROJECT_ID is the Cloud project ID that you created as part of Prerequisites.

  4. Install gcloud beta components:
    gcloud components install beta
    

Enable APIs

To use API hub, you must enable the following APIs for the project in the Google Cloud console:

  • Apigee Registry API
  • Cloud Key Management Service (KMS) API: Allows customers to manage encryption keys and perform cryptographic operations with those keys.
  • Service Usage API: Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.

You can use the CLI or the Google Cloud console UI to enable the APIs.

Console

To enable the APIs using the UI, perform the following steps:

  1. In the Cloud console, go to APIs & services for your project.

    Go to APIs & Services

  2. Click Enable APIs & services.
  3. Enable the Apigee Registry API:
    1. In the API Library view, type
      apigee registry api
      in the search box and press Enter.
    2. Locate the Apigee Registry API and click it.

    3. Click Enable.

      Google Cloud enables the API for your Google Cloud project

  4. Enable the Cloud Key Management Service (KMS) API:
    1. In the API Library view, type
      cloud key management service (kms) api
      in the search box and press Enter.
    2. Click Cloud Key Management Service (KMS) API.

    3. Click Enable.

      Google Cloud enables the API for your Google Cloud project

  5. Enable the Service Usage API:
    1. In the API Library view, type
      service usage api
      in the search box and press Enter.
    2. Click Service Usage API.

    3. Click Enable.
  6. To confirm that you have enabled the APIs, select APIs & Services > Enabled APIs & Services.

    The APIs you just added are displayed in the list of enabled APIs:

    • Apigee Registry API
    • Cloud Key Management Service (KMS) API
    • Service Usage API

gcloud

  1. Execute the following command:

    gcloud services enable \
        apigeeregistry.googleapis.com \
        cloudkms.googleapis.com \
        serviceusage.googleapis.com --project=PROJECT_ID
    

    Where PROJECT_ID is the name of your Cloud console project.

  2. (Optional) To check your work, use the services list command to show all the enabled APIs:

    gcloud services list
    

    The response shows all enabled services, including the APIs that you just enabled.

Roles

The following user roles provide permissions that control access to the API hub functions:

  • Admin: Full access to all the resources in the registry plus planned features for automated provisioning and instance management
  • Editor: Edit access to API hub and registry resources.
  • Viewer: Read-only access to API hub and registry resources.
  • Worker: Predefined role for Apigee Registry application workers to read and update Apigee Registry resources.

Action buttons are disabled if you do not have appropriate permissions to perform the action.

Set up IAM permissions

See IAM roles for detailed permissions information.

To add users and roles:

  1. In the Cloud console, go to IAM & Admin for your project.

    Go to the IAM/Iam page

  2. To add a new user:
    1. Click Add.
    2. Type a new Principal name.
    3. Click the Select a role menu, click Apigee Registry, and then click one of the following:
      • Cloud Apigee Registry Admin
      • Cloud Apigee Registry Editor
      • Cloud Apigee Registry Viewer
      • Cloud Apigee Registry Worker
    4. Click Save.
  3. To edit an existing user:
    1. Click Edit.
    2. To change an existing role, click the Role menu and then select a different role.
    3. To add another role, click Add another role.
    4. Click the Select a role menu, click Apigee Registry, and then click one of the following:
      • Cloud Apigee Registry Admin
      • Cloud Apigee Registry Editor
      • Cloud Apigee Registry Viewer
      • Cloud Apigee Registry Worker
    5. Click Save.

Provision API hub

Follow the instructions in Provision API hub.

Access API hub

To access the API hub:

In the Cloud console, go to the Apigee API hub page.

Go to API hub

The API hub displays a navigation pane and a body pane as shown below. The APIs list page is displayed by default:

History tab

Import existing data

See apigee/registry/demos for demonstrations on bulk import using the registry tool.

What's next?