‎08-29-2024 12:22 PM
Our company has recently started using the Lansweeper cloud service.
We would like to export the data from custom reports that IT have built.
I have the API working using postman. I can see a test custom report listed along with its report ID.
The documentation seems to only show calls to get the status of executions of the report.
However I would like to get the actual data out from the report.
Is this a supported option?
If so, What query should I use to 1. to interrogate what fields a report has and also to then extract those fields.
Any help appreciated.
Thanks
Jason
Solved! Go to Solution.
‎08-30-2024 10:27 AM
Hello @JasonB48 . Sure you can! Have a look at the reportExecutionResults query here: https://docs.lansweeper.com/docs/api/working-with-reports#getting-the-latest-reports-execution
The reportExecutionStatus that you mention is used to check the status of the report execution that you trigger with the previous call. https://docs.lansweeper.com/docs/api/working-with-reports#getting-a-reports-status
I hope this helps
‎08-30-2024 11:17 AM
Thanks Diego,
Reading through this documentation again, I finally realised that the data is in the URL generated (It downloads it as a csv). I was expecting it to be like the normal calls to entities, where you need to specify the schema and get back a json result set. However this approach is fine, I can programmatically download the csv's and then import them into our data warehouse.
Thanks again for your help.
‎08-30-2024 10:27 AM
Hello @JasonB48 . Sure you can! Have a look at the reportExecutionResults query here: https://docs.lansweeper.com/docs/api/working-with-reports#getting-the-latest-reports-execution
The reportExecutionStatus that you mention is used to check the status of the report execution that you trigger with the previous call. https://docs.lansweeper.com/docs/api/working-with-reports#getting-a-reports-status
I hope this helps
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now