Spanish Total.js
English
Documentation For AI agents
Contents

Load a report

POST /reports/ runs a report and returns its fields and rows.

.md GitHub
On this page

Runs a report and returns its rows. Enable the API first.

Request

curl -X POST -H "x-token: YOUR_TOKEN" -H "Content-Type: application/json" \
  -d '{"id":"JapOn71ca61f","filter":[{"id":"xfu9n6e","value":"Italy"},{"id":"xg41zyw","value":"2026-09-01; 2026-12-31"}]}' \
  http://localhost:8000/reports/
KeyMeaning
idThe ID of the report, from List reports. Required.
filterValues for the dynamic filters: the field id and its value, always as text. Filters with a fixed value cannot be changed.
charttrue returns chart data instead of rows.

Response

{
    "fields": [
        { "id": "xa0wfry", "name": "Customer", "datatype": "string" },
        { "id": "xfu9n6e", "name": "Country", "datatype": "string" },
        { "id": "x1twuy9b", "name": "Product", "datatype": "string" },
        { "id": "total", "name": "Total", "datatype": "number", "format": 2 },
        { "id": "xg41zyw", "name": "Created", "datatype": "date" }
    ],
    "rows": [
        { "xa0wfry": "Luca Rossi", "xfu9n6e": "Italy", "x1twuy9b": "Notebook", "total": 12.5, "xg41zyw": "2026-10-07T13:30:00.000Z" },
        { "xa0wfry": "Luca Rossi", "xfu9n6e": "Italy", "x1twuy9b": "Office chair", "total": 298, "xg41zyw": "2026-10-28T17:25:00.000Z" }
    ]
}
  • fields describes the columns in order. format is the number of decimals from the view.
  • Each row is an object whose keys are the field IDs.
  • Dates are in UTC.

Errors

AnswerReason
401: UnauthorizedThe API is off or the token is wrong.
404: Not FoundNo report has this ID, or the report is private.
Made in Europe