POST /upload
Upload and process forensic artifacts with streaming I/O for files up to 6GB+. The endpoint automatically routes to specialized parsers based on file extension and artifact type.Request Format
Content-Type:multipart/form-data
Forensic artifact file. Supports: EVTX, MFT, CSV, XLSX, JSON, Parquet, SQLite, Plist, ZIP, PSList, TXT, LOG
Type of forensic artifact. Used for specialized parsing.Supported values:
evtx: Windows Event Logsmft: NTFS Master File Tablecsv: Generic CSV/TSVxlsx: Excel spreadsheetjson: JSON/JSONL/NDJSONsqlite: SQLite databaseplist: macOS Property Listgeneric: Auto-detect format
Case identifier for multi-file investigations. Registers file in case database.
Investigation phase ID (e.g., “initial_triage”, “deep_dive”). Groups files by analysis stage.
Response Format
Always
"success" on successful uploadHuman-readable status message
API endpoint to query processed data:
/api/data/{csv_filename}Internal CSV filename for normalized timeline data
Excel export filename (only for forensic artifacts like EVTX/MFT)
Number of timeline events extracted
Classification:
"forensic" (EVTX/MFT) or "generic" (CSV/JSON)Original uploaded filename
Database ID if
case_id was providedStreaming Upload Architecture
Chronos-DFIR uses zero-copy streaming to handle large files without memory exhaustion:- Chunked upload: File read in 8KB chunks
- Simultaneous hashing: SHA256 computed during upload (no extra read)
- Disk write: Direct write to
chronos_uploads/directory - Lazy parsing: Files are scanned (not loaded) using Polars
scan_csv()
A 6GB EVTX file is processed with ~200MB peak RAM usage.
Examples
Response Examples
Artifact Type Routing
Generic Artifacts
Files with these extensions are processed as generic tabular data:.csv,.tsv→ Polars scan_csv.xlsx→ Polars read_excel.json,.jsonl,.ndjson→ Polars read_json.parquet→ Polars scan_parquet.db,.sqlite,.sqlite3→ SQLite cursor + Polars DataFrame.plist→ plistlib + Polars DataFrame.pslist,.txt,.log→ Whitespace regex parser.zip→ Automatic extraction
- Ingest using format-specific parser
- Normalize column names (remove special characters)
- Detect time columns (hierarchy:
Time>timestamp>datetime) - Save to
chronos_output/import_{filename}_{timestamp}.csv
Forensic Artifacts
Files with specialized forensic formats:.evtx→ Windows Event Logs (usesevtx_dump+ timeline_skill).mft→ NTFS Master File Table (binary parser with $STANDARD_INFORMATION)
- Call
generate_unified_timeline()fromtimeline_skill.py - Parse binary structures (EVTX XML, MFT records)
- Extract timestamps (Creation, Modification, Access, Entry Modified)
- Generate CSV + XLSX outputs
- Return forensic-grade metadata
Chain of Custody
The upload endpoint computes SHA256 hash during streaming upload with zero extra I/O:- Zero performance penalty (single pass)
- Forensic integrity (tamper detection)
- Audit trail (original filename + size + hash)
- Court admissibility (cryptographic verification)
Case Management
Whencase_id is provided, the file is registered in the case database (DuckDB):
case_id: Investigation identifierphase_id: Analysis phase (triage, deep_dive, reporting)sha256: Chain of custody hashfile_category:forensicorgenericrow_count: Number of timeline events
Multi-file correlation (cross-source pivoting) will use case_id in future releases.
Error Handling
Memory Exhaustion
If normalization fails due to OOM:- Raw file is copied to output directory
- Response includes
processed_records: "Unknown" - File is still queryable (lazy evaluation)
Parsing Failures
If artifact parsing fails:- Error logged to console
- Raw file copied as fallback
- HTTP 500 returned with error details
Unsupported Formats
If file extension is not recognized:Performance Benchmarks
| File Size | Format | Upload Time | Peak RAM | Processed Records |
|---|---|---|---|---|
| 6.0 GB | EVTX | 4m 12s | 210 MB | 850,000 |
| 2.5 GB | MFT | 1m 45s | 180 MB | 1,200,000 |
| 500 MB | CSV | 22s | 90 MB | 2,000,000 |
| 1.2 GB | JSON | 38s | 150 MB | 450,000 |
Next Steps
After uploading a file:- Query data: Use
/api/data/{csv_filename}endpoint - Generate histogram: Call
/api/histogram/{csv_filename} - Run forensic report: POST to
/api/forensic_report - Export results: Use
/api/export_filteredfor CSV/XLSX/JSON
Analysis Endpoints
Query timelines, generate histograms, and run forensic analysis