{
  "info": {
    "name": "Jylus public v1 API",
    "description": "Keep the apiKey variable private. Ingest then poll receipt verification before analyzing. History requests require an explicit lower timestamp bound.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.jylus.ai/api/v1"
    },
    {
      "key": "apiKey",
      "value": ""
    },
    {
      "key": "namespace",
      "value": "my-demo"
    },
    {
      "key": "receiptId",
      "value": "req_0123456789abcdef"
    },
    {
      "key": "idempotencyKey",
      "value": "replace-with-a-unique-logical-write-key"
    }
  ],
  "item": [
    {
      "name": "Ingest one source record",
      "request": {
        "method": "POST",
        "url": "{{baseUrl}}/events",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{idempotencyKey}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"stream\": \"demo\",\n  \"namespace\": \"{{namespace}}\",\n  \"events\": [\n    {\n      \"id\": \"record-1\",\n      \"type\": \"state\",\n      \"occurred_at\": \"2026-01-15T09:00:00Z\",\n      \"data\": {\n        \"entity_id\": \"pump-a\",\n        \"status\": \"Warning\",\n        \"temperature\": 84\n      }\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Verify accepted receipt",
      "request": {
        "method": "GET",
        "url": "{{baseUrl}}/receipts/{{receiptId}}",
        "header": []
      }
    },
    {
      "name": "Search source records",
      "request": {
        "method": "POST",
        "url": "{{baseUrl}}/search",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"query\": \"pump-a\",\n  \"namespace\": \"{{namespace}}\",\n  \"from\": \"now-24h\",\n  \"to\": \"now\",\n  \"limit\": 10\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Query current records",
      "request": {
        "method": "POST",
        "url": "{{baseUrl}}/query",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"source\": \"current\",\n  \"where\": {\n    \"namespace\": \"{{namespace}}\"\n  },\n  \"limit\": 10\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Compile decision evidence",
      "request": {
        "method": "POST",
        "url": "{{baseUrl}}/analyze",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"source\": \"current\",\n  \"where\": {\n    \"namespace\": \"{{namespace}}\"\n  },\n  \"text\": \"What is pump-a status and temperature?\",\n  \"limit\": 10,\n  \"include_results\": true,\n  \"context\": {\n    \"mode\": \"decision\",\n    \"token_budget\": 4000\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    }
  ]
}
