mPower Edge Intelligence Device API

Collection of articles for working with Multitech devices in LoRaWAN networks.

mPower Edge Intelligence Device API

Complete REST API documentation for managing Multi-Tech Systems IoT gateway devices (mPower Edge Intelligence platform).

Overview

The mPower Device API is a comprehensive RESTful API that provides complete control and monitoring capabilities for MTS IoT gateway devices including Conduit, MultiConnect, and other mPower-enabled devices.

Key Features

Documentation Resources

πŸ“˜ Complete API Guide

Comprehensive documentation with detailed explanations, authentication guide, complete endpoint reference, code examples, configuration workflows, and troubleshooting.

πŸ“‹ Quick Reference

Concise command reference with all endpoints at a glance, common usage patterns, and quick copy-paste examples.

πŸ“‘ Documentation Index

Master index with overview of all documentation, how-to guides, tool integration, and quick start instructions.

πŸ”§ OpenAPI/Swagger Specification

πŸ“¦ Postman Collection

Ready-to-import Postman collection with pre-configured requests for all major endpoints.

πŸ“ Detailed Schema Documentation

Comprehensive field-by-field documentation for complex configuration objects:

πŸ” New Discovery Documentation (December 2025)

Undocumented Endpoints Findings

19+ newly discovered configuration endpoints including:

Stats Monitoring System

33+ stats categories for comprehensive device monitoring:

Discovery Session Summary

Complete report of the December 2025 discovery session with testing methodology, results, and insights from live gateway testing.

Quick Discovery Reference

Visual ASCII summary of all discoveries with quick reference tables.

πŸ“š Implementation Guides

Production-ready guides for common use cases:

πŸ§ͺ Testing & Validation Reports

Comprehensive testing documentation:

Quick Start

Authentication

The API uses session-based authentication with cookies:

# Login
curl -X POST http://192.168.2.1/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": "admin"}' \
  -c cookies.txt

# Use session cookie for subsequent requests
curl -X GET "http://192.168.2.1/api?fields=system" -b cookies.txt

# Logout
curl -X POST http://192.168.2.1/api/logout -b cookies.txt

Basic API Usage

Query Resources

# Get system information
curl -X GET "http://192.168.2.1/api?fields=system" -b cookies.txt

# Get multiple resources
curl -X GET "http://192.168.2.1/api?fields=system,cellular,users" -b cookies.txt

# Get nested fields
curl -X GET "http://192.168.2.1/api?fields=system/capabilities" -b cookies.txt

Update Configuration

# Update system settings
curl -X PUT http://192.168.2.1/api/system \
  -H "Content-Type: application/json" \
  -d '{"deviceName": "MyDevice"}' \
  -b cookies.txt

# Save configuration
curl -X POST http://192.168.2.1/api/command/save -b cookies.txt

Execute Commands

# Restart device
curl -X POST http://192.168.2.1/api/command/restart -b cookies.txt

# Ping test
curl -X POST http://192.168.2.1/api/command/ping \
  -H "Content-Type: application/json" \
  -d '{"host": "8.8.8.8", "count": 4}' \
  -b cookies.txt

API Structure

Resource Endpoints

HTTP Method Pattern Description
GET /api?fields=<resource> Retrieve resource data
PUT /api/<resource> Update entire resource
POST /api/<resource> Create new resource item
DELETE /api/<resource>/<id> Delete resource item

Available Resources

Core System

Network

Cellular

VPN

IoT Protocols

Device Management

Security

Notifications

Monitoring (Stats)

Command Endpoints

Commands are executed via POST to /api/command/<command>:

Configuration Commands

Firmware Commands

Network Commands

Interactive Documentation

View in Swagger UI

  1. Go to Swagger Editor
  2. Click File β†’ Import File
  3. Select the api-documentation.yaml file
  4. Explore and test the API interactively

Import to Postman

  1. Open Postman
  2. Click Import β†’ Upload Files
  3. Select MTS-Device-API.postman_collection.json
  4. Update the baseUrl variable to your device IP
  5. Start making requests!

Generate Client Code

Use OpenAPI Generator to create client libraries in various languages:

# Install OpenAPI Generator
npm install @openapitools/openapi-generator-cli -g

# Generate Python client
openapi-generator-cli generate \
  -i mpower-api-docs/api-documentation.yaml \
  -g python \
  -o ./python-client

# Generate JavaScript/TypeScript client
openapi-generator-cli generate \
  -i mpower-api-docs/api-documentation.yaml \
  -g typescript-axios \
  -o ./typescript-client

# Generate Java client
openapi-generator-cli generate \
  -i mpower-api-docs/api-documentation.yaml \
  -g java \
  -o ./java-client

Role-Based Access Control

The API implements role-based access control with three built-in roles:

Role Description Access Level
Admin Full system access Read/Write/Execute all
User (Engineer) Configuration access Read/Write most, limited security
Guest (Monitor) Read-only access Read status/monitoring only

Response Format

All API responses follow a consistent JSON format:

Success Response

{
  "success": true,
  "result": {
    // Response data varies by endpoint
  }
}

Error Response

{
  "success": false,
  "error": "Error message description",
  "code": 404
}

Configuration Workflow

The device uses a two-stage configuration model:

  1. Runtime Configuration - Changes made via PUT requests update the runtime configuration
  2. Persistent Configuration - Use POST /api/command/save to persist changes

Typical Workflow

# 1. Login
curl -X POST http://192.168.2.1/api/login \
  -d '{"username":"admin","password":"admin"}' -c cookies.txt

# 2. Get current configuration
curl -X GET "http://192.168.2.1/api?fields=cellular" -b cookies.txt

# 3. Update configuration
curl -X PUT http://192.168.2.1/api/cellular \
  -d '{"enabled": true}' -b cookies.txt

# 4. Save configuration
curl -X POST http://192.168.2.1/api/command/save -b cookies.txt

# 5. Logout
curl -X POST http://192.168.2.1/api/logout -b cookies.txt

Examples

Cellular Configuration

# Get cellular configuration
curl -X GET "http://192.168.2.1/api?fields=cellular" -b cookies.txt

# Enable cellular with provider profile
curl -X PUT http://192.168.2.1/api/cellular \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "enabled": true,
    "providerProfiles": [{
      "_id": "550e8400-e29b-41d4-a716-446655440000",
      "profileName": "My Carrier",
      "cellularMode": "4g-preferred",
      "dataCtx": {
        "apnString": "internet",
        "contextIpMode": "AUTO",
        "authentication": {
          "type": "NONE",
          "username": "",
          "password": ""
        }
      }
    }]
  }'

# Save configuration
curl -X POST http://192.168.2.1/api/command/save -b cookies.txt

User Management

# List all users
curl -X GET "http://192.168.2.1/api?fields=users" -b cookies.txt

# Create new user
curl -X POST http://192.168.2.1/api/users \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "name": "engineer1",
    "password": "password123",
    "permission": "user",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com"
  }'

# Save changes
curl -X POST http://192.168.2.1/api/command/save -b cookies.txt

LoRa Network Server

# Get LoRa configuration
curl -X GET "http://192.168.2.1/api?fields=loraNetwork" -b cookies.txt

# Update single field - network server name
curl -X PUT http://192.168.2.1/api/loraNetwork \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "network": {
      "name": "My Gateway"
    }
  }'

# Update top-level field - backup interval
curl -X PUT http://192.168.2.1/api/loraNetwork \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{"backupInterval": 7200}'

# Update nested field - MQTT enabled
curl -X PUT http://192.168.2.1/api/loraNetwork \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "mqtt": {
      "enabled": true
    }
  }'

# Update packet forwarder channel plan
curl -X PUT http://192.168.2.1/api/loraNetwork \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "packetForwarder": {
      "channelPlan": "US915"
    }
  }'

# Restart LoRa service to apply changes
curl -X POST http://192.168.2.1/api/lora/restart -b cookies.txt

System Monitoring

# Get comprehensive dashboard view (most useful!)
curl -X GET "http://192.168.2.1/api?fields=stats/dashboard" -b cookies.txt

# Get cellular radio statistics
curl -X GET "http://192.168.2.1/api?fields=stats/radio" -b cookies.txt

# Get memory usage
curl -X GET "http://192.168.2.1/api?fields=stats/memory" -b cookies.txt

# Get interface statistics
curl -X GET "http://192.168.2.1/api?fields=stats/iface_ppp0" -b cookies.txt

# Monitor without session timeout (for continuous monitoring)
curl -X GET "http://192.168.2.1/api?fields=stats/radio&inactivity=true" -b cookies.txt

# Get LoRa gateway statistics
curl -X GET "http://192.168.2.1/api/lora/gateways" -b cookies.txt

# Get LoRa devices
curl -X GET "http://192.168.2.1/api/lora/devices" -b cookies.txt

WAN Failover Configuration

# Get WAN manager configuration
curl -X GET "http://192.168.2.1/api?fields=wanmngr" -b cookies.txt

# Configure WAN failover
curl -X PUT http://192.168.2.1/api/wanmngr \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "mode": "FAILOVER",
    "wans": [
      {
        "interface": "eth0",
        "priority": 1,
        "monitor": {
          "mode": "ACTIVE",
          "checkInterval": 60,
          "active": {
            "type": "ICMP",
            "hostname": "8.8.8.8",
            "icmpCount": 5
          }
        }
      },
      {
        "interface": "ppp0",
        "priority": 2,
        "monitor": {
          "mode": "ACTIVE",
          "checkInterval": 60,
          "active": {
            "type": "ICMP",
            "hostname": "8.8.8.8",
            "icmpCount": 10
          }
        }
      }
    ]
  }'

# Get real-time WAN status
curl -X GET "http://192.168.2.1/api?fields=waninfo" -b cookies.txt

# Save configuration
curl -X POST http://192.168.2.1/api/command/save -b cookies.txt

Troubleshooting

Common Issues

401 Unauthorized

409 Conflict

Changes not persisting

Device unavailable

Support

For technical support and additional documentation:

Version Information


Related Documentation: