Dialogflow API . projects . locations . agents . webhooks

Instance Methods

close()

Close httplib2 connections.

create(parent, body=None, x__xgafv=None)

Creates a webhook in the specified agent.

delete(name, force=None, x__xgafv=None)

Deletes the specified webhook.

get(name, x__xgafv=None)

Retrieves the specified webhook.

list(parent, pageSize=None, pageToken=None, x__xgafv=None)

Returns the list of all webhooks in the specified agent.

list_next(previous_request, previous_response)

Retrieves the next page of results.

patch(name, body=None, updateMask=None, x__xgafv=None)

Updates the specified webhook.

Method Details

close()
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
Creates a webhook in the specified agent.

Args:
  parent: string, Required. The agent to create a webhook for. Format: `projects//locations//agents/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
  "disabled": True or False, # Indicates whether the webhook is disabled.
  "displayName": "A String", # Required. The human-readable name of the webhook, unique within the agent.
  "genericWebService": { # Represents configuration for a generic web service. # Configuration for a generic web service.
    "allowedCaCerts": [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
      "A String",
    ],
    "password": "A String", # The password for HTTP Basic authentication.
    "requestHeaders": { # The HTTP request headers to send together with webhook requests.
      "a_key": "A String",
    },
    "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
    "username": "A String", # The user name for HTTP Basic authentication.
  },
  "name": "A String", # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
  "serviceDirectory": { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
    "genericWebService": { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
      "allowedCaCerts": [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
        "A String",
      ],
      "password": "A String", # The password for HTTP Basic authentication.
      "requestHeaders": { # The HTTP request headers to send together with webhook requests.
        "a_key": "A String",
      },
      "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
      "username": "A String", # The user name for HTTP Basic authentication.
    },
    "service": "A String", # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
  },
  "timeout": "A 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.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
  "disabled": True or False, # Indicates whether the webhook is disabled.
  "displayName": "A String", # Required. The human-readable name of the webhook, unique within the agent.
  "genericWebService": { # Represents configuration for a generic web service. # Configuration for a generic web service.
    "allowedCaCerts": [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
      "A String",
    ],
    "password": "A String", # The password for HTTP Basic authentication.
    "requestHeaders": { # The HTTP request headers to send together with webhook requests.
      "a_key": "A String",
    },
    "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
    "username": "A String", # The user name for HTTP Basic authentication.
  },
  "name": "A String", # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
  "serviceDirectory": { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
    "genericWebService": { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
      "allowedCaCerts": [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
        "A String",
      ],
      "password": "A String", # The password for HTTP Basic authentication.
      "requestHeaders": { # The HTTP request headers to send together with webhook requests.
        "a_key": "A String",
      },
      "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
      "username": "A String", # The user name for HTTP Basic authentication.
    },
    "service": "A String", # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
  },
  "timeout": "A 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.
}
delete(name, force=None, x__xgafv=None)
Deletes the specified webhook.

Args:
  name: string, Required. The name of the webhook to delete. Format: `projects//locations//agents//webhooks/`. (required)
  force: boolean, This field has no effect for webhook not being used. For webhooks that are used by pages/flows/transition route groups: * If `force` is set to false, an error will be returned with message indicating the referenced resources. * If `force` is set to true, Dialogflow will remove the webhook, as well as any references to the webhook (i.e. Webhook and tagin fulfillments that point to this webhook will be removed).
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
}
get(name, x__xgafv=None)
Retrieves the specified webhook.

Args:
  name: string, Required. The name of the webhook. Format: `projects//locations//agents//webhooks/`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
  "disabled": True or False, # Indicates whether the webhook is disabled.
  "displayName": "A String", # Required. The human-readable name of the webhook, unique within the agent.
  "genericWebService": { # Represents configuration for a generic web service. # Configuration for a generic web service.
    "allowedCaCerts": [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
      "A String",
    ],
    "password": "A String", # The password for HTTP Basic authentication.
    "requestHeaders": { # The HTTP request headers to send together with webhook requests.
      "a_key": "A String",
    },
    "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
    "username": "A String", # The user name for HTTP Basic authentication.
  },
  "name": "A String", # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
  "serviceDirectory": { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
    "genericWebService": { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
      "allowedCaCerts": [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
        "A String",
      ],
      "password": "A String", # The password for HTTP Basic authentication.
      "requestHeaders": { # The HTTP request headers to send together with webhook requests.
        "a_key": "A String",
      },
      "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
      "username": "A String", # The user name for HTTP Basic authentication.
    },
    "service": "A String", # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
  },
  "timeout": "A 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.
}
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Returns the list of all webhooks in the specified agent.

Args:
  parent: string, Required. The agent to list all webhooks for. Format: `projects//locations//agents/`. (required)
  pageSize: integer, The maximum number of items to return in a single page. By default 100 and at most 1000.
  pageToken: string, The next_page_token value returned from a previous list request.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response message for Webhooks.ListWebhooks.
  "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list.
  "webhooks": [ # The list of webhooks. There will be a maximum number of items returned based on the page_size field in the request.
    { # Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
      "disabled": True or False, # Indicates whether the webhook is disabled.
      "displayName": "A String", # Required. The human-readable name of the webhook, unique within the agent.
      "genericWebService": { # Represents configuration for a generic web service. # Configuration for a generic web service.
        "allowedCaCerts": [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
          "A String",
        ],
        "password": "A String", # The password for HTTP Basic authentication.
        "requestHeaders": { # The HTTP request headers to send together with webhook requests.
          "a_key": "A String",
        },
        "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
        "username": "A String", # The user name for HTTP Basic authentication.
      },
      "name": "A String", # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
      "serviceDirectory": { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
        "genericWebService": { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
          "allowedCaCerts": [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
            "A String",
          ],
          "password": "A String", # The password for HTTP Basic authentication.
          "requestHeaders": { # The HTTP request headers to send together with webhook requests.
            "a_key": "A String",
          },
          "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
          "username": "A String", # The user name for HTTP Basic authentication.
        },
        "service": "A String", # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
      },
      "timeout": "A 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.
    },
  ],
}
list_next(previous_request, previous_response)
Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.
    
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates the specified webhook.

Args:
  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/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
  "disabled": True or False, # Indicates whether the webhook is disabled.
  "displayName": "A String", # Required. The human-readable name of the webhook, unique within the agent.
  "genericWebService": { # Represents configuration for a generic web service. # Configuration for a generic web service.
    "allowedCaCerts": [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
      "A String",
    ],
    "password": "A String", # The password for HTTP Basic authentication.
    "requestHeaders": { # The HTTP request headers to send together with webhook requests.
      "a_key": "A String",
    },
    "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
    "username": "A String", # The user name for HTTP Basic authentication.
  },
  "name": "A String", # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
  "serviceDirectory": { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
    "genericWebService": { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
      "allowedCaCerts": [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
        "A String",
      ],
      "password": "A String", # The password for HTTP Basic authentication.
      "requestHeaders": { # The HTTP request headers to send together with webhook requests.
        "a_key": "A String",
      },
      "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
      "username": "A String", # The user name for HTTP Basic authentication.
    },
    "service": "A String", # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
  },
  "timeout": "A 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.
}

  updateMask: string, The mask to control which fields get updated. If the mask is not present, all fields will be updated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
  "disabled": True or False, # Indicates whether the webhook is disabled.
  "displayName": "A String", # Required. The human-readable name of the webhook, unique within the agent.
  "genericWebService": { # Represents configuration for a generic web service. # Configuration for a generic web service.
    "allowedCaCerts": [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
      "A String",
    ],
    "password": "A String", # The password for HTTP Basic authentication.
    "requestHeaders": { # The HTTP request headers to send together with webhook requests.
      "a_key": "A String",
    },
    "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
    "username": "A String", # The user name for HTTP Basic authentication.
  },
  "name": "A String", # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
  "serviceDirectory": { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
    "genericWebService": { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
      "allowedCaCerts": [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
        "A String",
      ],
      "password": "A String", # The password for HTTP Basic authentication.
      "requestHeaders": { # The HTTP request headers to send together with webhook requests.
        "a_key": "A String",
      },
      "uri": "A String", # Required. The webhook URI for receiving POST requests. It must use https protocol.
      "username": "A String", # The user name for HTTP Basic authentication.
    },
    "service": "A String", # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
  },
  "timeout": "A 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.
}