String. Name of the webhook.
Webhook configuration and management via REST APIs
The REST API framework is intended for automation and integration scenarios, for example, creating webhooks programmatically or delivering Liveboard report attachments to a cloud storage destination.
The following webhook REST APIs are available for webhook configuration and management:
-
POST /api/rest/2.0/webhooks/create
Allows creating a webhook for the Liveboard schedule event type, configuring storage destination for webhook delivery. -
GET /api/rest/2.0/webhooks/storage-config
Gets storage setup information for configuring customer-managed storage. -
POST /api/rest/2.0/webhooks/search
Gets a list of webhooks configured in the Org. -
POST /api/rest/2.0/webhooks/{webhook_identifier}/update
Allows updating configuration properties. -
POST /api/rest/2.0/webhooks/delete
Deletes one or more webhooks.
Creating a webhook🔗
To create a webhook for the Liveboard schedule event, send a POST request to the
/api/rest/2.0/webhooks/create API endpoint. ThoughtSpot allows only one webhook per Org.
|
Important
|
Before creating a webhook, ensure that a webhook communication channel is configured for your Org or at the cluster level. |
Request parameters🔗
| Parameter | Description | ||
|---|---|---|---|
| |||
| String. Description text for the webhook. | ||
| String. The fully qualified URL of the listening endpoint to which you want to send webhook notifications. | ||
| A JSON map of key-value pairs to append as query parameters in the webhook URL. | ||
| Array of strings. List of events to subscribe to. Specify | ||
| String. Status of the webhook. Specify
| ||
| Defines the authentication method and credentials ThoughtSpot uses when sending HTTP requests to the webhook endpoint. Specify the authentication type:
| ||
| Signature verification parameters for the webhook endpoint to verify the authenticity of incoming requests. ThoughtSpot signs the webhook payload with a secret, and your webhook endpoint validates the signature using the shared secret. If using signature verification, specify the following parameters:
| ||
| Configuration parameters for the cloud storage destination. ThoughtSpot supports AWS S3 and Google Cloud Storage (GCS) as storage destinations. For more information, see Deliver Liveboard reports to AWS S3 storage and Deliver Liveboard reports to GCS storage. | ||
| Array of key-value pairs. Custom HTTP headers to include in every outbound webhook request, in addition to authentication headers and standard HTTP headers such as
|
Example request🔗
curl -X POST \
--url 'https://{ThoughtSpot-Host}/api/rest/2.0/webhooks/create' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
--data-raw '{
"name": "webhook-lb-event",
"url": "https://webhook.site/6643eba5-9d3e-42a1-85e0-bb686ba1524d",
"events": [
"LIVEBOARD_SCHEDULE"
],
"authentication": {
"BEARER_TOKEN": "Bearer {AUTH_TOKEN}"
},
"description": "Liveboard report"
}'
API response🔗
If webhook creation is successful, the API returns a 204 response code.
Retrieving storage information for webhook configuration🔗
To get storage setup information for your ThoughtSpot instance required for configuring a webhook storage destination, use the GET /api/rest/2.0/webhooks/storage-config API.
Example request🔗
curl -X GET \
--url 'https://{ThoughtSpot-Host}/api/rest/2.0/webhooks/storage-config' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'
API response🔗
This API endpoint returns data based on whether the ThoughtSpot instance is hosted on AWS or GCP.
-
For AWS-hosted ThoughtSpot instances with S3 storage, the API endpoint returns a JSON array with the platform AWS account ID, IAM trust policy template, and storage setup instructions.
-
For GCP-hosted ThoughtSpot instances with S3 storage, the API endpoint returns a JSON array with the GCP service account ID, OIDC provider URL, IAM trust policy template, and storage setup instructions.
-
For GCP-hosted ThoughtSpot instances with GCS storage, the API endpoint returns a JSON array with the platform GCP service account email, the IAM role to grant for service account impersonation, and storage setup instructions.
Top-level fields🔗
The following fields are included in the response, regardless of the storage provider.
-
storage_type: The category of storage destination. This field is alwaysOBJECT_STORAGEfor blob/bucket storage targets, including both AWS S3 and Google Cloud Storage. -
provider: Cloud storage service provider. Returns one of the following values:-
AWS_S3for Amazon S3 bucket -
GCP_GCSfor Google Cloud Storage bucket
-
-
config: A configuration object that contains the provider-specific setup details for the storage destination. The structure of this object varies based on theconfig_typefield within it. Theconfig_typecan be one of the following values:-
AWS_TO_S3_STORAGE: AWS-hosted ThoughtSpot instance writing to an S3 bucket -
GCP_TO_S3_STORAGE: GCP-hosted ThoughtSpot instance writing to an S3 bucket -
GCP_TO_GCS_STORAGE: GCP-hosted ThoughtSpot instance writing to a GCS bucket
-