Skip to main content

General

REST API Reference

Access and manage Proxus IIoT platform resources using the REST API.

Proxus IIoT platform provides an authenticated REST surface for platform entities, including devices, gateways, rules, alerts, and telemetry. The API uses OData for entity access and JWT bearer authentication. The live entity set and field contract is the OData metadata document, and authorization can further restrict what a user can read or change. For more information about authentication methods, see Authentication Providers.

Authentication

The API uses JWT Bearer Token authentication. To obtain a token:

  1. Send a POST request to the /api/Authentication/Authenticate endpoint with your credentials.
  2. Include the returned token in the Authorization header of subsequent requests.
API Authentication Flow
code

Client App

Your Code

key

Authenticate

/api/Authentication

api

OData API

Entity Operations

dashboard

Platform

Devices / Rules / Alerts

The authentication endpoint returns the JWT token as a plain string (not a JSON object).

# Obtain token
curl -X POST https://<your-server-url>/api/Authentication/Authenticate \
  -H "Content-Type: application/json" \
  -d '{"userName": "<username>", "password": "<password>"}'

# Use token in subsequent requests
curl -X GET https://<your-server-url>/api/odata/Device \
  -H "Authorization: Bearer <jwt_token>"

OData Endpoints

The Proxus API uses OData for the entity sets exposed by the current server. Base URL: https://<your-server-url>/api/odata. Read the live contract at GET /api/odata/$metadata; use the fields and entity sets available to the authenticated user rather than assuming every platform object is exposed.

Core Entities

EntityMethodsDescription
DeviceAs permitted by the live contract and user permissionsManage industrial devices and their configurations.
GatewayAs permitted by the live contract and user permissionsManage edge computing gateways.
AlertAs permitted by the live contract and user permissionsAccess and manage system alerts.
RuleAs permitted by the live contract and user permissionsConfigure and manage rule engine rules.
RuleActionAs permitted by the live contract and user permissionsDefine actions for rules.
TargetProfileAs permitted by the live contract and user permissionsConfigure target system profiles (MSSQL, PostgreSQL, ClickHouse, etc.).
DeviceProfileAs permitted by the live contract and user permissionsManage device communication profiles.
NotificationChannelAs permitted by the live contract and user permissionsConfigure notification channels.

Note: Telemetry (DeviceRawData) is not exposed via OData. Use the Telemetry API for SELECT queries. For more information about the telemetry storage system, see ClickHouse Integration.

Supported OData Operations

Entity endpoints support the OData query options enabled by the server and allowed for the current request:

  • $filter: Filter results (e.g., /api/odata/Device?$filter=Name eq 'MyDevice')
  • $select: Select specific fields (e.g., /api/odata/Device?$select=Name,Status)
  • $top & $skip: Pagination (e.g., /api/odata/Device?$top=10&$skip=20)
  • $orderby: Sort results (e.g., /api/odata/Device?$orderby=Name)
  • $count: Get total count (e.g., /api/odata/Device/$count)

The server caps the page size at 100 records for a single OData query. Prefer an explicit $select, a bounded $top, and pagination. A successful read does not imply that the same identity is allowed to create, update, or delete the entity.

Telemetry API

For direct access to telemetry data stored in ClickHouse, use the dedicated telemetry endpoint:

Execute Telemetry Query

  • Endpoint: POST /api/Telemetry/execute
  • Description: Execute secure SELECT queries against ClickHouse telemetry data
  • Request Body:
    {
      "query": "SELECT * FROM DeviceRawData WHERE Time > now() - INTERVAL 1 DAY LIMIT 100"
    }
  • Query Parameters:
    • maxRows: Maximum number of rows to return (default: 10000, max: 50000)

This endpoint includes SQL injection protection and enforces query limits (SELECT-only).

Response Format: ClickHouse returns JSONEachRow (NDJSON). Clients should read the response body as text or stream it line-by-line. For more information about the data structure and how it relates to the Unified Namespace, see Unified Namespace.

Swagger Documentation

For an interactive explorer of all available endpoints and schemas, access the Swagger UI on your local installation:

http://<your-server-url>/swagger

Annotated Proxus Swagger UI
Annotated Proxus Swagger UI

The live demo was verified against the generated OpenAPI 3 document. The screen exposes the current API catalog, the JWT bearer Authorize control, and the entity operations published by the running server. The endpoint list can change with the server version and installed modules, so use the generated document as the final contract.

The Swagger UI provides:

  • Interactive endpoint testing
  • Request/response schema definitions
  • Generated request and response schemas, with examples where the running contract provides them
  • JWT bearer authentication support through the Authorization: Bearer <token> header

Code Examples

Here are examples of how to interact with the Proxus API using different programming languages:

lightbulb
Configuration

Configure JWT token signing keys, expiration, and issuer/audience claims via the JWT & WebAPI section in Proxus-config.toml.