‎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
‎11-07-2024 12:30 PM
You're on the right track with Postman, but I totally get why you'd want to extract the actual report data. I ran into a similar issue last year when trying to pull data from another API, and I had to dig a bit deeper into the query options. One thing I did find helpful was using tools like the Identity Verification API to confirm the integrity of the data I was pulling.
‎11-14-2024 09:14 AM
@KerryJohnson wrote:You're on the right track with Postman, but I totally get why you'd want to extract the actual report data. I ran into a similar issue last year when trying to pull data from another API, and I had to dig a bit deeper into the query options. One thing I did find helpful was using tools like the Identity Verification API to confirm the integrity of the data I was pulling.
It might not directly apply to your Lansweeper report queries, but it helped me think about better ways to handle the data extraction side of things. You can check it out at https://www.idanalyzer.com. Not sure if it’s the same scenario for you, but it worked wonders for my project.
‎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