logtypes

OSA Webhook API

GET/api/logtypes

List log types

All registered log types, name ascending. Data source for the rule form's category select.

Responses

200 Log types
totalnumberrequired
logTypesLogType[]required
idstringrequired

logtype _search hit _id — used for DELETE (not the name).

namestringrequired
descriptionstring
categorystring
sourcestring

Sigma (built-in) / Custom

cURL
curl -X GET https://osawebhook.defenderx.sentrixsolution.com/api/logtypes
JavaScript
const res = await fetch("https://osawebhook.defenderx.sentrixsolution.com/api/logtypes", {
  method: "GET"
});
const data = await res.json();
Response 200
{
  "total": 0,
  "logTypes": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "category": "string",
      "source": "string"
    }
  ]
}
POST/api/logtypes

Create a custom log type

Request body

namestringrequired
descriptionstring

Responses

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

Delete a custom log type

`id` is the logtype _search hit `_id`, not the name. Built-in (source=Sigma) types cannot be deleted.

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/logtypes/{id} \
  -H "Authorization: Bearer $TOKEN"
JavaScript
const res = await fetch("https://osawebhook.defenderx.sentrixsolution.com/api/logtypes/{id}", {
  method: "DELETE",
  headers: {
    "Authorization": `Bearer ${token}`
  }
});
const data = await res.json();
Response 200
{
  "id": "string",
  "deleted": true
}