Public API Reference
The MantisRMM Public API is a simple REST/JSON interface for reading your fleet and updating device metadata programmatically — for dashboards, integrations, and automation. Every request is authenticated with an API key and scoped to the tenant that issued it.
Overview
- Base URL:
https://api.rmm.mantisops.net - Version: all endpoints are under the
/public/v1prefix. - Format: JSON request and response bodies; UTF-8.
- Auth: a Bearer API key on every request (below).
- Tenancy: a key only ever sees data for the tenant that created it.
Authentication
Create keys in the RMM app under Settings → API Keys (admin only). A key is displayed once at creation — store it securely; it cannot be retrieved again. If a key is lost or exposed, revoke it and issue a new one.
Pass the key in the Authorization header as a Bearer token:
Verify a key and see its scopes with the ping endpoint:
Scopes
Each key is granted one of two scopes when created:
| Scope | Grants |
|---|---|
| read | All GET endpoints — list and read agents. |
| read & write | Everything read allows, plus write endpoints (e.g. setting custom fields). |
A request to a write endpoint with a read-only key returns 403. Grant the narrowest scope an integration needs.
429 + Retry-After when exceeded). CORS is enabled (Access-Control-Allow-Origin: *) so browser apps can call the API with a key.?limit=N&offset=M (limit capped at 1000). Omit limit to receive the full list (default — unchanged behavior). List responses include limit, offset, hasMore, and (on most endpoints) total alongside the items — page by incrementing offset until hasMore is false.Errors
Errors use standard HTTP status codes and a JSON body of the form { "error": "message" }.
| Status | Meaning |
|---|---|
| 400 | Malformed request (e.g. a required field is missing). |
| 401 | Missing, malformed, revoked, or unknown API key. |
| 403 | The key is valid but lacks the required scope. |
| 404 | The resource (e.g. an agent or custom field) was not found. |
Endpoints
Verify an API key and return the tenant it belongs to plus its scopes. Useful as a connection test.
List every agent in your tenant. Returns an array of agent objects and a total count.
Fetch a single agent by its id. Returns 404 if no such agent exists in your tenant.
Set a custom field value on an agent. The field must already exist for your tenant (create fields under Settings → Custom Fields); reference it by its label. Send value: null to clear it.
label (required) — the exact label of an existing custom field; value (string, or null to clear). A label with no matching field returns 404.List every site in your tenant. Fields: id, name, description, createdAt.
List threshold alert events (most recent first, last 7 days). Query: ?active=1 for unacknowledged only, ?agentId=, ?limit=. Fields: id, agentId, hostname, metric, value, threshold, firedAt, resolvedAt, acknowledgedAt, active.
List recent jobs (scripts, patch installs, etc.). Query: ?agentId=, ?limit=. Fields: id, agentId, type, status, error, createdAt, startedAt, finishedAt.
Fleet-wide software inventory — one row per (platform, title) with the machine count and observed versions. Fields: name, publisher, platform, machines, versions[].
Installed OS-patch history (KBs applied per agent), most recent first. Query: ?agentId=, ?limit=. Fields: id, agentId, hostname, kbId, title, resultCode, installedAt.
Tenant-wide activity / audit log, most recent first. Query: ?action= (prefix match), ?limit=. Fields: id, userEmail, action, target, details, createdAt.
Acknowledge an alert so it stops showing as active. Requires a read & write key. Returns { ok, acknowledged } (acknowledged: false if it was already acknowledged or not found).
Agent object
Fields returned for an agent. Optional fields are omitted when not available for a device.
| Field | Type | Description |
|---|---|---|
| id | string | Unique agent identifier. |
| name | string | Display name. |
| hostname | string | Reported hostname. |
| platform | string | windows, linux, or darwin. |
| osVersion | string | Operating-system version string. |
| arch | string | CPU architecture (e.g. amd64, arm64). |
| agentVersion | string | Installed agent version. |
| status | string | online or offline. |
| lastSeenAt | number | Last check-in (Unix epoch ms). |
| firstSeenAt | number | Enrollment time (Unix epoch ms). |
| currentUser | string | Logged-in user, if reported. |
| ipAddress | string | Primary IP address. |
| macAddress | string | Primary MAC address. |
| manufacturer / model / serialNumber | string | Hardware identity. |
| cpuModel / cpuCount / memTotal | string / number | CPU model, logical core count, total RAM in bytes. |
| companyId / siteId / groupId | string | Organizational placement. |
| labels | string[] | Agent labels. |
| alarmCount | number | Active (unacknowledged) alerts. |
| customFields | object | Map of custom-field label → value. |