Skip to content

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:

FieldTypeDescription
dataarray or nullRecords found. null when there are no records.
nextstringURI 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

ParameterTypeDescription
startintegerRequired. Period start (Unix timestamp in milliseconds).
endintegerRequired. Period end (Unix timestamp in milliseconds).
msgstringPart of the message text.
codestringMessage code, such as MSG0065.
limitintegerRecords per page. Default 100; maximum 15000.
indexintegerPagination index, given in the next URI.

Responses

HTTPMeaning
200Query completed.
400Missing or malformed Authorization header.
401Invalid or expired token.
403Operator without the report permission, or start/end missing or not integers.
500Internal 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.

ParameterTypeDescription
instancestringInstance.
Common—start, end, msg, code, limit and index. See Common format.

data[] fields:

FieldTypeDescription
DATAHORAstringDate and time of the occurrence.
INSTANCEstringInstance.
USUARIOstringModule that recorded the event.
CODIGOMENSAGEMstringEvent code (e.g. MSG0910).
MENSAGEMstringEvent 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.

ParameterTypeDescription
instancestringInstance.
userstring, repeatableUser. 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.

ParameterTypeDescription
instancestringInstance.
userstring, repeatableUser.
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.

ParameterTypeDescription
operadorstringOperator.
Common—start, end, msg, code, limit and index.

data[] fields:

FieldTypeDescription
OPERADORstringOperator associated with the event.
MODULOstringModule that recorded the event.
CODIGOMENSAGEMstringEvent code.
MENSAGEMstringOperation details (service, operator, status, method and path).
DATAHORAstringDate 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.

ParameterTypeDescription
instancestringInstance.
userstring, repeatableUser. Each user corresponds to a single mailbox.
tagsstring, repeatableFile type tag.
eventsinteger, repeatable5 = transmission; 7 = reception. Repeat the parameter for both.
resultsinteger0 = successful only; -1 = failed only. Omit it for both.
filenamestringFile name.
Common—start, end, msg, code, limit and index.

data[] fields:

FieldTypeDescription
DATAHORAstringDate and time of the occurrence.
INSTANCEstringInstance.
USUARIOstringUser (and their mailbox) or module.
CONEXAOstringConnection or routing (Riversoft STCP Gemini Rename) details.
DATAARQUIVOstringFile date.
HORAARQUIVOstringFile time.
EVENTOinteger5 = transmission; 7 = reception.
MAXTAMREGintegerFixed or variable record length (LRECL), in bytes.
NUMREGintegerNumber of records.
MENSAGEMstringSystem message.
NOMEARQUIVOstringFile name.
TAGSstringFile type tags.
PROCIDintegerInternal process code.
REDEstringSTCP network or function used.
RESULTADOintegerReturn code: 0 = success; any other value = error code.
TAMARQUIVOintegerFile size.
THREADIDintegerThread that ran the process.
TIPORECstringRecord format (RECFM).
DIASintegerDays 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).

EndpointContents
GET /reports/v2/audit/transfersTransfers: transmissions (EVENTO = 5) and receptions (7).
GET /reports/v2/audit/sessionsSessions: inbound (EVENTO = 1) and outbound (3) connections.
GET /reports/v2/audit/statisticsTransfer totals grouped by period.
ParameterTypeDescription
start, endintegerRequired. Period (Unix timestamp in milliseconds).
instancestringInstance. Required for statistics.
userstring, repeatableUser.
tagsstring, repeatableFile type tag.
filenamestringFile name.
directionstringtransfers and sessions: in = inbound; out = outbound. Omit for both.
statusstringtransfers and sessions: error = with error; all = all. Omit for successful only.
statisticsstringstatistics: 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"