# REST Resource: projects.locations.curations

- [Resource: Curation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#Curation)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#Curation.SCHEMA_REPRESENTATION)
- [Endpoint](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#Endpoint)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#Endpoint.SCHEMA_REPRESENTATION)
- [ApplicationIntegrationEndpointDetails](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#ApplicationIntegrationEndpointDetails)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#ApplicationIntegrationEndpointDetails.SCHEMA_REPRESENTATION)
- [PluginInstanceActionID](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#PluginInstanceActionID)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#PluginInstanceActionID.SCHEMA_REPRESENTATION)
- [LastExecutionState](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#LastExecutionState)
- [ErrorCode](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#ErrorCode)
- [Methods](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#METHODS_SUMMARY)

## Resource: Curation

A curation resource in the API Hub.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string, "endpoint": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#Endpoint`) }, "pluginInstanceActions": [ { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#PluginInstanceActionID`) } ], "lastExecutionState": enum (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#LastExecutionState`), "lastExecutionErrorCode": enum (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#ErrorCode`), "lastExecutionErrorMessage": string, "createTime": string, "updateTime": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The name of the curation. Format: `projects/{project}/locations/{location}/curations/{curation}` |
| `displayName` | `string` Required. The display name of the curation. |
| `description` | `string` Optional. The description of the curation. |
| `endpoint` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#Endpoint`)`` Required. The endpoint to be triggered for curation. |
| `pluginInstanceActions[]` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#PluginInstanceActionID`)`` Output only. The plugin instances and associated actions that are using the curation. Note: A particular curation could be used by multiple plugin instances or multiple actions in a plugin instance. |
| `lastExecutionState` | ``enum (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#LastExecutionState`)`` Output only. The last execution state of the curation. |
| `lastExecutionErrorCode` | ``enum (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#ErrorCode`)`` Output only. The error code of the last execution of the curation. The error code is populated only when the last execution state is failed. |
| `lastExecutionErrorMessage` | `string` Output only. Error message describing the failure, if any, during the last execution of the curation. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the curation was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the curation was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

## Endpoint

The endpoint to be triggered for curation. The endpoint will be invoked with a request payload containing \[ApiMetadata\]\[google.cloud.apihub.v1.ApiHub.ApiMetadata\]. Response should contain curated data in the form of \[ApiMetadata\]\[google.cloud.apihub.v1.ApiHub.ApiMetadata\].

| JSON representation |
|---|
| ``` { // Union field `endpoint_details` can be only one of the following: "applicationIntegrationEndpointDetails": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#ApplicationIntegrationEndpointDetails`) } // End of list of possible types for union field `endpoint_details`. } ``` |

| Fields ||
|---|---|
| Union field `endpoint_details`. The details of the endpoint to be triggered for curation. `endpoint_details` can be only one of the following: ||
| `applicationIntegrationEndpointDetails` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations#ApplicationIntegrationEndpointDetails`)`` Required. The details of the Application Integration endpoint to be triggered for curation. |

## ApplicationIntegrationEndpointDetails

The details of the Application Integration endpoint to be triggered for curation.

| JSON representation |
|---|
| ``` { "uri": string, "triggerId": string } ``` |

| Fields ||
|---|---|
| `uri` | `string` Required. The endpoint URI should be a valid REST URI for triggering an Application Integration. Format: `https://integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute` or `https://{location}-integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute` |
| `triggerId` | `string` Required. The API trigger ID of the Application Integration workflow. |

## PluginInstanceActionID

The plugin instance and associated action that is using the curation.

| JSON representation |
|---|
| ``` { "pluginInstance": string, "actionId": string } ``` |

| Fields ||
|---|---|
| `pluginInstance` | `string` Output only. Plugin instance that is using the curation. Format is `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` |
| `actionId` | `string` Output only. The action ID that is using the curation. This should map to one of the action IDs specified in action configs in the plugin. |

## LastExecutionState

The state of the last execution of the curation.

| Enums ||
|---|---|
| `LAST_EXECUTION_STATE_UNSPECIFIED` | Default unspecified state. |
| `SUCCEEDED` | The last curation execution was successful. |
| `FAILED` | The last curation execution failed. |

## ErrorCode

The error codes for failed executions.

| Enums ||
|---|---|
| `ERROR_CODE_UNSPECIFIED` | Default unspecified error code. |
| `INTERNAL_ERROR` | The execution failed due to an internal error. |
| `UNAUTHORIZED` | The curation is not authorized to trigger the endpoint uri. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations/create` | Create a curation resource in the API hub. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations/delete` | Delete a curation resource in the API hub. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations/get` | Get curation resource details. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations/list` | List curation resources in the API hub. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.curations/patch` | Update a curation resource in the API hub. |