Skip to main content

webhooks

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

Overview

Namewebhooks
TypeResource
Idgoogle.dialogflow.webhooks

Fields

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.
genericWebServiceobjectRepresents configuration for a generic web service.
serviceDirectoryobjectRepresents configuration for a Service Directory service.
timeoutstringWebhook 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

NameAccessible byRequired ParamsDescription
projects_locations_agents_webhooks_getSELECTagentsId, locationsId, projectsId, webhooksIdRetrieves the specified webhook.
projects_locations_agents_webhooks_listSELECTagentsId, locationsId, projectsIdReturns the list of all webhooks in the specified agent.
projects_locations_agents_webhooks_createINSERTagentsId, locationsId, projectsIdCreates a webhook in the specified agent.
projects_locations_agents_webhooks_deleteDELETEagentsId, locationsId, projectsId, webhooksIdDeletes the specified webhook.
projects_locations_agents_webhooks_patchUPDATEagentsId, locationsId, projectsId, webhooksIdUpdates the specified webhook.

SELECT examples

Returns the list of all webhooks in the specified agent.

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

INSERT example

Use the following StackQL query and manifest file to create a new webhooks resource.

/*+ create */
INSERT INTO google.dialogflow.webhooks (
agentsId,
locationsId,
projectsId,
name,
displayName,
genericWebService,
serviceDirectory,
timeout,
disabled
)
SELECT
'{{ agentsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ genericWebService }}',
'{{ serviceDirectory }}',
'{{ timeout }}',
{{ disabled }}
;

UPDATE example

Updates a webhooks resource.

/*+ update */
UPDATE google.dialogflow.webhooks
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
genericWebService = '{{ genericWebService }}',
serviceDirectory = '{{ serviceDirectory }}',
timeout = '{{ timeout }}',
disabled = true|false
WHERE
agentsId = '{{ agentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND webhooksId = '{{ webhooksId }}';

DELETE example

Deletes the specified webhooks resource.

/*+ delete */
DELETE FROM google.dialogflow.webhooks
WHERE agentsId = '{{ agentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND webhooksId = '{{ webhooksId }}';