Skip to main content

Overview

This endpoint allows you to export alert data in CSV format. You can apply filters, select specific fields, and control the format of the exported data. This is useful for creating reports, data analysis, and integrating with external business intelligence tools.
Authorization Required: Include a valid Bearer Token in the Authorization header.

Endpoint Details

POST /api/elasticsearch/alerts/export/csv

Method: POST
Content-Type: application/json
Authentication: Bearer Token required
Response: CSV file download or CSV data

Request Body

array
Filters to apply when selecting alerts for export
array
required
List of field names to include in the CSV export
integer
default:"0"
Starting position for pagination (0-based)
integer
default:"10000"
Maximum number of records to export
string
default:"@timestamp"
Field to sort results by
string
default:"desc"
Sort direction: “asc” or “desc”
boolean
default:"true"
Whether to include column headers in the CSV
string
default:"yyyy-MM-dd HH:mm:ss"
Format for date/time fields in the CSV
string
default:","
Field separator character (comma, semicolon, tab)
string
Optional filename for the CSV export

JSON Schema


Request & Response Examples

Additional Code Examples


Response Details

Successful Response


Status Codes

OK
CSV data successfully exported
Bad Request
Invalid field names, malformed filters, or invalid parameters
Unauthorized
Missing or invalid Bearer token
Payload Too Large
Export size exceeds maximum allowed limit
Internal Server Error
Internal server error during export

Common Use Cases

Security Incident Reports

Compliance Reports

Data Analysis Export


Available Fields

Essential fields for most exports:
  • @timestamp - Alert timestamp
  • name - Alert name/title
  • severity - Severity level (1-5)
  • status - Alert status code
  • category - Alert category
  • description - Alert description
  • dataSource - Source system
Network-related alert fields:
  • sourceIp - Source IP address
  • destIp - Destination IP address
  • sourcePort - Source port
  • destPort - Destination port
  • protocol - Network protocol
  • bytes - Bytes transferred
  • packets - Packet count
Security-focused fields:
  • tactic - MITRE ATT&CK tactic
  • technique - MITRE ATT&CK technique
  • user - Associated username
  • process - Process information
  • file - File path
  • hash - File/process hash
  • signature - Detection signature
Alert management fields:
  • assignedTo - Assigned analyst
  • tags - Applied tags
  • notes - Investigation notes
  • disposition - Final disposition
  • createdAt - Creation time
  • updatedAt - Last update time

Export Formats & Options

Date Format Patterns

Separator Options

Size Limits

Export Limits:
  • Maximum size: 100,000 records per request
  • Maximum file size: ~50MB
  • Timeout: 5 minutes for large exports
  • Use pagination (from + size) for larger datasets
  • Consider filtering to reduce result set size

Advanced Examples

Multi-file Export Strategy

Custom Field Mapping

Scheduled Export Script


OpenAPI Specification