Create a host project registration. A Google cloud project can be registered as a host project if it is not attached as a runtime project to another host project. A project can be registered as a host project only once. Subsequent register calls for the same project will fail.
HTTP request
POST https://apihub.googleapis.com/v1/{parent=projects/*/locations/*}/hostProjectRegistrations
Required. The parent resource for the host project. Format: projects/{project}/locations/{location}
Query parameters
Parameters
hostProjectRegistrationId
string
Required. The ID to use for the Host Project Registration, which will become the final component of the host project registration's resource name. The ID must be the same as the Google cloud project specified in the hostProjectRegistration.gcp_project field.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-28 UTC."],[[["\u003cp\u003eThis documentation outlines how to register a Google Cloud project as a host project using the \u003ccode\u003ePOST\u003c/code\u003e method via an HTTP request to the specified endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003eparent\u003c/code\u003e path parameter defining the project and location, along with a \u003ccode\u003ehostProjectRegistrationId\u003c/code\u003e query parameter that must match the Google Cloud project ID.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain an instance of \u003ccode\u003eHostProjectRegistration\u003c/code\u003e, and a successful response will return a newly created instance of the same type.\u003c/p\u003e\n"],["\u003cp\u003eRegistering a project as a host project is a one-time action; subsequent attempts for the same project will fail, and the process also requires specific OAuth scopes and IAM permissions.\u003c/p\u003e\n"],["\u003cp\u003eThe host project registration uses gRPC transcoding, and any request to register a host project requires \u003ccode\u003eapihub.runTimeProjectAttachments.create\u003c/code\u003e IAM permission on the parent resource, which is provided in the request.\u003c/p\u003e\n"]]],[],null,[]]