Skip to content

Add client_filename logging and /api/collection endpoint#1

Merged
Neo23x0 merged 2 commits intoNextron-Labs:mainfrom
Colossus14:collection-markers
Feb 24, 2026
Merged

Add client_filename logging and /api/collection endpoint#1
Neo23x0 merged 2 commits intoNextron-Labs:mainfrom
Colossus14:collection-markers

Conversation

@Colossus14
Copy link
Copy Markdown
Contributor

Summary

Two additions to support improved collector testing and collection run tracking.

1. client_filename in JSONL log

JSONL log entries now include a client_filename field containing the original filename from the multipart upload (as submitted by the collector). Previously only the UUID-based storage path was logged, making it difficult to correlate log entries with source files in automated tests.

2. /api/collection endpoint

New POST /api/collection endpoint for collector begin/end markers:

  • Begin: POST /api/collection with {"type":"begin", "source":"hostname", "collector":"bash/0.4.0", "timestamp":"..."}
    • Returns {"scan_id":"<uuid>"}
  • End: POST /api/collection with {"type":"end", "scan_id":"...", "stats":{"scanned":100, "submitted":80, ...}}
    • Returns {"ok":true}

This enables collectors to bracket their runs with start/end markers. The server assigns a scan_id that collectors can include in subsequent upload requests (&scan_id=<id>), allowing the server to group uploads by collection run.

The endpoint is designed for forward compatibility — collectors that use it will silently handle 404 if the server does not support it yet.

Related

- JSONL log entries now include client_filename (original path from multipart upload)
- New /api/collection endpoint for collector begin/end markers
  - POST {type:begin} returns {scan_id:<uuid>}
  - POST {type:end, scan_id, stats} logs collection completion
…point

Implementation guide for the collection session feature: endpoint spec,
request/response formats, error handling, sequence diagram, and notes
on which collectors currently implement it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants