Skip to main content

webhooks

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

Overview

Namewebhooks
TypeResource
Idgoogle.dialogflow.webhooks

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: projects//locations//agents//webhooks/.
disabledbooleanIndicates whether the webhook is disabled.
displayNamestringRequired. The human-readable name of the webhook, unique within the agent.
genericWebServiceobjectConfiguration for a generic web service. (id: GoogleCloudDialogflowCxV3WebhookGenericWebService)
serviceDirectoryobjectConfiguration for a Service Directory service. (id: GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig)
timeoutstring (google-duration)Webhook execution timeout. Execution is considered failed if Dialogflow doesn't receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_agents_webhooks_getselectprojectsId, locationsId, agentsId, webhooksIdRetrieves the specified webhook.
projects_locations_agents_webhooks_listselectprojectsId, locationsId, agentsIdpageSize, pageTokenReturns the list of all webhooks in the specified agent.
projects_locations_agents_webhooks_createinsertprojectsId, locationsId, agentsIdCreates a webhook in the specified agent.
projects_locations_agents_webhooks_patchupdateprojectsId, locationsId, agentsId, webhooksIdupdateMaskUpdates the specified webhook.
projects_locations_agents_webhooks_deletedeleteprojectsId, locationsId, agentsId, webhooksIdforceDeletes the specified webhook.

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
agentsIdstring
locationsIdstring
projectsIdstring
webhooksIdstring
forceboolean
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves the specified webhook.

SELECT
name,
disabled,
displayName,
genericWebService,
serviceDirectory,
timeout
FROM google.dialogflow.webhooks
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND webhooksId = '{{ webhooksId }}' -- required;

INSERT examples

Creates a webhook in the specified agent.

INSERT INTO google.dialogflow.webhooks (
data__name,
data__displayName,
data__genericWebService,
data__serviceDirectory,
data__timeout,
data__disabled,
projectsId,
locationsId,
agentsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ genericWebService }}',
'{{ serviceDirectory }}',
'{{ timeout }}',
{{ disabled }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}'
RETURNING
name,
disabled,
displayName,
genericWebService,
serviceDirectory,
timeout
;

UPDATE examples

Updates the specified webhook.

UPDATE google.dialogflow.webhooks
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__genericWebService = '{{ genericWebService }}',
data__serviceDirectory = '{{ serviceDirectory }}',
data__timeout = '{{ timeout }}',
data__disabled = {{ disabled }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND webhooksId = '{{ webhooksId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
disabled,
displayName,
genericWebService,
serviceDirectory,
timeout;

DELETE examples

Deletes the specified webhook.

DELETE FROM google.dialogflow.webhooks
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND webhooksId = '{{ webhooksId }}' --required
AND force = '{{ force }}';