List the organisation's alert channels
GET
/api/v3/organizations/{organisation}/projects/{project}/alert-channels
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/test-org/projects/test-project/alert-channels';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://dashboard.quantcdn.io/api/v3/organizations/test-org/projects/test-project/alert-channels \ --header 'Authorization: Bearer <token>'Returns every alert channel of the organisation (channels are organisation-wide; the project segment lets a project-limited token call it). Each item has the ID, name, type and a masked hint only. Needs the alert-channels:read scope and the view_alert_channels permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organisation
required
string
The organisation machine name
Example
test-orgproject
required
string
The project machine name
Example
test-projectResponses
Section titled “Responses”The organisation’s alert channels
Media typeapplication/json
object
channels
required
Array<object>
An alert channel as the public API returns it. The secret (webhook URL or address list) is never returned.
object
id
required
The channel ID
string
name
required
string
type
required
string
hint
required
A masked hint of the destination
string
Example
{ "channels": [ { "id": "ch_abcdefghijklmnopqrst", "name": "Ops Slack", "type": "slack", "hint": "hooks.slack.com/…/AbCd" } ]}Unauthorized
Media typeapplication/json
object
message
required
Error message
string
error
required
Error flag
boolean
Example
{ "message": "The requested resource was not found", "error": true}The token or role cannot read alert channels, or the token is limited to another project
Media typeapplication/json
object
message
required
Error message
string
error
required
Error flag
boolean
Example
{ "message": "The requested resource was not found", "error": true}Alert channels are not available on this platform
Media typeapplication/json
object
error
required
string
Example
{ "error": "Alert channels are unavailable"}The alerts service did not answer
Media typeapplication/json
object
error
required
string
Example
{ "error": "Alert channels are unavailable"}