Register an API Stay organized with collections Save and categorize content based on your preferences.
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:
In the Google Cloud console, go to theAPIs page inAPI hub.
Go to API hub- ClickRegister API.
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- (Required) Provide a display name for the API resource.
- 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.
- 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_IDReplace the following:
- HUB_PROJECT: The name of your API hub host project. The host project was selected when API hub was provisioned.
- HUB_LOCATION: The location of the host project. The location was chosen when API hub was provisioned.
- API_ID: (Optional) Enter a unique ID for the API. If you do not supply this query parameter, the system will generate a unique ID for you.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 - DISPLAY_NAME: (Required) The display name of the API resource. You can use any name you wish.
- DESCRIPTION: (Optional) You can add a number of optional attributes to describe the API resource, including a description, an owner, a link to the API documentation, and more. These optional attributes are listed and described in theAPI resource definition.
What's next
- Learn how toView API resource insights.
- Learn how toManage API versions.
- Learn aboutAPI insights in API hub.
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.