webhooks
Creates, updates, deletes, gets or lists a webhooks
resource.
Overview
Name | webhooks |
Type | Resource |
Id | google.dialogflow.webhooks |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: projects//locations//agents//webhooks/ . |
disabled | boolean | Indicates whether the webhook is disabled. |
displayName | string | Required. The human-readable name of the webhook, unique within the agent. |
genericWebService | object | Represents configuration for a generic web service. |
serviceDirectory | object | Represents configuration for a Service Directory service. |
timeout | string | 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
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_agents_webhooks_get | SELECT | agentsId, locationsId, projectsId, webhooksId | Retrieves the specified webhook. |
projects_locations_agents_webhooks_list | SELECT | agentsId, locationsId, projectsId | Returns the list of all webhooks in the specified agent. |
projects_locations_agents_webhooks_create | INSERT | agentsId, locationsId, projectsId | Creates a webhook in the specified agent. |
projects_locations_agents_webhooks_delete | DELETE | agentsId, locationsId, projectsId, webhooksId | Deletes the specified webhook. |
projects_locations_agents_webhooks_patch | UPDATE | agentsId, locationsId, projectsId, webhooksId | Updates 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.
- All Properties
- Manifest
/*+ 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 }}
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: genericWebService
value:
- name: uri
value: string
- name: username
value: string
- name: password
value: string
- name: requestHeaders
value: object
- name: allowedCaCerts
value:
- string
- name: oauthConfig
value:
- name: clientId
value: string
- name: clientSecret
value: string
- name: tokenEndpoint
value: string
- name: scopes
value:
- string
- name: serviceAgentAuth
value: string
- name: webhookType
value: string
- name: httpMethod
value: string
- name: requestBody
value: string
- name: parameterMapping
value: object
- name: serviceDirectory
value:
- name: service
value: string
- name: timeout
value: string
- name: disabled
value: boolean
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 }}';