Custom API
Show values from any JSON API in a widget, read by the NasDash server.
The Custom API widget shows values from any service that answers JSON over HTTP(S): a speed test, disk health, a UPS, a sensor, a status page… anything without its own widget.
Add an API
-
Open Settings → Integrations → Custom APIs and choose Custom API.
-
Name it and enter the address that answers JSON (for example
https://service.example.com/api/status). -
Choose the Authentication the service expects:
Choice Sent by the server None Nothing Token (Bearer) Authorization: Bearer <key>Header <name>: <key>(for exampleX-Api-Key)User and password HTTP Basic authentication URL parameter ?<name>=<key>added to the address -
Turn on Accept a self-signed certificate only for a server you own that uses one, save, then test the connection.
The key is stored with the other connection secrets. The server reads the API (no redirects, 1 MiB and 6 seconds at most); the browser never receives the address, the key nor the whole answer.
Pick the values
Add the widget, then open its settings (✎). The API's answer appears on the right as a tree. Click + beside a value to add it (12 at most); a list's + adds its number of items. For each value, set its label, format (number, percentage, size, bit rate, duration, date, time ago, text, yes/no) and unit; the slider button holds the decimals, the gauge scale and the warning and critical thresholds (with Lower is worse for a battery or a free space).
| Display | Shows |
|---|---|
| Figures | Each value large, with its label |
| Gauges | Rings on each value's scale (0–100 by default) |
| List | Labels and values, one per line |
| Table | One row per item of a list: choose Use as table on a list, then pick the columns in its first item (up to 50 rows) |
| Status | Running or Problem from one value; optionally the value that means fine and a caption |
The widget refreshes every 15 s to 15 min. Several widgets reading the same API share one request.
Access
Viewers see the widget only with the Custom API permission (Settings → Users and access). Only the values picked in a widget leave the server. The public demo reads a fictional API.