Moxa DLM Self-hosting Servcie API Documents (1.0.0)

Download OpenAPI specification:

sign_in

User Login

User login

Authorizations:
None
Request Body schema: application/json
required
email
string
password
string

Responses

Request samples

Content type
application/json
{
  • "email": "email@moxa.com",
  • "password": 12345678
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User logout

User logout

Authorizations:
None

Responses

report

Generate the user inventory report for the current

Generate the user inventory report for the current

Authorizations:
None

Responses

Response samples

Content type
application/json
{}

Generate a report

Generates a report based on the specified type and optional parameters such as device IDs and date range.

path Parameters
projectId
required
string <uuid> (ProjectId)

Unique identifier representing a specific project

Request Body schema: application/json
required
type
required
string
Enum: "trafficConsumption" "recorder-trafficTransmission" "recorder-cellularPerformance" "inventory" "event"

Type of report to generate

deviceIdList
Array of strings <uuid> (DeviceId) [ items <uuid > ]

List of device IDs to include in the report (not applicable for the "inventory" type)

startDate
string <date>

Start date for the report (not applicable for the "inventory" type)

endDate
string <date>

End date for the report (not applicable for the "inventory" type)

Responses

Request samples

Content type
application/json
{
  • "type": "trafficConsumption",
  • "deviceIdList": [
    ],
  • "startDate": "2019-08-24",
  • "endDate": "2019-08-24"
}

Response samples

Content type
application/json
{}

devices

Device - Get all devices without project

Device - Get all devices without project

query Parameters
serialNumber
string

Filter the device list by serialNumber, supports multiple search i.e. ?field=encoded1,encoded2

modelName
string

Filter the device list by modelName, supports multiple search

hostName
string

Filter the device list by hostName, supports multiple search

displayName
string

Filter the device list by displayName, supports multiple search

tags
string

Filter the device list by label, supports multiple search

status
string
Enum: "unknown" "online" "offline"

Filter the device list by connection status

cellularSignalStrength
integer
Enum: -1 0 1 2 3

-1 is not supported, 0 is no signal, 1 is poor, 2 is fair, 3 is good

carrier
string

Filter by carrier

firmwareVersion
string
vpnStatus
string
Enum: "connected" "disconnected"

Filter by remote connect status (VPN tunnel status)

vpnHealth
string
Enum: "all_active" "not_all_active"

Use 'all_active' for devices with all VPNs active, 'not_all_active' otherwise

keyword
string

Wildcard keyword search (serial number, host name, display name, IMEI, IMSI, IP, label, carrier)

sort
string
Default: "asc"
Enum: "desc" "asc"

Sorting direction, default is asc

order
string
Enum: "status" "serialNumber" "modelName" "hostName"

Field to sort by, default is createdAt

limit
integer <= 1000
Default: 10

Max device count, default 10, max 1000

offset
integer
Default: 0

Offset

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Device - Get device with given ID

Device - Get device with given ID

path Parameters
deviceId
required
string <uuid>

device unique identifier

Responses

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

Get device logs by device ID with optional filters

Get device logs by device ID with optional filters

path Parameters
deviceId
required
string

Device unique identifier

query Parameters
event
string

Filter by event keyword (partial match)

category
string

Filter by category (e.g., operation, system)

severity
string

Filter by severity (e.g., info, warning, error)

user
string

Filter by username (partial match)

limit
integer
Default: 20

Number of results to return

offset
integer
Default: 0

Pagination offset

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "data": [
    ],
  • "limit": 0,
  • "offset": 0
}

Get all network info.

Get all network info.

path Parameters
deviceId
required
string

device unique identifier

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get device basic info

Get device basic info

path Parameters
deviceId
required
string

device unique identifier

Responses

Response samples

Content type
application/json
{
  • "hostName": "Moxa",
  • "modelName": "UC-8200",
  • "serialNumber": "Moxa1234567",
  • "lastBootTime": "2019-08-24T14:15:22Z",
  • "registeredAt": "2019-08-24T14:15:22Z",
  • "certExpiredAt": "2019-08-24T14:15:22Z",
  • "configUpdatedAt": "2019-08-24T14:15:22Z",
  • "firmwareVersion": "1.0.0",
  • "dlmAgentVersion": "1.0.0"
}

Get device's jobs

Job - Get device's jobs

path Parameters
deviceId
required
string <uuid> (DeviceId)

Device unique identifier

query Parameters
schedule
boolean

Get device jobs by schedule

id
string <uuid> (JobId)

Get device job by job id

type
string (JobType)
Enum: "reboot" "firmwareUpgrade" "installPackage" "runScript"

The type of job

status
string (JobStatus)
Enum: "scheduled" "inprogress" "canceled" "success" "failedReportError" "failedDeviceTimeout" "failedDeviceOffline"

The status of the job

limit
integer
Default: 10

Get job list limitation

offset
integer
Default: 0

Get job list offset

Responses

Response samples

Content type
application/json
{
  • "count": 1,
  • "limit": 10,
  • "offset": 0,
  • "data": [
    ]
}

projects

Get all projects

Get all projects

query Parameters
name
string

Filter the project list by project name

description
string

Filter the project list by description

keyword
string

Keyword search in project name and description

order
string
Value: "name"

Order projects by a field (default is createdAt)

sort
string
Enum: "desc" "asc"

Sort direction (default is desc)

limit
integer

Max number of projects to return (default 100 and max is 1000)

offset
integer

offset

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "count": 0,
  • "offset": 0,
  • "limit": 0
}

Project logs

Check project devices logs

query Parameters
username
string

Filter by partial match on username.

severity
string

Filter by event severity.

event
string

Filter by partial match on event name.

category
string

Filter by match on category.

source
string

Filter by match on source.

since
string
Value: "24h"
Example: since=24h

Filter logs from the past 24 hours.

keyword
string

Wildcard search in username / serial_number

limit
integer [ 1 .. 100 ]
Default: 10
offset
integer >= 0
Default: 0
order
string
Enum: "severity" "category" "username" "event" "source"
sort
string
Default: "desc"
Enum: "asc" "desc"

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "limit": 0,
  • "offset": 0,
  • "data": [
    ]
}