Repository navigation
Datasource: JSON
JSON data sources extract values from JSON documents for use in reports:
- Local: JSON reads a file from Nextcloud Files. Select it with the File picker.
- External: JSON reads a URL that the Nextcloud server can reach. Configure the request using the options below. For URLs on a private network, see Data source reference.
Use either source as a real-time report source or in a data load that stores snapshots in an Internal Database dataset. Both support standard JSON and line-delimited JSON (one complete JSON object per line).
- URL
- HTTP method: GET or POST
- Object path: slash-separated object keys; separate individual values with commas
-
Content-Type and Custom headers: headers are written as
Name: value,Name: value -
Authentication:
user:passwordfor Basic authentication - Request body for POST requests
- Timestamp of data load for stored snapshots
For scalar values, use paths such as ocs/data/nextcloud/storage,ocs/data/nextcloud/shares. For an array, use braces to select the output fields, for example {BTC,tmsp,price}. A path before the braces selects a nested array: data/data{forecast,from,intensity/forecast}.
The Select data button beside Object path helps you choose values without writing the path yourself. It is available for both Local and External JSON sources.
- Select the local file or configure the external URL, authentication, and any other request settings first.
- Click Select data to load the JSON and browse its hierarchy. Expand objects or arrays to inspect their contents.
- Select individual values with the checkboxes. To turn an array of records into table rows, use Use all entries and choose the relevant fields at the document root, or Use all … and choose the relevant fields inside a named array. Then select the fields to include as columns, in the desired order. Nested fields can be selected too.
- Click Preview result to check the first 20 output rows and the generated Object path.
- Click Apply selection to copy the path into Object path, then save the report or data load as usual.
For an object containing named scalar values, Use entries as rows creates a row for each entry. You can also edit Object path manually; closing the picker without applying leaves the field unchanged.
The picker browses documents up to 2 MiB and uses the first 50 array records to discover selectable fields. If a field appears only in later records, enter its path manually. Property names containing /, {, }, or ,, or leading/trailing spaces cannot be selected with the current path syntax.
For this JSON document:
{
"data": {
"readings": [
{"room": "Office", "date": "2026-10-18", "sensor": {"temperature": 21.5}},
{"room": "Kitchen", "date": "2026-10-18", "sensor": {"temperature": 22.0}}
]
}
}Use the following Object path:
data/readings{room,date,sensor/temperature}
data/readings locates the array. The fields inside {…} are read from every record, in the specified order; / also navigates nested objects within a record. The result is:
| room | date | temperature |
|---|---|---|
| Office | 2026-10-18 | 21.5 |
| Kitchen | 2026-10-18 | 22.0 |
Place the numeric value in the final column; the preceding columns are dimensions. Here, room and date are dimensions and temperature is the value.
If the document itself is an array, omit the prefix: {room,date,sensor/temperature}. To extract only one individual value instead, use an index such as data/readings/0/sensor/temperature. Comma-separated paths without braces extract individual values as separate rows rather than combining them into one record.
Array extraction produces at least three columns. Selecting fewer fields adds leading placeholder columns named empty. Missing or null fields in array records are replaced by the requested field path, so check the preview when records have different structures.
- Enable the Monitoring app and create an application password.
- Use
https://cloud.example/ocs/v2.php/apps/serverinfo/api/v1/info?format=json. - Set Authentication to
user:app-password. - Set Object path to
ocs/data/nextcloud/storage,ocs/data/nextcloud/shares. - Enable a timestamp only when storing historic snapshots.
Test the request before scheduling it. Do not put credentials in a public report link.