Provisioning API – Webhooks
Overview
The SearchStax Managed Search service provides an API supporting the creation, deletion and management of SearchStax Cloud deployments.
Platinum and Platinum Plus Clients Only!
The SearchStax API suite is available to our Platinum and Platinum Plus clients only, as noted on our Pricing page.
This page describes how to view webhooks using API methods.
The API can be accessed through any tool that assembles HTTP requests and dispatch them to a server. Among these would be the Python coreapi package, the Postman tool, and cURL. For Windows, use PowerShell 7+.
Account Owner, Admin, or Technical Contact
To run the SearchStax Provisioning API, you must be the account Owner, an account Admin, or a Technical Contact. See SearchStax User Roles.
Symbols enclosed in carets (< and >) such as <username> are metavariables. Substitute your local values when you encounter them in the examples.
Contents:
Related Pages:
- Authentication API
- Users API
- Basic Auth API
- IP Filtering API
- Deployment API
- Private VPC API
- DNS Alias API
- Backup/Restore API
- Custom JARs API
- Tags API
- Alerts API
- Zookeeper API
Webhooks
The Provisioning API includes a method for listing the webhooks that have been created through the SearchStax dashboard. This provides the webhook IDs that can be optionally included when creating threshold and heartbeat alerts.
account > webhook > list
This method lists all of the webhooks for a deployment, along with their properties.
GET /api/rest/v2/account/<account_name>/webhook/
where <account_name> is the name of the tenant account.
This method uses Token authentication.
There is no request body.
When invoked from Linux (Bash script):
curl --request GET "https://app.searchstax.com/api/rest/v2/account/<account_name>/webhook/" \
--header "Authorization: Token <token>"
When invoked from Windows (PowerShell script):
$ACCOUNT = "AccountName"
$RESULTS = Invoke-RestMethod -Method Get -Headers $headers `
-uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/webhook/"
$RESULTS = $RESULTS | ConvertTo-Json
The response is a JSON document containing a list of webhooks and their properties.
{
"results": [
{
"id": 7,
"account": "AccountName",
"payload": {
"alertThresholdValue_ws": "§§$ALERT_THRESHOLD_VALUE§§",
"alertRuleName_ws": "§§$ALERT_TITLE§§",
"metric_ws": "§§$ALERT_METRIC§§",
"alertThresholdOperator_ws": "§§$ALERT_THRESHOLD_OPERATOR§§",
"alertid_ws": "§§$ALERT_ID§§",
"deployment_id_ws": "§§$DEPLOYMENT_UID§§",
"deployment_ws": "§§$DEPLOYMENT_NAME§§",
"host_ws": "§§$HOSTNAME§§",
"alert_status_ws": "none",
"alertTimeInUTC_ws": "§§$DATE§§",
"value_ws": "§§$ALERT_CURRENT_VALUE§§",
"alertStatus_ws": "§§$ALERT_STATUS§§"
},
"custom_headers": {},
"created": "2020-01-27T18:05:00.516230Z",
"updated": null,
"name": "webhookInput",
"url": "https://ss123456-l70y8miq-eastus-azure.searchstax.co/solr/webhookInput/update",
"url_ssl_ignore": true,
"encode_as_form": false,
"paused": true
}
]
}
Questions?
Do not hesitate to contact the SearchStax Support Desk.