Skip to main content

curations

Creates, updates, deletes, gets or lists a curations resource.

Overview

Namecurations
TypeResource
Idgoogle.apihub.curations

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The name of the curation. Format: projects/{project}/locations/{location}/curations/{curation}
createTimestring (google-datetime)Output only. The time at which the curation was created.
descriptionstringOptional. The description of the curation.
displayNamestringRequired. The display name of the curation.
endpointobjectRequired. The endpoint to be triggered for curation. (id: GoogleCloudApihubV1Endpoint)
lastExecutionErrorCodestringOutput only. The error code of the last execution of the curation. The error code is populated only when the last execution state is failed.
lastExecutionErrorMessagestringOutput only. Error message describing the failure, if any, during the last execution of the curation.
lastExecutionStatestringOutput only. The last execution state of the curation.
pluginInstanceActionsarrayOutput 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.
updateTimestring (google-datetime)Output only. The time at which the curation was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, curationsIdGet curation resource details.
listselectprojectsId, locationsIdfilter, pageSize, pageTokenList curation resources in the API hub.
createinsertprojectsId, locationsIdcurationIdCreate a curation resource in the API hub. Once a curation resource is created, plugin instances can start using it.
patchupdateprojectsId, locationsId, curationsIdupdateMaskUpdate a curation resource in the API hub. The following fields in the curation can be updated: * display_name * description The update_mask should be used to specify the fields being updated.
deletedeleteprojectsId, locationsId, curationsIdDelete a curation resource in the API hub. A curation can only be deleted if it's not being used by any plugin instance.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
curationsIdstring
locationsIdstring
projectsIdstring
curationIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Get curation resource details.

SELECT
name,
createTime,
description,
displayName,
endpoint,
lastExecutionErrorCode,
lastExecutionErrorMessage,
lastExecutionState,
pluginInstanceActions,
updateTime
FROM google.apihub.curations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND curationsId = '{{ curationsId }}' -- required;

INSERT examples

Create a curation resource in the API hub. Once a curation resource is created, plugin instances can start using it.

INSERT INTO google.apihub.curations (
data__name,
data__displayName,
data__description,
data__endpoint,
projectsId,
locationsId,
curationId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ endpoint }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ curationId }}'
RETURNING
name,
createTime,
description,
displayName,
endpoint,
lastExecutionErrorCode,
lastExecutionErrorMessage,
lastExecutionState,
pluginInstanceActions,
updateTime
;

UPDATE examples

Update a curation resource in the API hub. The following fields in the curation can be updated: * display_name * description The update_mask should be used to specify the fields being updated.

UPDATE google.apihub.curations
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__endpoint = '{{ endpoint }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND curationsId = '{{ curationsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
description,
displayName,
endpoint,
lastExecutionErrorCode,
lastExecutionErrorMessage,
lastExecutionState,
pluginInstanceActions,
updateTime;

DELETE examples

Delete a curation resource in the API hub. A curation can only be deleted if it's not being used by any plugin instance.

DELETE FROM google.apihub.curations
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND curationsId = '{{ curationsId }}' --required;