---
title: "POST /v1/{+parent}/connections"
method: POST
path: "/v1/{+parent}/connections"
tags: ["projects"]
---

# POST /v1/{+parent}/connections

`POST /v1/{+parent}/connections`

Creates a new Connection in a given project and location.

## Path parameters

- `parent` string, required

## Query parameters

- `connectionId` string
- `requestId` string
- `validateOnly` boolean

## Request body

- Connection — Message describing Connection object
  - `cryptoKeyConfig` CryptoKeyConfig — The crypto key configuration. This field is used by the Customer-managed encryption keys (CMEK) feature.
    - `keyReference` string — Required. The name of the key which is used to encrypt/decrypt customer data. For key in Cloud KMS, the key should be in the format of `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
  - `deleteTime` string, google-datetime — Output only. [Output only] Delete timestamp
  - `updateTime` string, google-datetime — Output only. [Output only] Update timestamp
  - `githubConfig` GitHubConfig — Configuration for connections to github.com.
    - `appInstallationId` string, int64 — Optional. GitHub App installation id.
    - `githubApp` 'GIT_HUB_APP_UNSPECIFIED' | 'DEVELOPER_CONNECT' | 'FIREBASE' | 'GEMINI_CODE_ASSIST' | 'DATAFORM' — Required. Immutable. The GitHub Application that was installed to the GitHub user or organization.
    - `authorizerCredential` OAuthCredential — Represents an OAuth token of the account that authorized the Connection, and associated metadata.
      - `oauthTokenSecretVersion` string — Required. A SecretManager resource containing the OAuth token that authorizes the connection. Format: `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location).
      - `username` string — Output only. The username associated with this token.
    - `installationUri` string — Output only. The URI to navigate to in order to manage the installation associated with this GitHubConfig.
  - `bitbucketDataCenterConfig` BitbucketDataCenterConfig — Configuration for connections to an instance of Bitbucket Data Center.
    - `hostUri` string — Required. The URI of the Bitbucket Data Center host this connection is for.
    - `serverVersion` string — Output only. Version of the Bitbucket Data Center server running on the `host_uri`.
    - `webhookSecretSecretVersion` string — Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook events, formatted as `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location). This is used to validate webhooks.
    - `sslCaCertificate` string — Optional. SSL certificate authority to trust when making requests to Bitbucket Data Center.
    - `readAuthorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Developer Connect connection. Format: `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location).
      - `username` string — Output only. The username associated with this token.
    - `authorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Developer Connect connection. Format: `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location).
      - `username` string — Output only. The username associated with this token.
    - `serviceDirectoryConfig` ServiceDirectoryConfig — ServiceDirectoryConfig represents Service Directory configuration for a connection.
      - `service` string — Required. The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.
  - `name` string — Identifier. The resource name of the connection, in the format `projects/{project}/locations/{location}/connections/{connection_id}`.
  - `annotations` object — Optional. Allows clients to store small amounts of arbitrary data.
  - `gitlabConfig` GitLabConfig — Configuration for connections to gitlab.com.
    - `webhookSecretSecretVersion` string — Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, formatted as `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location). This is used to validate webhooks.
    - `authorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Developer Connect connection. Format: `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location).
      - `username` string — Output only. The username associated with this token.
    - `readAuthorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Developer Connect connection. Format: `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location).
      - `username` string — Output only. The username associated with this token.
  - `installationState` InstallationState — Describes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections.
    - `actionUri` string — Output only. Link to follow for next action. Empty string if the installation is already complete.
    - `stage` 'STAGE_UNSPECIFIED' | 'PENDING_CREATE_APP' | 'PENDING_USER_OAUTH' | 'PENDING_INSTALL_APP' | 'COMPLETE' — Output only. Current step of the installation process.
    - `message` string — Output only. Message of what the user should do next to continue the installation. Empty string if the installation is already complete.
  - `githubEnterpriseConfig` GitHubEnterpriseConfig — Configuration for connections to an instance of GitHub Enterprise.
    - `webhookSecretSecretVersion` string — Optional. SecretManager resource containing the webhook secret of the GitHub App, formatted as `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location).
    - `hostUri` string — Required. The URI of the GitHub Enterprise host this connection is for.
    - `serverVersion` string — Output only. GitHub Enterprise version installed at the host_uri.
    - `appInstallationId` string, int64 — Optional. ID of the installation of the GitHub App.
    - `installationUri` string — Output only. The URI to navigate to in order to manage the installation associated with this GitHubEnterpriseConfig.
    - `appSlug` string — Output only. The URL-friendly name of the GitHub App.
    - `serviceDirectoryConfig` ServiceDirectoryConfig — ServiceDirectoryConfig represents Service Directory configuration for a connection.
      - `service` string — Required. The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.
    - `sslCaCertificate` string — Optional. SSL certificate to use for requests to GitHub Enterprise.
    - `organization` string — Optional. Immutable. GitHub Enterprise organization in which the GitHub App is created.
    - `appId` string, int64 — Optional. ID of the GitHub App created from the manifest.
    - `privateKeySecretVersion` string — Optional. SecretManager resource containing the private key of the GitHub App, formatted as `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location).
  - `uid` string — Output only. A system-assigned unique identifier for the Connection.
  - `gitlabEnterpriseConfig` GitLabEnterpriseConfig — Configuration for connections to an instance of GitLab Enterprise.
    - `readAuthorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Developer Connect connection. Format: `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location).
      - `username` string — Output only. The username associated with this token.
    - `authorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Developer Connect connection. Format: `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location).
      - `username` string — Output only. The username associated with this token.
    - `serviceDirectoryConfig` ServiceDirectoryConfig — ServiceDirectoryConfig represents Service Directory configuration for a connection.
      - `service` string — Required. The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.
    - `hostUri` string — Required. The URI of the GitLab Enterprise host this connection is for.
    - `serverVersion` string — Output only. Version of the GitLab Enterprise server running on the `host_uri`.
    - `webhookSecretSecretVersion` string — Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, formatted as `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location). This is used to validate webhooks.
    - `sslCaCertificate` string — Optional. SSL Certificate Authority certificate to use for requests to GitLab Enterprise instance.
  - `etag` string — Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
  - `labels` object — Optional. Labels as key value pairs
  - `bitbucketCloudConfig` BitbucketCloudConfig — Configuration for connections to an instance of Bitbucket Cloud.
    - `workspace` string — Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform.
    - `webhookSecretSecretVersion` string — Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook events, formatted as `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location). This is used to validate and create webhooks.
    - `authorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Developer Connect connection. Format: `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location).
      - `username` string — Output only. The username associated with this token.
    - `readAuthorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Developer Connect connection. Format: `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are supported in that location).
      - `username` string — Output only. The username associated with this token.
  - `disabled` boolean — Optional. If disabled is set to true, functionality is disabled for this connection. Repository based API methods and webhooks processing for repositories in this connection will be disabled.
  - `httpConfig` GenericHTTPEndpointConfig — Defines the configuration for connections to an HTTP service provider.
    - `bearerTokenAuthentication` BearerTokenAuthentication — Bearer token authentication with a token.
      - `tokenSecretVersion` string — Optional. The token SecretManager secret version to authenticate as.
    - `sslCaCertificate` string — Optional. The SSL certificate to use for requests to the HTTP service provider.
    - `hostUri` string — Required. Immutable. The service provider's https endpoint.
    - `basicAuthentication` BasicAuthentication — Basic authentication with username and password.
      - `username` string — Required. The username to authenticate as.
      - `passwordSecretVersion` string — The password SecretManager secret version to authenticate as.
    - `serviceDirectoryConfig` ServiceDirectoryConfig — ServiceDirectoryConfig represents Service Directory configuration for a connection.
      - `service` string — Required. The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.
  - `gitProxyConfig` GitProxyConfig — The git proxy configuration.
    - `httpProxyBaseUri` string — Output only. The base URI for the HTTP proxy endpoint. Has the format `https://{generatedID}-c-h-{shortRegion}.developerconnect.dev` Populated only when enabled is set to true. This endpoint is used by other Google services that integrate with Developer Connect.
    - `enabled` boolean — Optional. Setting this to true allows the git proxy to be used for performing git operations on the repositories linked in the connection.
  - `reconciling` boolean — Output only. Set to true when the connection is being set up or updated in the background.
  - `createTime` string, google-datetime — Output only. [Output only] Create timestamp
  - `secureSourceManagerInstanceConfig` SecureSourceManagerInstanceConfig — Configuration for connections to Secure Source Manager instance
    - `instance` string — Required. Immutable. Secure Source Manager instance resource, formatted as `projects/*/locations/*/instances/*`

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/developerconnect.md) · [All operations](https://skmtc.dev/google/apis/developerconnect/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/developerconnect/revisions/2526b3369dcc/schema)
