{
  "info": {
    "_postman_id": "d2f9fbd4-aa34-4f85-a088-cribl-pipeline-mock",
    "name": "Data Pipeline — Mock Server Collection",
    "description": "Mock API collection simulating a streaming ingest endpoint for portfolio samples. Use this with a Postman Mock Server to validate API documentation.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "/v1/streams/ingest",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{api_token}}",
            "type": "text"
          },
          {
            "key": "Content-Type",
            "value": "application/json",
            "type": "text"
          },
          {
            "key": "X-Stream-Id",
            "value": "{{stream_id}}",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"timestamp\": \"2025-02-12T18:20:03Z\",\n  \"source\": \"orders-service\",\n  \"level\": \"info\",\n  \"message\": \"Order processed\",\n  \"orderId\": \"ORD-91122\",\n  \"latency_ms\": 134\n}"
        },
        "url": {
          "raw": "{{mock_base_url}}/v1/streams/ingest",
          "host": ["{{mock_base_url}}"],
          "path": ["v1", "streams", "ingest"]
        },
        "description": "Mocked endpoint for testing ingest workflow."
      },
      "response": [
        {
          "name": "200 OK - Accepted",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Stream-Id",
                "value": "{{stream_id}}"
              }
            ],
            "url": "{{mock_base_url}}/v1/streams/ingest"
          },
          "status": "OK",
          "code": 200,
          "body": "{\n  \"status\": \"accepted\",\n  \"ingested_bytes\": 204,\n  \"stream_id\": \"{{stream_id}}\",\n  \"message\": \"Event successfully received by mock server.\"\n}",
          "header": [
            { "key": "Content-Type", "value": "application/json" }
          ]
        },
        {
          "name": "400 Bad Request - Invalid Payload",
          "status": "Bad Request",
          "code": 400,
          "body": "{\n  \"error\": \"invalid_format\",\n  \"detail\": \"Missing or invalid 'timestamp' field. Expected ISO 8601 format.\"\n}",
          "header": [
            { "key": "Content-Type", "value": "application/json" }
          ]
        }
      ]
    }
  ]
}
