Getting Reports
Getting Reports Bloc
Please Note: All Bloc Data User Restrictions will apply in these requests. If you are not getting data back or cannot access the bloc, please make sure the user who the Auth token was created for is not restricted to certain data, and please also make sure they have been given access to that bloc.
Returns the data as a blob that can generate an excel file or just as json data
GET
https://example.mydomain.com/api/get-data-report
Request Body
fieldsToReport*
string or json
The list of fields you want to include the report, or can just say "all". If you want to pick certain fields, the field slugs must be included with the true value, e.g. {"field_1":true,"field_2":true, "field_3":true}
stationID*
integer
The bloc ID (blocId parameter will soon be added)
responseType
string
This should say "blob". If it's not included it will return the data as json allowing you to build your own report. If it is included and says "blob" it will provide blob data and your code should be able to create a file from it.
requestedReportData
json
This lists the from and to date, e.g. {"reportFromDate":"2022-11-04 00:00:00","reportToDate":"2023-03-11 23:59:59"}
dataFilteringData
json
This allows you to filter data by field value pairs... blocworx_free_search will search the whole record. {"stationID":7333,"filterDataToQuery":{"field_1":["Value","Value2"],"blocworx_free_search":["Value3"]},"currentPage":1,"reverse":false}
Last updated