---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/runtimeProjectAttachments"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/runtimeProjectAttachments"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/runtimeProjectAttachments

`POST /v1/projects/{projectsId}/locations/{locationsId}/runtimeProjectAttachments`

## Request

- Base URL: `https://apihub.googleapis.com`
- URL: `https://apihub.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/runtimeProjectAttachments`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/apihub.readwrite`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/apihub.readwrite`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
- TypeScript: <https://skmtc.dev/google/apis/apihub/docs/v1/projects/:projectsId/locations/:locationsId/runtimeProjectAttachments/post.ts> (a function with typed inputs; its response is checked against the schema)

Attaches a runtime project to the host project.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required

## Query parameters

- `runtimeProjectAttachmentId` string

## Request body

- GoogleCloudApihubV1RuntimeProjectAttachment: Runtime project attachment represents an attachment from the runtime project to the host project. Api Hub looks for deployments in the attached runtime projects and creates corresponding resources in Api Hub for the discovered deployments.
  - `createTime` string, google-datetime: Output only. Create time.
  - `name` string: Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}".
  - `runtimeProject` string: Required. Immutable. Google cloud project name in the format: "projects/abc" or "projects/123". As input, project name with either project id or number are accepted. As output, this field will contain project number.

## Response `200`

Successful response

- GoogleCloudApihubV1RuntimeProjectAttachment: Runtime project attachment represents an attachment from the runtime project to the host project. Api Hub looks for deployments in the attached runtime projects and creates corresponding resources in Api Hub for the discovered deployments.
  - `createTime` string, google-datetime: Output only. Create time.
  - `name` string: Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}".
  - `runtimeProject` string: Required. Immutable. Google cloud project name in the format: "projects/abc" or "projects/123". As input, project name with either project id or number are accepted. As output, this field will contain project number.

## Changes

- **2026-11-08** `09b6c7d2247b`: 4 info
  - the security scope `https://www.googleapis.com/auth/apihub.readwrite` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/apihub.readwrite` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/apihub/changes/v1/projects/:projectsId/locations/:locationsId/runtimeProjectAttachments/post.md)

---

[API](https://skmtc.dev/google/apis/apihub.md) - [All operations](https://skmtc.dev/google/apis/apihub/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/apihub/revisions/09b6c7d2247b?raw)
