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

# POST /v1/{+parent}/plugins

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

Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances.

## Path parameters

- `parent` string, required

## Query parameters

- `pluginId` string

## Request body

- GoogleCloudApihubV1Plugin — A plugin resource in the API Hub.
  - `state` 'STATE_UNSPECIFIED' | 'ENABLED' | 'DISABLED' — Output only. Represents the state of the plugin. Note this field will not be set for plugins developed via plugin framework as the state will be managed at plugin instance level.
  - `createTime` string, google-datetime — Output only. Timestamp indicating when the plugin was created.
  - `updateTime` string, google-datetime — Output only. Timestamp indicating when the plugin was last updated.
  - `ownershipType` 'OWNERSHIP_TYPE_UNSPECIFIED' | 'SYSTEM_OWNED' | 'USER_OWNED' — Output only. The type of the plugin, indicating whether it is 'SYSTEM_OWNED' or 'USER_OWNED'.
  - `description` string — Optional. The plugin description. Max length is 2000 characters (Unicode code points).
  - `name` string — Identifier. The name of the plugin. Format: `projects/{project}/locations/{location}/plugins/{plugin}`
  - `displayName` string — Required. The display name of the plugin. Max length is 50 characters (Unicode code points).
  - `type` 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}
  - `pluginCategory` 'PLUGIN_CATEGORY_UNSPECIFIED' | 'API_GATEWAY' | 'API_PRODUCER' — Optional. The category of the plugin, identifying its primary category or purpose. This field is required for all plugins.
  - `documentation` GoogleCloudApihubV1Documentation — Documentation details.
    - `externalUri` string — Optional. The uri of the externally hosted documentation.
  - `actionsConfig` GoogleCloudApihubV1PluginActionConfig[] — Optional. The configuration of actions supported by the plugin. **REQUIRED**: This field must be provided when creating or updating a Plugin. The server will reject requests if this field is missing.
    - `id` string — Required. The id of the action.
    - `triggerMode` 'TRIGGER_MODE_UNSPECIFIED' | 'API_HUB_ON_DEMAND_TRIGGER' | 'API_HUB_SCHEDULE_TRIGGER' | 'NON_API_HUB_MANAGED' — Required. The trigger mode supported by the action.
    - `displayName` string — Required. The display name of the action.
    - `description` string — Required. The description of the operation performed by the action.
  - `hostingService` GoogleCloudApihubV1HostingService — The information related to the service implemented by the plugin developer, used to invoke the plugin's functionality.
    - `serviceUri` string — Optional. The URI of the service implemented by the plugin developer, used to invoke the plugin's functionality. This information is only required for user defined plugins.
  - `gatewayType` 'GATEWAY_TYPE_UNSPECIFIED' | 'APIGEE_X_AND_HYBRID' | 'APIGEE_EDGE_PUBLIC_CLOUD' | 'APIGEE_EDGE_PRIVATE_CLOUD' | 'CLOUD_API_GATEWAY' | 'CLOUD_ENDPOINTS' | 'API_DISCOVERY' | 'OTHERS' — Optional. The type of the gateway.
  - `configTemplate` GoogleCloudApihubV1ConfigTemplate — ConfigTemplate represents the configuration template for a plugin.
    - `additionalConfigTemplate` GoogleCloudApihubV1ConfigVariableTemplate[] — Optional. The list of additional configuration variables for the plugin's configuration.
      - `description` string — Optional. Description.
      - `valueType` 'VALUE_TYPE_UNSPECIFIED' | 'STRING' | 'INT' | 'BOOL' | 'SECRET' | 'ENUM' | 'MULTI_SELECT' | 'MULTI_STRING' | 'MULTI_INT' — Required. Type of the parameter: string, int, bool etc.
      - `enumOptions` GoogleCloudApihubV1ConfigValueOption[] — Optional. Enum options. To be populated if `ValueType` is `ENUM`.
        - `id` string — Required. Id of the option.
        - `displayName` string — Required. Display name of the option.
        - `description` string — Optional. Description of the option.
      - `validationRegex` string — Optional. Regular expression in RE2 syntax used for validating the `value` of a `ConfigVariable`.
      - `required` boolean — Optional. Flag represents that this `ConfigVariable` must be provided for a PluginInstance.
      - `id` string — Required. ID of the config variable. Must be unique within the configuration.
      - `multiSelectOptions` GoogleCloudApihubV1ConfigValueOption[] — Optional. Multi select options. To be populated if `ValueType` is `MULTI_SELECT`.
        - `id` string — Required. Id of the option.
        - `displayName` string — Required. Display name of the option.
        - `description` string — Optional. Description of the option.
    - `authConfigTemplate` GoogleCloudApihubV1AuthConfigTemplate — AuthConfigTemplate represents the authentication template for a plugin.
      - `supportedAuthTypes` string[] — Required. The list of authentication types supported by the plugin.
      - `serviceAccount` GoogleCloudApihubV1GoogleServiceAccountConfig — Config for Google service account authentication.
        - `serviceAccount` string — Required. The service account to be used for authenticating request. The `iam.serviceAccounts.getAccessToken` permission should be granted on this service account to the impersonator service account.

## 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)
