Skip to content

API reference / RivetIT

Alerts

GET /alerts Bearer token or API key

List combined RMM and backup alerts

Parameters

NameInTypeDescription
statusquerystring
severityquerystring (critical | error | warning | info)
sourcequerystring (all | rmm | backup)
client_idqueryinteger

Example request

curl "https://YOUR-HOST/api/v1/alerts" \
  -H "Authorization: Bearer $TOKEN"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/alerts",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/alerts", {
  method: "GET",
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/alerts");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Alert list

FieldTypeDescription
data array of object
data[].source string (rmm | backup)
data[].id integer
data[].severity string (critical | error | warning | info)
data[].message string
data[].subject string
data[].client_id integer
data[].client_name string
data[].status string
data[].created_at string
data[].ticket_id integer
data[].ticket_label string
total integer
Example response
json
{
    "data": [
        {
            "source": "rmm",
            "id": 1,
            "severity": "critical",
            "message": "string",
            "subject": "string",
            "client_id": 1,
            "client_name": "string",
            "status": "string",
            "created_at": "string",
            "ticket_id": 1,
            "ticket_label": "string"
        }
    ],
    "total": 1
}

403Authenticated but not permitted

FieldTypeDescription
error string
POST /alerts Bearer token or API key

Acknowledge or resolve an alert

Request body (application/json, required)

FieldTypeDescription
sourcerequired string (rmm | backup)
idrequired integer
actionrequired string (acknowledge | resolve)

Example request

curl -X POST "https://YOUR-HOST/api/v1/alerts" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"source":"rmm","id":1,"action":"acknowledge"}'
import requests

response = requests.post(
    "https://YOUR-HOST/api/v1/alerts",
    headers={"Authorization": f"Bearer {TOKEN}"},
    json={
        "source": "rmm",
        "id": 1,
        "action": "acknowledge"
    },
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/alerts", {
  method: "POST",
  headers: { "Authorization": `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
      "source": "rmm",
      "id": 1,
      "action": "acknowledge"
  }),
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/alerts");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token", "Content-Type: application/json"],
    CURLOPT_POSTFIELDS => '{"source":"rmm","id":1,"action":"acknowledge"}',
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Success

FieldTypeDescription
ok boolean
Example response
json
{
    "ok": true
}

400Bad request

FieldTypeDescription
error string

403Authenticated but not permitted

FieldTypeDescription
error string

404Resource not found

FieldTypeDescription
error string