Test an alert channel
POST
/api/v1/alerts/channels/test
const url = 'https://example.com/api/v1/alerts/channels/test';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"config":{},"id":1,"type":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/alerts/channels/test \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "config": {}, "id": 1, "type": "example" }'Delivers a test notification through the posted channel config. Secrets left as “***” are merged from the stored channel named by id.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Request body
Media typeapplication/json
object
config
object
id
integer
type
string
Examplegenerated
{ "config": {}, "id": 1, "type": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
message
string
Examplegenerated
{ "message": "example"}Bad request
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Unauthorized
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Forbidden
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Delivery failed
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Alerts disabled
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}