Audit
The institution's event log, with statistics and export.
List the institution's audit events
GET /auditoria
Access: Requires the capability ADMINISTRAR, in some scope (the response only includes what the person can see). Success status: 200.
Query parameters
| Parameter | Type | Required | Constraints | Description |
|---|---|---|---|---|
de | string | no | ^\d{4}-\d{2}-\d{2}$ | Window start date (YYYY-MM-DD), inclusive. |
ate | string | no | ^\d{4}-\d{2}-\d{2}$ | Window end date (YYYY-MM-DD), inclusive. |
acao | string | no | ^[a-z][a-z0-9_.]{0,59}$ | Filter by event type (e.g. presenca.confirmada). |
instituicaoId | string (uuid) | no | Institution id. | |
atorId | string (uuid) | no | Filter by events made by this person. | |
fuso | string | no | 1–64 characters | IANA time zone used to group by day (e.g. America/Sao_Paulo). |
cursor | string | no | to 200 characters; ^[A-Za-z0-9_-]+$ | Cursor returned by the previous page. |
limite | integer | no | 1…100; default: 50 | How many items per page (1 to 200; the default varies by route, usually 50). |
Response
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
items | list of AuditoriaItem | yes | ||
proximo | string or null | yes |
On error: ErroApi model.
Example
curl -X GET "$API/auditoria" -H "Authorization: Bearer $TOKEN"Audit event statistics
GET /auditoria/estatisticas
Access: Requires the capability ADMINISTRAR, in some scope (the response only includes what the person can see). Success status: 200.
Query parameters
| Parameter | Type | Required | Constraints | Description |
|---|---|---|---|---|
de | string | no | ^\d{4}-\d{2}-\d{2}$ | Window start date (YYYY-MM-DD), inclusive. |
ate | string | no | ^\d{4}-\d{2}-\d{2}$ | Window end date (YYYY-MM-DD), inclusive. |
acao | string | no | ^[a-z][a-z0-9_.]{0,59}$ | Filter by event type (e.g. presenca.confirmada). |
instituicaoId | string (uuid) | no | Institution id. | |
atorId | string (uuid) | no | Filter by events made by this person. | |
fuso | string | no | 1–64 characters | IANA time zone used to group by day (e.g. America/Sao_Paulo). |
Response
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
de | Data | yes | ||
ate | Data | yes | ||
total | integer | yes | 0… | |
porAcao | list of object | yes | ||
porAcao[].acao | string | yes | ||
porAcao[].total | integer | yes | 0… | |
porDia | list of object | yes | ||
porDia[].dia | Data | yes | ||
porDia[].total | integer | yes | 0… |
On error: ErroApi model.
Example
curl -X GET "$API/auditoria/estatisticas" -H "Authorization: Bearer $TOKEN"Export the audit log as CSV
GET /auditoria/exportar
Access: Requires the capability ADMINISTRAR, in some scope (the response only includes what the person can see). Rate limit: up to 10 calls every 60 s per origin. Success status: 200.
Query parameters
| Parameter | Type | Required | Constraints | Description |
|---|---|---|---|---|
de | string | no | ^\d{4}-\d{2}-\d{2}$ | Window start date (YYYY-MM-DD), inclusive. |
ate | string | no | ^\d{4}-\d{2}-\d{2}$ | Window end date (YYYY-MM-DD), inclusive. |
acao | string | no | ^[a-z][a-z0-9_.]{0,59}$ | Filter by event type (e.g. presenca.confirmada). |
instituicaoId | string (uuid) | no | Institution id. | |
atorId | string (uuid) | no | Filter by events made by this person. | |
fuso | string | no | 1–64 characters | IANA time zone used to group by day (e.g. America/Sao_Paulo). |
Response
CSV file (text/csv).
On error: ErroApi model.
Example
curl -X GET "$API/auditoria/exportar" -H "Authorization: Bearer $TOKEN"