Home › Install guides › The Uplivra API
Install guide · Developers and MSPsThe Uplivra API
The management API lets the Network Engineering Companion app, scripts and other software read and change your Uplivra server over HTTPS, with tokens that work like people with an access profile.
Uplivra Technologies LLC · Guide for Uplivra 26.10 · Updated 12 November 2026 · Latest version: https://uplivra.com/guides/api.html
Turn it on
The management API is off on a new server. While it's off, every request with a token gets:
403 {"error": "The management API is turned off. An administrator can turn it on under Settings › API."}
An administrator turns it on under Settings › API (the page needs the "Turn the management API on or off and make its tokens" permission, which only the administrator profiles have). Turning it off again refuses every token at once; tokens aren't deleted, so they work again when it's turned back on. Each change is written to the audit log.
The switch only covers the management API (/api/v1). Collectors, the data API (/api/data/v1) and AIs you connect yourself (MCP, set up under Settings › Connect an AI) are separate and keep working; Settings › API lists them too.
Make a token
On Settings › API, under Make a token, choose:
- Name: what uses it, for example "Companion on Ann's laptop".
- What it may do:
- Read only: sees everything a "see" permission shows (devices, alerts, configuration backups, logs, the audit log and so on). It can only send
GETrequests. - Read and write: like an administrator, without purchasing or managing people and tokens. It can delete.
- An access profile: exactly what the profile allows, the same profiles you give people (People and access › Access profiles). Use this to leave out configurations, deleting, or anything else. Changes to the profile apply to the token straight away.
- Sites (optional): the token only sees those sites' devices, and can't use endpoints that cover the whole installation (people, tickets, runbooks, the audit log).
- Requests a minute: 300 unless you change it.
- Expires: in 30, 90 (the default), 180 or 365 days. No token lasts longer than a year.
- Only from these addresses (optional): addresses or networks such as
203.0.113.10, 10.20.0.0/16.
The token is shown once. Copy it then; Uplivra keeps only a fingerprint of it. A token never gets more than the person who makes it, and no token can manage people, licenses or other tokens. The list shows when and from which address each token was last used. Revoke stops a token at once.
You can also make a token on the server's command line (it expires after 90 days unless you add -days):
uplivra token create -name "backup script" -read-only -days 30


Use it
- HTTPS only. Requests over plain HTTP are refused, before the token is looked at.
- Send the token in the header, never in the address:
Authorization: Bearer uv_admin_…. A token in the address (?token=…) is refused. - Call it from an app or a script. Browsers can't call it from other web sites (there are no CORS headers).
- Bodies are JSON, at most 1 MB (8 MB for a device import). Unknown fields are refused, so typing mistakes show up.
export UPLIVRA=https://uplivra.example.com
export TOKEN=uv_admin_…
# What can this token do?
curl -H "Authorization: Bearer $TOKEN" $UPLIVRA/api/v1/me
# Devices
curl -H "Authorization: Bearer $TOKEN" "$UPLIVRA/api/v1/devices?site_id=1&limit=200"
If your server uses its own (self-signed) certificate, give curl the certificate with --cacert server.crt, or use -k only in a lab.
A token without the permission an endpoint needs gets 403 with the permission's name, for example this token's access doesn't include "devices.manage". Refused changes are written to the audit log.
Import devices
POST /api/v1/devices/import takes the same fields as the CSV import on Devices › Import (it needs the "Import devices" permission):
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: 6c1e4f0a-import-1" \
$UPLIVRA/api/v1/devices/import -d '{
"devices": [
{"name": "Core switch", "address": "192.168.1.2", "site": "HQ", "kind": "switch", "vendor": "Cisco",
"tags": ["core"], "probes": "ping; snmp:office-switches; tls:443"},
{"name": "Reception printer", "address": "192.168.1.20", "site": "HQ", "kind": "printer", "parent": "Core switch"}
]}'
"dry_run": trueonly checks and says what would happen."mode": "upsert"also updates devices that already have that address at that site. Fields you leave out keep their value.- The answer lists each device with
create,updateorskipand the reasons for a skip.
What else is there
Everything is described in https://<your server>/api/v1/openapi.json (OpenAPI 3.1, no token needed). Load it into Postman, Insomnia or a code generator. In short:
| Area | Endpoints |
|---|---|
| Devices and checks | list, read, add, change (PATCH), delete, import; checks: list, add, change (pause, resume, interval), delete, results; tags, ownership groups |
| Sites and collectors | list, read, add, rename; collectors (read); setup codes for new collectors |
| Alerts and maintenance | list, acknowledge; maintenance windows: list, plan, end; where alerts go |
| Discovery | scans: list, read, create, run |
| IP addresses | subnets, VLANs, reservations: list, add, change, remove |
| Configuration backups | versions per device, one version's text, differences between versions |
| Logs | search logs and SNMP traps |
| Vulnerabilities | findings per device (read) |
| Service desk | tickets: list, read, open, comment |
| Automation | runbooks and runs (read); run a runbook (a runbook that needs approval waits for a person) |
| People | people, access profiles and access groups (read only) |
| Audit | the audit log (read) |
Paging
Lists return a JSON array of up to 100 items. Add limit (at most 1000) for bigger pages. When there's more, the response has two headers:
X-Next-Cursor: 1234
Link: </api/v1/devices?cursor=1234&limit=100>; rel="next"
Ask again with cursor set to that value and the same filters. When X-Next-Cursor is missing, you have everything.
Rate limits
Each token has its own limit (300 requests a minute unless you set another), in bursts of a fifth of that. Every response carries X-RateLimit-Limit and X-RateLimit-Remaining. Over the limit, the answer is 429 Too Many Requests with Retry-After in seconds. An address that sends more than 20 wrong tokens a minute is slowed down the same way.
Retrying safely
Add an Idempotency-Key header (any unique value, such as a UUID) to a POST. If the connection drops and you send the same request with the same key within 24 hours, you get the first answer again (with Idempotent-Replayed: true) instead of a second device, ticket or run.
The audit log
GET /api/v1/audit returns the audit log, newest first, with the same filters as the web page: since, until, actor, action, result and correlation_id. Read-only tokens can use it, which suits a SIEM or a compliance script. Each entry carries its hash, so you can check the chain yourself. Every read is itself recorded, and everything a token changes is recorded as api:<token name> (tokens' changes before this release show as token:<name>).
Upgrading from earlier versions
- The switch was added in this release. If your server's API tokens were used in the 30 days before the upgrade, the upgrade leaves the API on (and says so in the audit log), so scripts keep working. Otherwise it starts off.
- Tokens made before keep their access ("read and change" became Read and write) and don't expire. Revoke them and make new ones with an expiry when you can.
- Plain-HTTP requests and tokens in the address are now refused.