Reports
Related guide: Query reports.
Common format
All reports use GET, require Authorization: Bearer <access_token> and Accept: application/json, and respond in the same format:
| Field | Type | Description |
|---|---|---|
data | array or null | Records found. null when there are no records. |
next | string | URI of the next page. Empty when there is no next page. |
All of them require the stcpadminsvc.report_evt_sys ≥ 1 permission in the operator’s scope.
Common parameters
| Parameter | Type | Description |
|---|---|---|
start | integer | Required. Period start (Unix timestamp in milliseconds). |
end | integer | Required. Period end (Unix timestamp in milliseconds). |
msg | string | Part of the message text. |
code | string | Message code, such as MSG0065. |
limit | integer | Records per page. Default 100; maximum 15000. |
index | integer | Pagination index, given in the next URI. |
Responses
| HTTP | Meaning |
|---|---|
200 | Query completed. |
400 | Missing or malformed Authorization header. |
401 | Invalid or expired token. |
403 | Operator without the report permission, or start/end missing or not integers. |
500 | Internal error. |
Note
The API responds 403, not 400, when start or end are missing or are not integers. The error message names the parameter, for example start should be an integer.
The full contract, with every parameter and example, is in the OpenAPI specification.
GET /reports/v2/system
System events of the platform modules.
| Parameter | Type | Description |
|---|---|---|
instance | string | Instance. |
| Common | — | start, end, msg, code, limit and index. See Common format. |
data[] fields:
| Field | Type | Description |
|---|---|---|
DATAHORA | string | Date and time of the occurrence. |
INSTANCE | string | Instance. |
USUARIO | string | Module that recorded the event. |
CODIGOMENSAGEM | string | Event code (e.g. MSG0910). |
MENSAGEM | string | Event message. |
{
"data": [
{
"DATAHORA": "2025-12-20T19:54:17-03:00",
"INSTANCE": "STCPGEMINI",
"USUARIO": "<STCPDirectLink>",
"CODIGOMENSAGEM": "MSG0910",
"MENSAGEM": "code=MSG0910 module=<STCPDirectLink> msg=..."
}
],
"next": "/reports/v2/system?end=1786579199000&index=44497&instance=STCPGEMINI&limit=&msg=&start=1785553200000"
}GET /reports/v2/users
Events of user connections.
| Parameter | Type | Description |
|---|---|---|
instance | string | Instance. |
user | string, repeatable | User. Repeat the parameter for more than one user. |
| Common | — | start, end, msg, code, limit and index. |
data[] fields: same as /reports/v2/system, with USUARIO holding the user.
{
"data": [
{
"DATAHORA": "2025-12-20T20:03:05-03:00",
"INSTANCE": "STCPGEMINI",
"USUARIO": "01USER",
"CODIGOMENSAGEM": "MSG0065",
"MENSAGEM": "code=MSG0065 direction=OUT msg=\"fim de conexao de saída...\""
}
],
"next": "/reports/v2/users?end=1786579199000&index=45011&instance=STCPGEMINI&limit=1&start=1785553200000"
}GET /reports/v2/instance
All messages logged for the instance.
| Parameter | Type | Description |
|---|---|---|
instance | string | Instance. |
user | string, repeatable | User. |
| Common | — | start, end, msg, code, limit and index. |
data[] fields: same as /reports/v2/system.
GET /reports/v2/operators
Operator activities, including calls made through the API.
| Parameter | Type | Description |
|---|---|---|
operador | string | Operator. |
| Common | — | start, end, msg, code, limit and index. |
data[] fields:
| Field | Type | Description |
|---|---|---|
OPERADOR | string | Operator associated with the event. |
MODULO | string | Module that recorded the event. |
CODIGOMENSAGEM | string | Event code. |
MENSAGEM | string | Operation details (service, operator, status, method and path). |
DATAHORA | string | Date and time of the occurrence. |
{
"data": [
{
"OPERADOR": "stcpadmin",
"MODULO": "<STCPRestAPI>",
"CODIGOMENSAGEM": "MSG3100",
"MENSAGEM": "service=riversoft-rest-api operator=stcpadmin status=200 method=GET path=/reports/v2/operators?...",
"DATAHORA": "2026-08-12T05:16:02-03:00"
}
],
"next": "/reports/v2/operators?end=1786589999000&index=47043&limit=100&msg=&operador=&start=1786503600000"
}GET /reports/v2/transfers
Transfer history.
| Parameter | Type | Description |
|---|---|---|
instance | string | Instance. |
user | string, repeatable | User. Each user corresponds to a single mailbox. |
tags | string, repeatable | File type tag. |
events | integer, repeatable | 5 = transmission; 7 = reception. Repeat the parameter for both. |
results | integer | 0 = successful only; -1 = failed only. Omit it for both. |
filename | string | File name. |
| Common | — | start, end, msg, code, limit and index. |
data[] fields:
| Field | Type | Description |
|---|---|---|
DATAHORA | string | Date and time of the occurrence. |
INSTANCE | string | Instance. |
USUARIO | string | User (and their mailbox) or module. |
CONEXAO | string | Connection or routing (Riversoft STCP Gemini Rename) details. |
DATAARQUIVO | string | File date. |
HORAARQUIVO | string | File time. |
EVENTO | integer | 5 = transmission; 7 = reception. |
MAXTAMREG | integer | Fixed or variable record length (LRECL), in bytes. |
NUMREG | integer | Number of records. |
MENSAGEM | string | System message. |
NOMEARQUIVO | string | File name. |
TAGS | string | File type tags. |
PROCID | integer | Internal process code. |
REDE | string | STCP network or function used. |
RESULTADO | integer | Return code: 0 = success; any other value = error code. |
TAMARQUIVO | integer | File size. |
THREADID | integer | Thread that ran the process. |
TIPOREC | string | Record format (RECFM). |
DIAS | integer | Days since the occurrence. |
{
"data": [
{
"DATAHORA": "2025-12-19T15:18:53Z",
"INSTANCE": "STCPGEMINI",
"USUARIO": "01USER",
"CONEXAO": "[TCP-IN-oTLS] R:203.0.113.45:10400 L:198.51.100.10:6619",
"DATAARQUIVO": "20251219",
"EVENTO": 5,
"HORAARQUIVO": "1513573419",
"MAXTAMREG": 0,
"NUMREG": 0,
"MENSAGEM": "Fim de transmissao",
"NOMEARQUIVO": "/stcp/data/STCPGEMINI/01USER/SAIDA/file.txt",
"TAGS": "",
"PROCID": 45325,
"REDE": "IN",
"RESULTADO": 0,
"TAMARQUIVO": 7972,
"THREADID": 3699586,
"TIPOREC": "U",
"DIAS": 0
}
],
"next": "/reports/v2/transfers?end=1786579199000&events=&index=4441011&limit=2&start=1704078000000"
}Audit
The audit reports return every record in the period, without pagination (next).
| Endpoint | Contents |
|---|---|
GET /reports/v2/audit/transfers | Transfers: transmissions (EVENTO = 5) and receptions (7). |
GET /reports/v2/audit/sessions | Sessions: inbound (EVENTO = 1) and outbound (3) connections. |
GET /reports/v2/audit/statistics | Transfer totals grouped by period. |
| Parameter | Type | Description |
|---|---|---|
start, end | integer | Required. Period (Unix timestamp in milliseconds). |
instance | string | Instance. Required for statistics. |
user | string, repeatable | User. |
tags | string, repeatable | File type tag. |
filename | string | File name. |
direction | string | transfers and sessions: in = inbound; out = outbound. Omit for both. |
status | string | transfers and sessions: error = with error; all = all. Omit for successful only. |
statistics | string | statistics: year, month, week, dayofweek, day or hour. Omit for the period total. |
curl -s -G "$API_BASE/reports/v2/audit/transfers" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data-urlencode "instance=STCPGEMINI" \
--data-urlencode "direction=in" \
--data-urlencode "status=all" \
--data-urlencode "start=1785553200000" \
--data-urlencode "end=1786579199000"