Query Export

LogZilla documentation for Query Export

Query Export Formats

Exports are requested via GET /api/query/{qid}/export.

Parameters:

  • ftype: json (default), csv, or xlsx (see per-type support below).
  • timezone: Optional. Timezone name used for date formatting.
  • filename: Optional. Suggested file name for attachment.

Supported formats by query type (verified in lib/logzilla/query_export.py):

  • Search — json, csv, xlsx
  • TopN — json, xlsx
  • EventRate — json
  • LastN — json

Notes:

  • Microsoft Excel format is xlsx (correct spelling). docx and pdf are not implemented by the exporter classes.
  • The export response is a file download with appropriate content type.

Example

bash
curl -H "Authorization: token YOUR_TOKEN" \
     -G "http://your-logzilla-server/api/query/QID_HERE/export" \
     --data-urlencode "ftype=xlsx" \
     --data-urlencode "timezone=UTC" \
     --data-urlencode "filename=search_results.xlsx" \
     -o search_results.xlsx

See Making Queries for creating a query and retrieving its qid, and the interactive docs at /api/docs for full endpoint details.

Query Export | LogZilla Documentation