How to export logs to CSV

If you need to export/archive your DNS query logs externally, here is how you can do it.

Using Web Panel

If you're looking to manually export your DNS query logs, simply navigate to Activity Log section, choose the desired device from the drop down menu (or select All Devices) and click the export button.

Using API

If you're looking to automate this behavior using very basic scripting, here is how you do that.

  1. Generate an API token API Token
  2. See API Docs on how you use this token (via Authorization header)
  3. Execute an API call against your Analytics instance:


  • analytics-endpoint-id = See below how to find yours
  • startTs = Starting unix timestamp of the time window you're interested in. Can go back max of 3 days.
  • endTs = Ending unix timestamp of the time window you're interested in. You can omit this field if you want up-to-the-second logs.
  • deviceId = Resolver ID of the desired device you want logs for. You can omit this field to get logs for all devices.


Here is a quick example using curl.

Test-Box:~$ curl '' \
--header 'Authorization: Bearer REDACTED_API_TOKEN'
2024-04-05T19:20:42Z,1lga4zf,,redacted,7f9288dc9265,,,1,default,,,doh,A,0,,21949,Beanfield Technologies,Toronto,CA,,14618,,Ashburn,US
2024-04-05T19:17:01Z,1lga4zf,,redacted,c22a3d3b46b6,,,1,default,,,doh,A,0,,21949,Beanfield Technologies,Toronto,CA,;;;;;;;;;;;,41231,Canonical Group Limited,,GB

How to find your Analytics Endpoint ID

On the Activity Log section, open dev tools, search for Analytics and find the "historical" request. The subdomain that's circled is your Analytics Endpoint ID.

Fetch Sub-Organization Data

By default, an API token that is generated within the main organization will only query logs for devices that belong to the main organization. This means that data generated by devices within sub-organizations will not be returned.

In order for the API token to access data within sub-organizations, you need to append an additional header to the earlier API call: X-Force-Org-Id: xxxxxxx where xxxxxxx is the Org ID of the desired sub-organization. You can find this ID at the top of the My Organization page.