Stewi API
Endpoints

Query Records

List normalized records and their stewardship status.

GET /api/pipeline/records

Fetch normalized records along with policy decisions, confidence scores, and AI insight metadata.

Query Parameters

NameTypeDescription
statusstringFilter by auto_accept, auto_reject, or requires_review.
limitintegerDefaults to 50. Max 200.
sinceISO dateReturn records updated after this timestamp.

Response

{
  "data": [
    {
      "id": "e6a1f502-6b1d-4c71-b372-0d8d1267c0f2",
      "provider": "slack",
      "title": "Q4 forecast adjustment",
      "decision": "requires_review",
      "confidence": {
        "aggregate": 0.42,
        "deterministic": 0.38,
        "ai": 0.47
      },
      "policy_flags": [
        {
          "rule": "subjective_language",
          "severity": "medium",
          "reason": "Detected speculative claim without source."
        }
      ],
      "ai_insight": {
        "headline": "Ambiguous revenue claim",
        "summary": "Message updates ARR without referencing CRM or finance approvals.",
        "metadata": {
          "tone": "assertive",
          "subjectivity": "high",
          "risks": ["financial_claim"]
        }
      },
      "updated_at": "2024-11-29T22:10:41.000Z"
    }
  ],
  "next_cursor": "WyIyMDI0LTExLTI5VDIyOjEwOjQxLjAwMFoiLCJ..."
}

Paginate using the returned next_cursor with /api/pipeline/records?cursor=....

On this page