Investigations API

Create and manage investigations programmatically, read the agent's action stream, and generate reports.

Base path: /api/v1/investigate · Permission resource: investigation. Investigation IDs are numeric. All requests require authentication.

Endpoints

MethodPathPurposePermission
POST/investigate/Create an investigationinvestigation:create
GET/investigate/List investigationsinvestigation:read
GET/investigate/{id}Get one (with its events)investigation:read
PATCH/investigate/{id}Update title/query/statusinvestigation:update
DELETE/investigate/{id}Archive (soft-delete)investigation:delete
GET/investigate/{id}/actionsList events/actionsinvestigation:read
GET/investigate/{id}/actions/{action_id}Get one eventinvestigation:read
GET/investigate/{id}/artifactsList linked artifactsinvestigation:read
GET/investigate/{id}/responsesList linked AI responsesinvestigation:read
POST/investigate/{id}/reportGenerate a reportinvestigation:update
GET/investigate/{id}/reportGet the current reportinvestigation:read

Create an investigation

POST /api/v1/investigate/: body:

FieldTypeNotes
titlestringrequired, 1-500 chars
querystringthe question to investigate
curl -s -X POST "http://localhost:8000/api/v1/investigate/" \
  -H "Authorization: Bearer $CLOUDPEEK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "title": "Suspicious logins for jdoe", "query": "Investigate failed and successful logins for user jdoe in the last 24 hours" }'
# → 201 Created
Note

Creating an investigation here records it. To actually run the AI agent against it (and stream its work), use the AI Responses API with an investigation_id, that is the engine the web app uses.

The investigation object

A returned investigation includes: id (int), title, query, status, result, created_at, updated_at, last_message_at, created_by_id, events (a map of the recorded actions), and response_ids (linked AI responses).

status reflects the lifecycle: pending → planning → executing → completed / failed.

Reading the agent's work

  • GET /investigate/{id}/actions returns the events/actions the agent recorded. Filter with event_type, author_type, author_id, and paginate with limit (1-500, default 100) and offset.
  • GET /investigate/{id}/responses lists the AI responses linked to this investigation.
  • GET /investigate/{id}/artifacts lists artifacts the investigation produced (see Artifacts API).

Reports

  • POST /investigate/{id}/report generates a written report (optional { "model": "…" } to choose the model). Returns { "report": … }.
  • GET /investigate/{id}/report returns the current report, or null if none exists.

© 2026 CloudPeek. Agentic AI for high-consequence security operations.