When you register an API with API hub, you create and store an entity that represents the API. We call this entity an API 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.
To register an API:
In the Google Cloud console, go to the APIs page in API hub.
Go to API hubUnder General 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, click Specify Unique ID.
To register an API, use the Create 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:
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-07-23 UTC.