Skip to content

Status API

Monitor IPCom server health, performance, and detailed system information.

Status Endpoint

Returns a comprehensive status report of the IPCom server, including uptime, version, resource usage, device and database statistics, output status, websocket connections, modem status, and license information.

Request

http
GET /api/status

Authentication Required: Must include JWT token in Authorization header.

Example Request

bash
curl -X GET "http://your-server-ip:port/api/status" \
     -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response

Success (200 OK)

json
{
  "start_time": 1697539200,
  "uptime": 12345,
  "current_time": 1697540545,
  "local_time_zone": "Europe/Vilnius",
  "version": "5.0.0",
  "release": "R123",
  "tcp_connection_counts": {"Receiver1": 5, "Receiver2": 2},
  "cpu_usage": 12.5,
  "avg_cpu_usage": 10.2,
  "device_tracker": {
    "device_count_uid": 100,
    "device_count_oid": 50,
    "expiry_count": 2,
    "online_count": 90,
    "offline_count": 10,
    "sms_mode_count": 5,
    "ram_uid": 2048,
    "ram_oid": 1024
  },
  "database": {
    "db_version": "1",
    "event_count": 123456,
    "device_cache_oid_count": 50,
    "device_cache_oid_ram_count": 1024,
    "device_cache_partial_uid_count": 20,
    "device_cache_partial_uid_ram_count": 512,
    "table_sizes": {"events": 100000, "devices": 5000}
  },
  "output": {"outputName": {"destination": 10}},
  "instance_name": "MainInstance",
  "linux": {
    "cpu_time": 123456,
    "ram": 4096
  },
  "endpoint_call_counts": {"/api/status": 100, "/api/login": 200},
  "websocket": {
    "connected_users": [{"loginname":"user1","ip":"192.168.1.100"}]
  },
  "api_cert": {
    "status": "valid",
    "expiration_time": 1698000000
  },
  "data_history": {
    "hourly_events": [{"time":1697539200,"count":100,"average":10.5}],
    "tcp_connection_history": {"Receiver1": [5,6,7]}
  },
  "modem_status": {
    "Modem1": {
      "current_init_step": "initialized",
      "initialization_error": "",
      "is_failed": false,
      "no_pings": false,
      "network_status": "online"
    }
  },
  "output_filters": {
    "outputName": {
      "maps_by_receiver_count": 10,
      "maps_by_oid_count": 5,
      "maps_by_subgroup_count": 2,
      "maps_by_classif_count": 1,
      "maps_by_event_code_count": 3,
      "total_discarded_count": 0,
      "total_event_time_count": 1000
    }
  },
  "license": {
    "status": 1,
    "licensed_to": "Company",
    "object_limit": 1000,
    "user_limit": 100,
    "features": {"19": true, "20": true}
  }
}

Response Structure

Main Status Response

FieldTypeDescription
start_timeuint64Server start time (Unix timestamp)
uptimeuint64Server uptime in seconds
current_timeuint64Current server time (Unix timestamp, Linux only)
local_time_zonestringServer timezone (Linux only)
versionstringServer version
releasestringRelease identifier
tcp_connection_countsobjectActive TCP connections by receiver
cpu_usagefloat64Current CPU usage percentage
avg_cpu_usagefloat64Average CPU usage percentage
device_trackerobjectDevice tracking statistics
databaseobjectDatabase status and statistics
outputobjectOutput connection statistics
instance_namestringServer instance name
linuxobjectLinux system details
endpoint_call_countsobjectAPI endpoint usage statistics
websocketobjectWebSocket connection status
api_certobjectAPI certificate information
data_historyobjectHistorical data statistics
modem_statusobjectModem status by modem name
output_filtersobjectOutput filter statistics
licenseobjectLicense information and limits

Device Tracker

FieldTypeDescription
device_count_uidintNumber of devices with UID
device_count_oidintNumber of devices with OID
expiry_countintNumber of expired devices
online_countintNumber of online devices
offline_countintNumber of offline devices
sms_mode_countintNumber of devices in SMS mode
ram_uiduint64Memory usage for UID devices
ram_oiduint64Memory usage for OID devices

Database Status

FieldTypeDescription
db_versionstringDatabase schema version
event_countint64Total number of events
device_cache_oid_countintOID device cache count
device_cache_oid_ram_countuint64OID device cache memory usage
device_cache_partial_uid_countintPartial UID device cache count
device_cache_partial_uid_ram_countuint64Partial UID device cache memory
table_sizesobjectSize of database tables

Linux Details

FieldTypeDescription
cpu_timeuint64Total CPU time used
ramuint64Total RAM usage in MB

WebSocket Status

FieldTypeDescription
connected_usersarrayList of connected WebSocket users

Connected User Object

FieldTypeDescription
loginnamestringUsername of connected user
ipstringIP address of connected user

API Certificate Status

FieldTypeDescription
statusstringCertificate validity status
expiration_timeint64Certificate expiration time (Unix timestamp)

Data History

FieldTypeDescription
hourly_eventsarrayHourly event statistics
tcp_connection_historyobjectHistorical TCP connection data

Hourly Event Count Object

FieldTypeDescription
timeint64Hour timestamp
countint64Number of events in that hour
averagefloat64Average events per minute in that hour

Modem Status

FieldTypeDescription
current_init_stepstringCurrent initialization step
initialization_errorstringInitialization error message (if any)
is_failedboolWhether modem initialization failed
no_pingsboolWhether modem is not responding to pings
network_statusstringNetwork connectivity status

Filter Statistics

FieldTypeDescription
maps_by_receiver_countint64Number of receiver-based filter maps
maps_by_oid_countint64Number of OID-based filter maps
maps_by_subgroup_countint64Number of subgroup-based filter maps
maps_by_classif_countint64Number of classification-based filter maps
maps_by_event_code_countint64Number of event code-based filter maps
total_discarded_countint64Total number of discarded events
total_event_time_countint64Total event processing time

License Status

FieldTypeDescription
statusintLicense status code
licensed_tostringLicense holder name
object_limitintMaximum number of objects allowed
user_limitintMaximum number of users allowed
featuresobjectLicensed features (feature ID → enabled)

Use Cases

Server Health Monitoring

bash
# Basic health check
curl -X GET "http://your-server-ip:port/api/status" \
     -H "Authorization: Bearer YOUR_JWT_TOKEN" | jq '.uptime, .cpu_usage, .avg_cpu_usage'

Device Statistics

bash
# Get device counts
curl -X GET "http://your-server-ip:port/api/status" \
     -H "Authorization: Bearer YOUR_JWT_TOKEN" | jq '.device_tracker'

Database Performance

bash
# Check database statistics
curl -X GET "http://your-server-ip:port/api/status" \
     -H "Authorization: Bearer YOUR_JWT_TOKEN" | jq '.database'

License Information

bash
# Verify license status
curl -X GET "http://your-server-ip:port/api/status" \
     -H "Authorization: Bearer YOUR_JWT_TOKEN" | jq '.license'

Monitoring Integration

The status endpoint is perfect for:

  • Health checks: Monitor server uptime and CPU usage
  • Capacity planning: Track device counts and memory usage
  • Performance monitoring: Analyze database statistics and API usage
  • License compliance: Monitor license limits and feature availability
  • System diagnostics: Check modem status and network connectivity

Notes

  • Authentication required: Must be logged in with valid JWT token
  • Real-time data: All statistics reflect current server state
  • Optional fields: Some fields (like current_time, local_time_zone) are Linux-only
  • Comprehensive monitoring: Provides complete server health overview

Released under the MIT License.