EazyTrax

EazyApi Service (v1) — API Integration Guide

Guide to integrating and using EazyApi Service (v1) to retrieve spaces, assets, work orders, sensors, and real-time BLE tag locations via REST API.

On This Page
Note

Base URL (On-Premise): http://<your-server>:8088 · Interactive Swagger UI: http://<your-server>:8088/swagger · BMS User Manual: See EazyTrax.BMS User Manual

1. Overview & Base URL

EazyApi Service (v1) is an on-premise public REST API service for integrating external systems (such as ERP, BI dashboards, mobile apps, or automation workflows) to query data from both EazyBMS and EazyTrack through a single, secure, high-performance standard interface.

ItemDefault ValueDescription
Base URLhttp://<your-server>:8088Default port 8088 (configurable via EAZYAPI_PORT)
Swagger UIhttp://<your-server>:8088/swaggerInteractive API documentation and testing interface
Formatapplication/jsonSupports UTF-8 JSON for both requests and responses

2. Authentication

All endpoints under /api/v1/* (except Health Check) require an API Key for authentication.

2.1 Creating an API Key in EazyTrax.BMS

  1. Sign in to EazyTrax.BMS and navigate to Settings → API Keys (/Settings/ApiKeys).
  2. Create a new API Key and ensure it is not expired (IsExpired = false).
  3. Copy the key value to include in the HTTP header of every request.

2.2 Sending the API Key in HTTP Headers

Two header formats are supported (use either one):

  • X-API-Key Header: X-API-Key: <your-api-key>
  • Bearer Token: Authorization: Bearer <your-api-key>
Note

API Key validation results are cached for 60 seconds for optimal performance. Any key revocation or status update in BMS takes effect within 60 seconds.


3. Pagination & Response Format

3.1 Standard Parameters for /all Endpoints

All collection endpoints ending with /all support the following standard query parameters:

ParameterData TypeDefaultDescription
pageinteger1Requested page number (starts at 1)
pageSizeinteger50Number of items per page (maximum 200)
searchstring—Text search query (partial match)

3.2 Collection Response Format (/all)

{
  "data": [
    { "id": "...", "name": "..." }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 50,
    "totalCount": 128,
    "totalPages": 3,
    "hasNextPage": true,
    "hasPreviousPage": false
  },
  "timestampUtc": "2026-01-15T08:30:00Z"
}

3.3 Single-Item Response Format (/info)

{
  "data": {
    "id": "...",
    "name": "..."
  },
  "timestampUtc": "2026-01-15T08:30:00Z"
}

4. V1 Endpoints (API Reference)

4.1 System

MethodEndpointDescription
GET/healthCheck service health status (no API Key required)
GET/api/v1/healthCheck API v1 health status

4.2 Spaces

MethodEndpointDescription
GET/api/v1/zones/allList all zones
GET/api/v1/zones/{id}/infoGet zone details by id
GET/api/v1/zones/{id}/buildings/allList buildings within the specified zone
GET/api/v1/buildings/allList all buildings
GET/api/v1/buildings/{id}/infoGet building details by id
GET/api/v1/buildings/{id}/floors/allList floors within the specified building
GET/api/v1/floors/allList all floors
GET/api/v1/floors/{id}/infoGet floor details by id
GET/api/v1/floors/{id}/rooms/allList rooms within the specified floor
GET/api/v1/rooms/allList all rooms
GET/api/v1/rooms/{id}/infoGet room details by id

4.3 Inventory

MethodEndpointQuery FiltersDescription
GET/api/v1/assets/allassetTypeId, brandId, floorId, zoneId, statusList all assets with optional filters
GET/api/v1/assets/{id}/info—Get asset details by id
GET/api/v1/brands/all—List all brands
GET/api/v1/asset-types/all—List all asset types

4.4 Operations

MethodEndpointQuery FiltersDescription
GET/api/v1/tickets/allstatus, priority, createdFromUtc, createdToUtcList maintenance and incident tickets
GET/api/v1/tickets/{id}/info—Get ticket details by id
GET/api/v1/visitors/allvisitFromUtc, visitToUtcList visitor records

4.5 Telemetry

MethodEndpointQuery FiltersDescription
GET/api/v1/sensors/all—List all sensors
GET/api/v1/sensors/{id}/info—Get sensor details by id
GET/api/v1/sensors/{id}/metrics/all—List latest metric readings for a sensor
GET/api/v1/sensors/{id}/history/allmetricKey, fromUtc, toUtcGet historical time-series data for a sensor
GET/api/v1/sensor-alerts/allstatus, externalSensorIdList sensor alerts
GET/api/v1/gateways/all—List all gateways
GET/api/v1/gateways/{id}/info—Get gateway details by id
GET/api/v1/ble-tags/all—List all BLE tags
GET/api/v1/ble-tags/{id}/info—Get BLE tag details by id

4.6 Realtime (3s Micro-Cache)

Realtime endpoints use a 3-second micro-cache to support high-frequency polling without overloading the database or EazyTrack:

MethodEndpointDescription
GET/api/v1/realtime/sensors/summaryReal-time summary of sensor statuses and latest readings
GET/api/v1/realtime/ble-tags/allLatest status of all BLE tags
GET/api/v1/realtime/ble-tags/positionsCurrent coordinates and positions of BLE tags
GET/api/v1/realtime/ble-tags/{identifier}/trackingTracking data for a BLE tag by identifier (MAC / Tag ID)
GET/api/v1/realtime/gateways/allLatest online status of all gateways

5. Quick Examples (curl)

5.1 List Sensors

curl -X GET "http://<your-server>:8088/api/v1/sensors/all?page=1&pageSize=20" \
  -H "X-API-Key: <your-api-key>" \
  -H "Accept: application/json"

5.2 Get Asset Info

curl -X GET "http://<your-server>:8088/api/v1/assets/<asset-id>/info" \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Accept: application/json"

5.3 Realtime BLE Tags

curl -X GET "http://<your-server>:8088/api/v1/realtime/ble-tags/all?page=1&pageSize=50" \
  -H "X-API-Key: <your-api-key>" \
  -H "Accept: application/json"

6. Rate Limiting, Caching & Error Codes

6.1 Rate Limiting and Caching Policy

  • Rate Limit: Up to 120 requests/minute per API Key. Exceeding this limit returns HTTP 429 Too Many Requests with a Retry-After header (in seconds).
  • API Key Cache: Authentication validation results are cached for 60 seconds.
  • Master Data Cache: Master data (Spaces, Inventory, Metadata) is cached for 60 seconds.
  • Realtime Micro-Cache: Endpoints under /api/v1/realtime/* are cached for 3 seconds.

6.2 Standard Error Codes (RFC 7807 ProblemDetails)

When an error occurs, the API returns an RFC 7807 ProblemDetails response (application/problem+json):

HTTP StatusMeaningCommon Causes
400 Bad RequestInvalid parametersMalformed UTC date format, pageSize exceeding 200, or missing required parameters
401 UnauthorizedAuthentication failedMissing API Key, invalid key, or expired key (IsExpired = true)
404 Not FoundResource not foundNo resource matches the specified id or identifier
429 Too Many RequestsRate limit exceededExceeded 120 req/min per API Key; wait according to the Retry-After header
503 Service UnavailableDownstream service unavailableDatabase or EazyTrack backend service is temporarily unreachable
{
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Missing or invalid API key."
}