Test an alert integration
import requests
url = "https://platform.ankra.app/api/v1/org/alerts/integrations/{integration_id}/test"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/alerts/integrations/{integration_id}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/alerts/integrations/{integration_id}/test \
--header 'Authorization: Bearer <token>'{
"success": true,
"status_code": 123,
"response_time_ms": 123,
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Alerts
Test an alert integration
Sends a test alert to a saved integration (its webhook URL or its Slack or Teams channel) and returns whether delivery succeeded, with the HTTP status and response time. The result is recorded as the integration’s last test.
POST
/
api
/
v1
/
org
/
alerts
/
integrations
/
{integration_id}
/
test
Test an alert integration
import requests
url = "https://platform.ankra.app/api/v1/org/alerts/integrations/{integration_id}/test"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/alerts/integrations/{integration_id}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/alerts/integrations/{integration_id}/test \
--header 'Authorization: Bearer <token>'{
"success": true,
"status_code": 123,
"response_time_ms": 123,
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.