hello. i am new to PRTG and had a question about how to export logs. i found this post.

https://www.paessler.com/manuals/prtg/http_api

my questions is how to combine the two commands to incorporate name and password to allow the export.

https://yourserver/api/table.xml?content=sensors&columns=sensor&output=csvtable

https://yourserver/api/table.xml?content=sensors&columns=sensor&username=myuser&password=mypassword

thank you


Article Comments

Hi there,

You can just add the authentication right after your call with a "&". This means your call should look like this:

https://yourserver/api/table.xml?content=sensors&columns=sensor&output=csvtable&username=myuser&password=mypassword

Kind regards

Felix Wiesneth - Team Tech Support


Feb, 2022 - Permalink

Excellent. Thank you. This worked and leads me to another question. How would I work the credentials into the following historical data query?

https://yourserver/api/historicdata.csv?id=objectid&avg=0&sdate=2022-01-30-00-00-00&edate=2022-01-31-00-00-00

Thanks so much for the assistance.


Feb, 2022 - Permalink

Hi there,

It will be always possible to add you credentials with a "&" at the end of your call. Just add to your calls following:

&username=myuser&password=mypassword

Kind regards

Felix Wiesneth - Team Tech Support


Feb, 2022 - Permalink

Thank you for reply. I seem to have a challenge. When I add that snippet to end of line is get "This site can’t be reached". If I try to line without creds I get "Unauthorized".

https://yourserver/api/historicdata.csv?id=objectid&avg=0&sdate=2022-01-30-00-00-00&edate=2022-01-31-00-00-00&username=myuser&password=mypassword

Is there anything else I can try. I am trying to get some historical data from an outage.

Thank you.


Feb, 2022 - Permalink

Hi there,

Did you check if the ID exists in your call?
As an alternative you can create this call also from tab Historic Data in the sensor directly.


Kind regards

Felix Wiesneth - Team Tech Support


Feb, 2022 - Permalink