Skip to content

REST API

The gateway provides a comprehensive REST API for programmatic access.

API Documentation

Interactive API documentation available at:

https://your-gateway/swagger

Authentication

All API endpoints require authentication.

Session-Based (Web UI)

Authenticated via SSO login session.

Token-Based (Programmatic)

Include authentication token in header:

Authorization: Bearer <token>

Common Endpoints

Devices

GET    /api/devices              # List all devices
GET    /api/devices/{id}         # Get device details
POST   /api/devices              # Create device
PUT    /api/devices/{id}         # Update device
DELETE /api/devices/{id}         # Delete device
POST   /api/devices/{id}/poll    # Poll once

Tags

GET    /api/devices/{id}/tags    # List device tags
POST   /api/devices/{id}/tags    # Create tag
PUT    /api/tags/{id}            # Update tag
DELETE /api/tags/{id}            # Delete tag

Statistics

GET    /api/devices/{id}/stats   # Device statistics
POST   /api/devices/{id}/stats/reset  # Reset statistics

System

GET    /api/system/health        # System health
GET    /api/system/version       # Gateway version

Response Format

Success

{
  "data": {
    "id": 123,
    "name": "Device 1"
  }
}

Error

{
  "error": {
    "message": "Device not found",
    "code": "NOT_FOUND"
  }
}

Next Steps

  • Access Swagger UI for complete documentation
  • Security