api/events

Returns events in a given time range.

ParameterDescriptionMandatory
tsstartStart period timestamp (format YYYYMMDDHHMMSS)Yes
tsendEnd period timestamp (format YYYYMMDDHHMMSS)Yes
tenantIn a multitenant environment, a user of the master tenant can use this parameter to specify the target tenant. If more than one tenant is passed, the result will be a cross-tenant search.No
classidClass IDs (Array)No
hostidHost IDs (Array)No
patternidPattern IDs (Array)No
multi_patternidIn a multitenant environment, use this parameter to specify different patterns for different tenants. Example: “multi_patternid”: {“tenant1” : [“11640”,“11630”],“tenant2” : [“10060”,“10061”]}No
limitLimit of the number of returned resultsNo
searchFilter on values of specified parameters. Example: “search”: [{“paramid”: “10433”, “paramval”: “.*admin”, “type”: “regex”}, {“paramid”: “10433”, “paramval”: “user1”}]No
search_opSearch operator for filters - “AND” or “OR” - default is ANDNo

Request

curl -s -k -X POST -H "Content-Type: application/json" -H "APIKEY: [YOUR_API_KEY]" -H "username: [YOUR_USERNAME]" -H "password: [YOUR_PASSWORD]" -d '{"tsstart": "20260703000000", "tsend": "20260703235959", "tenant" : ["tenant1"], "limit": 3}' 'https://1.2.3.4:4000/api/events'

Response

[
  {
    "uuid": "76561378-7661-11f1-86aa-000000001767",
    "ts": "20260703000000",
    "hostid": 4,
    "classid": 0,
    "class_name": "PFSense Connections",
    "patternid": 11286,
    "pattern_name": "[PFSense] allowed TCP connection",
    "host_name": "",
    "host_ip": "[THIS_IS_AN_IP]",
    "tenant": "tenant1",
    "tenant_name": "Test1",
    "ancestors": "",
    "values": {
      "SourceIP": "[THIS_IS_AN_IP]",
      "DestinationIP": "[THIS_IS_AN_IP]",
      "Port": "443",
      "Size": "47286",
      "(GEO) DestinationIP": "Unknown",
      "(GEO) SourceIP": "Unknown",
      "Interface": "em0"
    }
  },
  {
    "uuid": "76561378-7661-11f1-86aa-00000000176b",
    "ts": "20260703000000",
    "hostid": 4,
    "classid": 0,
    "class_name": "PFSense Web surfing",
    "patternid": 10763,
    "pattern_name": "[PFSense] Web surfing",
    "host_name": "",
    "host_ip": "[THIS_IS_AN_IP]",
    "tenant": "tenant1",
    "tenant_name": "Test1",
    "ancestors": "",
    "values": {
      "SourceIP": "[THIS_IS_AN_IP]",
      "DestinationIP": "[THIS_IS_AN_IP]",
      "FWAction": "pass",
      "DestinationPort": "443",
      "(GEO) DestinationIP": "Unknown",
      "FWInterface": "igb1"
    }
  },
  {
    "uuid": "76561378-7661-11f1-86aa-00000000176b",
    "ts": "20260703000000",
    "hostid": 4,
    "classid": 0,
    "class_name": "PFSense Connections",
    "patternid": 11286,
    "pattern_name": "[PFSense] allowed TCP connection",
    "host_name": "",
    "host_ip": "[THIS_IS_AN_IP]",
    "tenant": "tenant1",
    "tenant_name": "Test1",
    "ancestors": "",
    "values": {
      "SourceIP": "[THIS_IS_AN_IP]",
      "DestinationIP": "[THIS_IS_AN_IP]",
      "Port": "443",
      "Size": "1534",
      "(GEO) DestinationIP": "Unknown",
      "(GEO) SourceIP": "Italy",
      "Interface": "igb1"
    }
  }
]

api/logs

Return logs in a given time range

ParameterDescriptionMandatory
tsstartStart period timestamp (format YYYYMMDDHHMMSS)Yes
tsendEnd period timestamp (format YYYYMMDDHHMMSS)Yes
tenantIn a multitenant environment, a user of the master tenant can use this parameter to specify the target tenant. If more than one tenant is passed, the result will be a cross-tenant search.No
hostidHost IDs (array)No
searchString filter as in SGBox Historical Search pageNo
caseCase sensitive search flag (boolean)No
limitLimit of the number of returned resultsNo

Request

curl -s -k -X POST -H "Content-Type: application/json" -H "APIKEY: [YOUR_API_KEY]" -H "username: [YOUR_USERNAME]" -H "password: [YOUR_PASSWORD]" -d '{"tsstart": "20260703000000", "tsend": "20260703235959", "tenant" : ["tenant1"], "limit": 3, "search":"logon OR logoff" }' 'https://1.2.3.4:4000/api/logs'

Response

[
  {
    "uuid": "76561378-7661-11f1-86aa-0000000003c8",
    "ts": "2026-07-03 00:00:00",
    "hostid": 18,
    "tsdec": "000000",
    "host_ip": "[THIS_IS_AN_IP]",
    "hostname": "",
    "line": "this is the log line",
    "tenant": "tenant1"
  },
  {
    "uuid": "76561378-7661-11f1-86aa-0000000003c9",
    "ts": "2026-07-03 00:00:00",
    "hostid": 18,
    "tsdec": "000000",
    "host_ip": "[THIS_IS_AN_IP]",
    "hostname": "",
    "line": "this is the log line",
    "tenant": "tenant1"
  },
  {
    "uuid": "76561378-7661-11f1-86aa-0000000003ca",
    "ts": "2026-07-03 00:00:00",
    "hostid": 18,
    "tsdec": "000000",
    "host_ip": "[THIS_IS_AN_IP]",
    "hostname": "",
    "line": "this is the log line",
    "tenant": "tenant1"
  }
]

api/events_count

Count events extracted in a given time range

ParameterDescriptionMandatory
tsstartStart period timestamp (format YYYYMMDDHHMMSS)Yes
tsendEnd period timestamp (format YYYYMMDDHHMMSS)Yes
tenantIn a multitenant environment, a user of the master tenant can use this parameter to specify the target tenant. If more than one tenant is passed, the result will be a cross-tenant search.No
hostidHost IDs (Array)No
patternidPattern IDs (Array)No
group_bySpecifies grouping (‘host’ or ‘pattern’). Without any grouping, all events are counted togetherNo
searchFilter on values of specified parameters. Example: “search”: [{“paramid”: “10433”, “paramval”: “.*admin”, “type”: “regex”}, {“paramid”: “10433”, “paramval”: “user1”}]No
search_opSearch operator for filters - “AND” or “OR” - default is ANDNo

Request

curl -s -k -X POST -H "Content-Type: application/json" -H "APIKEY: [YOUR_API_KEY]" -H "username: [YOUR_USERNAME]" -H "password: [YOUR_PASSWORD]" -d '{"tsstart": "20260703000000", "tsend": "20260703235959", "tenant" : ["tenant1"]}' 'https://1.2.3.4:4000/api/events_count'

Response

[
  {
    "count": "1086459"
  }
]

api/logs_count

Count logs received in a given time range, with size in bytes also

ParameterDescriptionMandatory
tsstartStart period timestamp/dateYes
tsendEnd period timestamp/dateYes
tenantIn a multitenant environment, a user of the master tenant can use this parameter to specify the target tenant. If more than one tenant is passed, the result will be a cross-tenant search.No
hostidHost IDs (Array)No
severityfilter severity (e.g. warning, error)No
facilityfilter facilityNo
group_bySpecifies grouping (‘host’ or ‘tenant’). Without any grouping, all events are counted togetherNo

Request

curl -s -k -X POST -H "Content-Type: application/json" -H "APIKEY: [YOUR_API_KEY]" -H "username: [YOUR_USERNAME]" -H "password: [YOUR_PASSWORD]" -d '{"tsstart": "20260703000000", "tsend": "20260703235959", "tenant" : ["tenant1"]}' 'https://1.2.3.4:4000/api/logs_count'

Response

[
  {
    "count": "8855281",
    "size": "1831219344"
  }
]