Skip to main content

General

REST API Reference

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

Proxus IIoT platform provides a comprehensive REST API that allows you to programmatically manage and access all platform resources including devices, gateways, rules, alerts, and telemetry data. The API is built on OData protocol and includes JWT-based authentication. 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.

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 is primarily based on OData protocol, providing CRUD operations for all platform entities. Base URL: https://<your-server-url>/api/odata

Core Entities

EntityMethodsDescription
DeviceGET, POST, PUT, PATCH, DELETEManage industrial devices and their configurations.
GatewayGET, POST, PUT, PATCH, DELETEManage edge computing gateways.
AlertGET, POST, PUT, PATCH, DELETEAccess and manage system alerts.
RuleGET, POST, PUT, PATCH, DELETEConfigure and manage rule engine rules.
RuleActionGET, POST, PUT, PATCH, DELETEDefine actions for rules.
TargetProfileGET, POST, PUT, PATCH, DELETEConfigure target system profiles (MSSQL, PostgreSQL, ClickHouse, etc.).
DeviceProfileGET, POST, PUT, PATCH, DELETEManage device communication profiles.
NotificationChannelGET, POST, PUT, PATCH, DELETEConfigure 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

All entity endpoints support standard OData operations:

  • $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)

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

The Swagger UI provides:

  • Interactive endpoint testing
  • Request/response schema definitions
  • Example payloads for all API calls
  • OAuth 2.0 authentication flow

Code Examples

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