API reference/Endpoints
Control Tests
POST /control-tests
Registers a control test. Accepts an API key or a session; the session requires permission to create control tests.
For a test with automatic verification, send checkDefinition (and, for types that depend on an integration, integrationId):
{
"controlId": "<id do controlo>",
"result": "NOT_TESTED",
"integrationId": "<id da integração WAZUH>",
"checkDefinition": { "kind": "wazuh_sca_rule", "params": { "pattern": "ssh", "minSeverity": "HIGH" } }
}
The server validates the type, the parameters and the required integration. If the check is valid, the test becomes AUTOMATED (the type sent is ignored). If it is invalid, the response is 400 with error: "Validation error" and the message in details.checkDefinition.
kind |
Required integration | Parameters (range, default) |
|---|---|---|
gws_admins_2sv |
GOOGLE_WORKSPACE |
none |
authentik_mfa_enrolment |
AUTHENTIK |
none |
wazuh_sca_failed |
WAZUH |
none |
wazuh_sca_rule |
WAZUH |
pattern (required, up to 200 characters), minSeverity (HIGH or CRITICAL, default HIGH) |
backup_coverage |
BACKUP_REPORT |
none |
alert_delivery_configured |
SLACK (looked up automatically) |
none |
policies_approved |
none | none |
risk_methodology_in_use |
none | minRisks (1 to 1000, 5) |
vendor_assessments_current |
none | days (30 to 1095, 365) |
assets_criticality_classified |
none | passPct (1 to 100, 90), partialPct (0 to 99, 50) |
awareness_program_active |
none | days (30 to 1095, 365) |
restore_test_recency |
none | days (30 to 1095, 365), titleContains (required, default restauro) |
devices_encrypted |
none (IT module) | passPct (1 to 100, 100), partialPct (0 to 99, 90) |
devices_checkin_recent |
none (IT module) | days (1 to 365, 30), passPct (1 to 100, 100), partialPct (0 to 99, 90) |
The last two types measure the equipment fleet (devices ASSIGNED, IN_STOCK and RETURN_PENDING): unknown encryption counts as unencrypted and, with no active devices, the result is FAIL. The evidence (ITOPS) lists the machines that fail.
Coming soonThis page will be available soon.