channels

OSA Webhook API

GET/api/channels

List notification channels

Query parameters

config_typestring

Filter by type, e.g. webhook.

Responses

200 Channels
totalnumberrequired
channelsChannel[]required
config_idstringrequired
created_time_msnumber
last_updated_time_msnumber
configobjectrequired
namestringrequired
descriptionstring
config_typestringrequired

webhook / slack / chime / microsoft_teams / email / smtp_account / sns …

is_enabledboolean
cURL
curl -X GET https://osawebhook.defenderx.sentrixsolution.com/api/channels?config_type=string
JavaScript
const res = await fetch("https://osawebhook.defenderx.sentrixsolution.com/api/channels", {
  method: "GET"
});
const data = await res.json();
Response 200
{
  "total": 0,
  "channels": [
    {
      "config_id": "string",
      "created_time_ms": 0,
      "last_updated_time_ms": 0,
      "config": {
        "name": "string",
        "description": "string",
        "config_type": "string",
        "is_enabled": true
      }
    }
  ]
}
POST/api/channels

Create a notification channel

Request body

config_idstring

Create only — omit to auto-generate.

configobjectrequired
namestringrequired
config_typestringrequired

Responses

201 Created401 Missing/wrong webhook secret (only when WEBHOOK_SECRET is set)422 config with name and config_type missing, or the plugin rejected it
config_idstringrequired
cURL
curl -X POST https://osawebhook.defenderx.sentrixsolution.com/api/channels \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"config_id":"string","config":{"name":"string","config_type":"string"}}'
JavaScript
const res = await fetch("https://osawebhook.defenderx.sentrixsolution.com/api/channels", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${token}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "config_id": "string",
    "config": {
      "name": "string",
      "config_type": "string"
    }
  })
});
const data = await res.json();
Response 201
{
  "config_id": "string"
}
GET/api/channels/{id}

Get one notification channel

Path parameters

idstringrequired

Responses

200 The channel404 Unknown config id
config_idstringrequired
created_time_msnumber
last_updated_time_msnumber
configobjectrequired
namestringrequired
descriptionstring
config_typestringrequired

webhook / slack / chime / microsoft_teams / email / smtp_account / sns …

is_enabledboolean
cURL
curl -X GET https://osawebhook.defenderx.sentrixsolution.com/api/channels/{id}
JavaScript
const res = await fetch("https://osawebhook.defenderx.sentrixsolution.com/api/channels/{id}", {
  method: "GET"
});
const data = await res.json();
Response 200
{
  "config_id": "string",
  "created_time_ms": 0,
  "last_updated_time_ms": 0,
  "config": {
    "name": "string",
    "description": "string",
    "config_type": "string",
    "is_enabled": true
  }
}
PUT/api/channels/{id}

Update a notification channel

Path parameters

idstringrequired

Request body

configobjectrequired

Responses

200 Updated401 Missing/wrong webhook secret (only when WEBHOOK_SECRET is set)
config_idstringrequired
cURL
curl -X PUT https://osawebhook.defenderx.sentrixsolution.com/api/channels/{id} \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"config":null}'
JavaScript
const res = await fetch("https://osawebhook.defenderx.sentrixsolution.com/api/channels/{id}", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${token}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "config": null
  })
});
const data = await res.json();
Response 200
{
  "config_id": "string"
}
DELETE/api/channels/{id}

Delete a notification channel

Path parameters

idstringrequired

Responses

200 Deleted401 Missing/wrong webhook secret (only when WEBHOOK_SECRET is set)
idstringrequired
deletedbooleanrequired
cURL
curl -X DELETE https://osawebhook.defenderx.sentrixsolution.com/api/channels/{id} \
  -H "Authorization: Bearer $TOKEN"
JavaScript
const res = await fetch("https://osawebhook.defenderx.sentrixsolution.com/api/channels/{id}", {
  method: "DELETE",
  headers: {
    "Authorization": `Bearer ${token}`
  }
});
const data = await res.json();
Response 200
{
  "id": "string",
  "deleted": true
}