SigSentrySigSentry
Analyses

POST /v1/analyses

Trigger a new analysis with a description and time window

Creates a new analysis. Reads logs from your project's connected log sources within the given time window, runs a diagnosis, and returns the result.

Authentication

API key with analysis:create permission. Project-scoped or tenant-scoped (with X-Project-Id).

Endpoint

POST /v1/analyses

Request body

FieldTypeRequiredNotes
descriptionstring (1–5000 chars)What's wrong, in plain language
timeStartstring (ISO 8601)Window start; must be in the past
timeEndstring (ISO 8601)Window end; must be after timeStart and not more than 60s in the future
metadataobject<string,string>Free-form metadata attached to the analysis (e.g. ticket id, deploy id)
{
  "description": "Checkout 500s spiked after 14:00",
  "timeStart": "2026-04-25T14:00:00Z",
  "timeEnd": "2026-04-25T14:30:00Z",
  "metadata": {
    "ticketId": "ZD-12345"
  }
}

Response

202 Accepted

The analysis was created. If processing finished synchronously (small windows usually do) the status is complete and result is populated. Larger windows return processing and you should poll GET /v1/analyses/{id} for the result.

{
  "success": true,
  "data": {
    "id": "ana_x1y2z3...",
    "status": "complete",
    "description": "Checkout 500s spiked after 14:00",
    "timeStart": "2026-04-25T14:00:00Z",
    "timeEnd": "2026-04-25T14:30:00Z",
    "metadata": { "ticketId": "ZD-12345" },
    "createdAt": "2026-04-25T14:30:12Z",
    "result": {
      "summary": "Connection pool exhaustion in checkout-api...",
      "severity": "high",
      "confidence": 0.87,
      "rootCause": {
        "description": "...",
        "service": "checkout-api",
        "errorType": "ConnectionPoolExhausted",
        "category": "database"
      },
      "affectedServices": [
        { "serviceName": "checkout-api", "role": "origin", "errorCount": 234, "firstSeen": "...", "lastSeen": "..." }
      ],
      "timeline": [
        { "timestamp": "...", "service": "checkout-api", "level": "error", "message": "...", "isRootCause": true }
      ],
      "suggestedActions": [
        { "priority": 1, "action": "Increase the database connection pool ceiling", "rationale": "...", "type": "fix" }
      ],
      "logsScanned": 18437
    }
  }
}
FieldTypeNotes
idstringThe analysis id — use it to fetch, follow up, or rate
status'pending' | 'processing' | 'complete' | 'partial' | 'failed'Lifecycle status
resultobject | nullPresent when status is complete or partial
result.severity'critical' | 'high' | 'medium' | 'low' | 'info'
result.confidencenumber (0–1)
result.rootCause.categorystringOne of: authentication, authorization, database, network, timeout, rate_limiting, validation, null_reference, configuration, dependency, memory, disk, unknown
result.affectedServices[].role'origin' | 'propagator' | 'affected'Where this service sits in the failure chain
result.suggestedActions[].type'fix' | 'investigate' | 'mitigate' | 'escalate'

For deeper field-by-field guidance see Reading the result.

Error responses

Statuserror.codeWhen
400VALIDATION_ERRORDescription, time fields, or metadata failed validation
400INVALID_TIME_RANGEtimeEnd is not after timeStart
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENKey lacks analysis:create
403QUOTA_EXCEEDEDMonthly quota reached, overage not enabled
500ANALYSIS_ERRORServer-side analysis failure

Example

curl -X POST https://api.sigsentry.com/v1/analyses \
  -H "Authorization: Bearer ss_secret_..." \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Checkout 500s spiked after 14:00",
    "timeStart": "2026-04-25T14:00:00Z",
    "timeEnd": "2026-04-25T14:30:00Z"
  }'

Idempotency

POST /v1/analyses honors the Idempotency-Key header — see Idempotency.