System API
The System API provides license management, timezone settings, health checks, and system configuration.
Overview
| Procedure | Type | Auth | Description |
|---|---|---|---|
system.getLicense | Query | No | Get license information |
system.timezone.getTimezoneSettings | Query | No | Get timezone settings |
system.timezone.updateTimezoneSettings | Mutation | Yes | Update timezone settings |
system.health | Query | No | System health check |
system.getSettings | Query | No | Get system settings |
Procedures
system.getLicense
Get the current license information. Returns an enterprise license for web deployment.
Type: Query Auth Required: No
Response
typescript
{
valid: boolean; // License validity
type: string; // License type ("enterprise")
expiresAt: string | null; // Expiration date (null = never)
features: string[]; // Enabled features
maxUsers: number; // Max users (-1 = unlimited)
maxSensors: number; // Max sensors (-1 = unlimited)
organization: string; // Organization name
issuedAt: string; // Issue date
}Example
bash
curl -X GET "https://api.itms.solutions/trpc/system.getLicense"Response Example
json
{
"result": {
"data": {
"json": {
"valid": true,
"type": "enterprise",
"expiresAt": null,
"features": [
"dashboard",
"sensors",
"reports",
"analytics",
"incidents",
"traffic",
"locations",
"users",
"settings"
],
"maxUsers": -1,
"maxSensors": -1,
"organization": "ITMS Solutions",
"issuedAt": "2024-01-01T00:00:00.000Z"
}
}
}
}system.timezone.getTimezoneSettings
Get the current timezone and date/time format settings.
Type: Query Auth Required: No
Response
typescript
{
timezone: string; // IANA timezone (e.g., "Asia/Almaty")
use24HourFormat: boolean; // 24-hour time format
dateFormat: string; // Date format pattern
firstDayOfWeek: number; // 0=Sunday, 1=Monday, etc.
}Example
bash
curl -X GET "https://api.itms.solutions/trpc/system.timezone.getTimezoneSettings"Response Example
json
{
"result": {
"data": {
"json": {
"timezone": "Asia/Almaty",
"use24HourFormat": true,
"dateFormat": "DD/MM/YYYY",
"firstDayOfWeek": 1
}
}
}
}system.timezone.updateTimezoneSettings
Update timezone and date/time format settings.
Type: Mutation Auth Required: Yes
Input
typescript
{
timezone?: string; // IANA timezone
use24HourFormat?: boolean; // 24-hour format
dateFormat?: string; // Date format pattern
firstDayOfWeek?: number; // 0-6 (Sunday-Saturday)
}Response
typescript
{
success: boolean;
settings: {
timezone: string;
use24HourFormat: boolean;
dateFormat: string;
firstDayOfWeek: number;
}
}Example
bash
curl -X POST "https://api.itms.solutions/trpc/system.timezone.updateTimezoneSettings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"json": {
"timezone": "Europe/London",
"use24HourFormat": false,
"dateFormat": "MM/DD/YYYY"
}
}'system.health
Check system health status.
Type: Query Auth Required: No
Response
typescript
{
status: "healthy" | "degraded" | "unhealthy";
timestamp: string; // ISO 8601 timestamp
version: string; // API version
database: "connected" | "disconnected";
}Example
bash
curl -X GET "https://api.itms.solutions/trpc/system.health"Response Example
json
{
"result": {
"data": {
"json": {
"status": "healthy",
"timestamp": "2024-11-15T12:00:00.000Z",
"version": "1.0.0",
"database": "connected"
}
}
}
}Health Check Endpoint
This endpoint can be used for uptime monitoring and load balancer health checks.
system.getSettings
Get general system settings and feature flags.
Type: Query Auth Required: No
Response
typescript
{
appName: string; // Application name
appVersion: string; // Application version
environment: string; // Environment (production, staging, etc.)
features: {
dashboard: boolean;
sensors: boolean;
reports: boolean;
analytics: boolean;
incidents: boolean;
traffic: boolean;
locations: boolean;
realtime: boolean;
}
}Example
bash
curl -X GET "https://api.itms.solutions/trpc/system.getSettings"Response Example
json
{
"result": {
"data": {
"json": {
"appName": "Smart City TVMS",
"appVersion": "1.0.0",
"environment": "production",
"features": {
"dashboard": true,
"sensors": true,
"reports": true,
"analytics": true,
"incidents": true,
"traffic": true,
"locations": true,
"realtime": true
}
}
}
}
}Supported Timezones
Common timezone values:
| Region | Timezone |
|---|---|
| Kazakhstan | Asia/Almaty |
| Russia (Moscow) | Europe/Moscow |
| UAE | Asia/Dubai |
| UK | Europe/London |
| US East | America/New_York |
| US West | America/Los_Angeles |
Date Format Patterns
| Pattern | Example |
|---|---|
DD/MM/YYYY | 15/11/2024 |
MM/DD/YYYY | 11/15/2024 |
YYYY-MM-DD | 2024-11-15 |
DD.MM.YYYY | 15.11.2024 |
License Features
| Feature | Description |
|---|---|
dashboard | Main dashboard access |
sensors | Sensor management |
reports | Report generation |
analytics | Analytics dashboard |
incidents | Incident management |
traffic | Traffic monitoring |
locations | Location management |
users | User management |
settings | System settings |