Register an API

This pageapplies toApigee andApigee hybrid.

When you register an API with API hub, you create and store an entity that represents the API. We call this entity anAPI resource. API resources stored in API hub are searchable and provide detailed operational and descriptive information about the API. Either at the time you register an API or afterwards, you can add and edit API resource attributes to build a rich description of the API.

Console

To register an API:

  1. In the Google Cloud console, go to theAPIs page inAPI hub.

    Go to API hub
  2. ClickRegister API.
  3. UnderGeneral details, optionally specify a unique ID for the API. If you do not supply an ID, the system will generate one for you. If you wish to enter an ID, clickSpecify Unique ID.

    Note: The ID must be 4-500 characters, and valid characters are/[A-Z][a-z][0-9]-/. The ID is the last component of the fully qualified, unique API resource name, which is in the format:projects/PROJECT/locations/LOCATION/apis/API_ID
  4. (Required) Provide a display name for the API resource.
  5. Optionally add additional attributes that describe the API. You can return to the API at any time to add or change API attributes. SeeEdit an API resource.
    • Owner information: (Optional) The name and email address of the API owner.
    • Additional details: (Optional) Specify attributes to help define your API and make it more easily searchable. You can define default values for some of these attributes in Settings. For details, seeManage attributes.
    • User defined attributes: (Optional) These are attributes that you define in Settings. For details, seeManage attributes.
  6. ClickRegister.

REST

To register an API, use theCreate API REST API.

curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" -d '{    "display_name": "DISPLAY_NAME",            # Required attribute    "description": "DESCRIPTION"               # description is an optional attribute    }    'https://apihub.googleapis.com/v1/projects/HUB_PROJECT/locations/HUB_LOCATION/apis?api_id=API_ID

Replace the following:

What's next

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.