cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JasonB48
Engaged Sweeper

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

1 ACCEPTED SOLUTION
DiegoPacini
Product Team
Product Team

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

View solution in original post

2 REPLIES 2
JasonB48
Engaged Sweeper

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.

 

DiegoPacini
Product Team
Product Team

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