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

# POST /v1/{+parent}/deployments

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

Create a deployment resource in the API hub. Once a deployment resource is created, it can be associated with API versions.

## Path parameters

- `parent` string, required

## Query parameters

- `deploymentId` string

## Request body

- GoogleCloudApihubV1Deployment — Details of the deployment where APIs are hosted. A deployment could represent an Apigee proxy, API gateway, other Google Cloud services or non-Google Cloud services as well. A deployment entity is a root level entity in the API hub and exists independent of any API.
  - `slo` GoogleCloudApihubV1AttributeValues — The attribute values associated with resource.
    - `stringValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `uriValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `enumValues` GoogleCloudApihubV1EnumAttributeValues — The attribute values of data type enum.
      - `values` GoogleCloudApihubV1AllowedValue[] — Required. The attribute values in case attribute data type is enum.
        - `id` string — Required. The ID of the allowed value. * If provided, the same will be used. The service will throw an error if the specified id is already used by another allowed value in the same attribute resource. * If not provided, a system generated id derived from the display name will be used. In this case, the service will handle conflict resolution by adding a system generated suffix in case of duplicates. This value should be 4-63 characters, and valid characters are /a-z-/.
        - `displayName` string — Required. The display name of the allowed value.
        - `description` string — Optional. The detailed description of the allowed value.
        - `immutable` boolean — Optional. When set to true, the allowed value cannot be updated or deleted by the user. It can only be true for System defined attributes.
    - `jsonValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `attribute` string — Output only. The name of the attribute. Format: projects/{project}/locations/{location}/attributes/{attribute}
  - `endpoints` string[] — Required. The endpoints at which this deployment resource is listening for API requests. This could be a list of complete URIs, hostnames or an IP addresses.
  - `apiVersions` string[] — Output only. The API versions linked to this deployment. Note: A particular deployment could be linked to multiple different API versions (of same or different APIs).
  - `documentation` GoogleCloudApihubV1Documentation — Documentation details.
    - `externalUri` string — Optional. The uri of the externally hosted documentation.
  - `displayName` string — Required. The display name of the deployment.
  - `resourceUri` string — Required. The resource URI identifies the deployment within its gateway. For Apigee gateways, its recommended to use the format: organizations/{org}/environments/{env}/apis/{api}. For ex: if a proxy with name `orders` is deployed in `staging` environment of `cymbal` organization, the resource URI would be: `organizations/cymbal/environments/staging/apis/orders`.
  - `description` string — Optional. The description of the deployment.
  - `attributes` object — Optional. The list of user defined attributes associated with the deployment resource. The key is the attribute name. It will be of the format: `projects/{project}/locations/{location}/attributes/{attribute}`. The value is the attribute values associated with the resource.
  - `name` string — Identifier. The name of the deployment. Format: `projects/{project}/locations/{location}/deployments/{deployment}`
  - `updateTime` string, google-datetime — Output only. The time at which the deployment was last updated.
  - `createTime` string, google-datetime — Output only. The time at which the deployment was created.
  - `sourceUri` GoogleCloudApihubV1AttributeValues — The attribute values associated with resource.
    - `stringValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `uriValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `enumValues` GoogleCloudApihubV1EnumAttributeValues — The attribute values of data type enum.
      - `values` GoogleCloudApihubV1AllowedValue[] — Required. The attribute values in case attribute data type is enum.
        - `id` string — Required. The ID of the allowed value. * If provided, the same will be used. The service will throw an error if the specified id is already used by another allowed value in the same attribute resource. * If not provided, a system generated id derived from the display name will be used. In this case, the service will handle conflict resolution by adding a system generated suffix in case of duplicates. This value should be 4-63 characters, and valid characters are /a-z-/.
        - `displayName` string — Required. The display name of the allowed value.
        - `description` string — Optional. The detailed description of the allowed value.
        - `immutable` boolean — Optional. When set to true, the allowed value cannot be updated or deleted by the user. It can only be true for System defined attributes.
    - `jsonValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `attribute` string — Output only. The name of the attribute. Format: projects/{project}/locations/{location}/attributes/{attribute}
  - `sourceProject` string — Optional. The project to which the deployment belongs. For Google Cloud gateways, this will refer to the project identifier. For others like Edge/OPDK, this will refer to the org identifier.
  - `managementUrl` GoogleCloudApihubV1AttributeValues — The attribute values associated with resource.
    - `stringValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `uriValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `enumValues` GoogleCloudApihubV1EnumAttributeValues — The attribute values of data type enum.
      - `values` GoogleCloudApihubV1AllowedValue[] — Required. The attribute values in case attribute data type is enum.
        - `id` string — Required. The ID of the allowed value. * If provided, the same will be used. The service will throw an error if the specified id is already used by another allowed value in the same attribute resource. * If not provided, a system generated id derived from the display name will be used. In this case, the service will handle conflict resolution by adding a system generated suffix in case of duplicates. This value should be 4-63 characters, and valid characters are /a-z-/.
        - `displayName` string — Required. The display name of the allowed value.
        - `description` string — Optional. The detailed description of the allowed value.
        - `immutable` boolean — Optional. When set to true, the allowed value cannot be updated or deleted by the user. It can only be true for System defined attributes.
    - `jsonValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `attribute` string — Output only. The name of the attribute. Format: projects/{project}/locations/{location}/attributes/{attribute}
  - `deploymentType` GoogleCloudApihubV1AttributeValues — The attribute values associated with resource.
    - `stringValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `uriValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `enumValues` GoogleCloudApihubV1EnumAttributeValues — The attribute values of data type enum.
      - `values` GoogleCloudApihubV1AllowedValue[] — Required. The attribute values in case attribute data type is enum.
        - `id` string — Required. The ID of the allowed value. * If provided, the same will be used. The service will throw an error if the specified id is already used by another allowed value in the same attribute resource. * If not provided, a system generated id derived from the display name will be used. In this case, the service will handle conflict resolution by adding a system generated suffix in case of duplicates. This value should be 4-63 characters, and valid characters are /a-z-/.
        - `displayName` string — Required. The display name of the allowed value.
        - `description` string — Optional. The detailed description of the allowed value.
        - `immutable` boolean — Optional. When set to true, the allowed value cannot be updated or deleted by the user. It can only be true for System defined attributes.
    - `jsonValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `attribute` string — Output only. The name of the attribute. Format: projects/{project}/locations/{location}/attributes/{attribute}
  - `sourceMetadata` GoogleCloudApihubV1SourceMetadata[] — Output only. The list of sources and metadata from the sources of the deployment.
    - `originalResourceUpdateTime` string, google-datetime — Output only. The time at which the resource was last updated at the source.
    - `originalResourceId` string — Output only. The unique identifier of the resource at the source.
    - `originalResourceCreateTime` string, google-datetime — Output only. The time at which the resource was created at the source.
    - `pluginInstanceActionSource` GoogleCloudApihubV1PluginInstanceActionSource — PluginInstanceActionSource represents the plugin instance action source.
      - `actionId` string — Output only. The id of the plugin instance action.
      - `pluginInstance` string — Output only. The resource name of the source plugin instance. Format is `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    - `sourceType` 'SOURCE_TYPE_UNSPECIFIED' | 'PLUGIN' — Output only. The type of the source.
  - `sourceEnvironment` string — Optional. The environment at source for the deployment. For example: prod, dev, staging, etc.
  - `environment` GoogleCloudApihubV1AttributeValues — The attribute values associated with resource.
    - `stringValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `uriValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `enumValues` GoogleCloudApihubV1EnumAttributeValues — The attribute values of data type enum.
      - `values` GoogleCloudApihubV1AllowedValue[] — Required. The attribute values in case attribute data type is enum.
        - `id` string — Required. The ID of the allowed value. * If provided, the same will be used. The service will throw an error if the specified id is already used by another allowed value in the same attribute resource. * If not provided, a system generated id derived from the display name will be used. In this case, the service will handle conflict resolution by adding a system generated suffix in case of duplicates. This value should be 4-63 characters, and valid characters are /a-z-/.
        - `displayName` string — Required. The display name of the allowed value.
        - `description` string — Optional. The detailed description of the allowed value.
        - `immutable` boolean — Optional. When set to true, the allowed value cannot be updated or deleted by the user. It can only be true for System defined attributes.
    - `jsonValues` GoogleCloudApihubV1StringAttributeValues — The attribute values of data type string or JSON.
      - `values` string[] — Required. The attribute values in case attribute data type is string or JSON.
    - `attribute` string — Output only. The name of the attribute. Format: projects/{project}/locations/{location}/attributes/{attribute}

## Response `200`

Successful response

---

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