Export Events

Export your audit log events in JSON or CSV format for analysis, archival, or compliance purposes.

Pro Plan Required: The export endpoint requires a Pro plan or higher subscription.

Export Endpoint

GET /events/export

Stream and download audit log events as a file. The response includes a Content-Disposition header to trigger a browser download.

Required Scope

export

Query Parameters

Parameter Type Description
format string Export format: json or csv. Default: json
action string Filter by action name (e.g., user.login)
actor_id string Filter by actor ID
target_type string Filter by target type
target_id string Filter by target ID
from string Start date (ISO 8601 format)
to string End date (ISO 8601 format)

Response

The endpoint returns a streamed file download with appropriate headers:

  • Content-Type: application/json or text/csv
  • Content-Disposition: attachment; filename="events-export-{timestamp}.{format}"

Examples

curl -X GET "https://logproof.de/v1/events/export?format=csv&action=user.login" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o events-export.csv
<?php

$client = new \GuzzleHttp\Client();

$response = $client->get('https://logproof.de/v1/events/export', [
    'headers' => [
        'Authorization' => 'Bearer YOUR_API_KEY',
    ],
    'query' => [
        'format' => 'csv',
        'action' => 'user.login',
        'from' => '2025-01-01T00:00:00Z',
        'to' => '2025-01-31T23:59:59Z',
    ],
    'sink' => 'events-export.csv',
]);

echo "Export saved to events-export.csv\n";
const fs = require('fs');
const https = require('https');

const file = fs.createWriteStream('events-export.csv');

const options = {
  hostname: 'logproof.de',
  path: '/v1/events/export?format=csv&action=user.login',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
};

https.get(options, (response) => {
  response.pipe(file);

  file.on('finish', () => {
    file.close();
    console.log('Export saved to events-export.csv');
  });
});
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_KEY'
}

params = {
    'format': 'csv',
    'action': 'user.login',
    'from': '2025-01-01T00:00:00Z',
    'to': '2025-01-31T23:59:59Z'
}

response = requests.get(
    'https://logproof.de/v1/events/export',
    headers=headers,
    params=params,
    stream=True
)

with open('events-export.csv', 'wb') as f:
    for chunk in response.iter_content(chunk_size=8192):
        f.write(chunk)

print('Export saved to events-export.csv')
Tip: For large exports, the streaming response ensures memory-efficient downloads without loading the entire dataset into memory.