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
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.
| Item | Default Value | Description |
|---|---|---|
| Base URL | http://<your-server>:8088 | Default port 8088 (configurable via EAZYAPI_PORT) |
| Swagger UI | http://<your-server>:8088/swagger | Interactive API documentation and testing interface |
| Format | application/json | Supports 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
- Sign in to EazyTrax.BMS and navigate to Settings → API Keys (
/Settings/ApiKeys). - Create a new API Key and ensure it is not expired (
IsExpired = false). - 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-KeyHeader:X-API-Key: <your-api-key>- Bearer Token:
Authorization: Bearer <your-api-key>
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:
| Parameter | Data Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Requested page number (starts at 1) |
pageSize | integer | 50 | Number of items per page (maximum 200) |
search | string | — | 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
| Method | Endpoint | Description |
|---|---|---|
GET | /health | Check service health status (no API Key required) |
GET | /api/v1/health | Check API v1 health status |
4.2 Spaces
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/zones/all | List all zones |
GET | /api/v1/zones/{id}/info | Get zone details by id |
GET | /api/v1/zones/{id}/buildings/all | List buildings within the specified zone |
GET | /api/v1/buildings/all | List all buildings |
GET | /api/v1/buildings/{id}/info | Get building details by id |
GET | /api/v1/buildings/{id}/floors/all | List floors within the specified building |
GET | /api/v1/floors/all | List all floors |
GET | /api/v1/floors/{id}/info | Get floor details by id |
GET | /api/v1/floors/{id}/rooms/all | List rooms within the specified floor |
GET | /api/v1/rooms/all | List all rooms |
GET | /api/v1/rooms/{id}/info | Get room details by id |
4.3 Inventory
| Method | Endpoint | Query Filters | Description |
|---|---|---|---|
GET | /api/v1/assets/all | assetTypeId, brandId, floorId, zoneId, status | List 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
| Method | Endpoint | Query Filters | Description |
|---|---|---|---|
GET | /api/v1/tickets/all | status, priority, createdFromUtc, createdToUtc | List maintenance and incident tickets |
GET | /api/v1/tickets/{id}/info | — | Get ticket details by id |
GET | /api/v1/visitors/all | visitFromUtc, visitToUtc | List visitor records |
4.5 Telemetry
| Method | Endpoint | Query Filters | Description |
|---|---|---|---|
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/all | metricKey, fromUtc, toUtc | Get historical time-series data for a sensor |
GET | /api/v1/sensor-alerts/all | status, externalSensorId | List 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:
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/realtime/sensors/summary | Real-time summary of sensor statuses and latest readings |
GET | /api/v1/realtime/ble-tags/all | Latest status of all BLE tags |
GET | /api/v1/realtime/ble-tags/positions | Current coordinates and positions of BLE tags |
GET | /api/v1/realtime/ble-tags/{identifier}/tracking | Tracking data for a BLE tag by identifier (MAC / Tag ID) |
GET | /api/v1/realtime/gateways/all | Latest 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 Requestswith aRetry-Afterheader (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 Status | Meaning | Common Causes |
|---|---|---|
400 Bad Request | Invalid parameters | Malformed UTC date format, pageSize exceeding 200, or missing required parameters |
401 Unauthorized | Authentication failed | Missing API Key, invalid key, or expired key (IsExpired = true) |
404 Not Found | Resource not found | No resource matches the specified id or identifier |
429 Too Many Requests | Rate limit exceeded | Exceeded 120 req/min per API Key; wait according to the Retry-After header |
503 Service Unavailable | Downstream service unavailable | Database 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."
}