Skip to content

System API

The System API provides license management, timezone settings, health checks, and system configuration.

Overview

ProcedureTypeAuthDescription
system.getLicenseQueryNoGet license information
system.timezone.getTimezoneSettingsQueryNoGet timezone settings
system.timezone.updateTimezoneSettingsMutationYesUpdate timezone settings
system.healthQueryNoSystem health check
system.getSettingsQueryNoGet 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:

RegionTimezone
KazakhstanAsia/Almaty
Russia (Moscow)Europe/Moscow
UAEAsia/Dubai
UKEurope/London
US EastAmerica/New_York
US WestAmerica/Los_Angeles

Date Format Patterns

PatternExample
DD/MM/YYYY15/11/2024
MM/DD/YYYY11/15/2024
YYYY-MM-DD2024-11-15
DD.MM.YYYY15.11.2024

License Features

FeatureDescription
dashboardMain dashboard access
sensorsSensor management
reportsReport generation
analyticsAnalytics dashboard
incidentsIncident management
trafficTraffic monitoring
locationsLocation management
usersUser management
settingsSystem settings

SCS Smart City - Traffic, Gateway, Camera, and NVR Platform