{
  "info": {
    "name": "Briefcase AI - Agent Observability Platform",
    "description": "Comprehensive API for integrating AI agent observability, monitoring, and optimization.\n\n## Features\n- Real-time agent performance tracking\n- Automated benchmarking and comparison\n- Data retention policy management\n- Webhook notifications for critical events\n\n## Authentication\nAll API requests require a Bearer token in the Authorization header:\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\n## tRPC Request Format\nThis API uses tRPC protocol. All request payloads must be wrapped in a `json` key:\n```json\n{\n  \"json\": {\n    \"apiKey\": \"your-api-key\",\n    \"agentId\": 42,\n    \"status\": \"success\"\n  }\n}\n```\n\nThe `apiKey` field is included in the request body (inside the `json` wrapper), not in headers.\n\n## Rate Limits\n- Standard Tier: 1,000 requests/hour, 10,000 requests/day\n- Enterprise Tier: 10,000 requests/hour, 100,000 requests/day\n",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_postman_id": "briefcase-ai-collection",
    "version": "1.0.0"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://observe.briefcasebrain.io",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "bca_your_api_key",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Data Retention",
      "item": [
        {
          "name": "Get current retention policy",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/trpc/dataRetention.getPolicy",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "trpc",
                "dataRetention.getPolicy"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response has result\", function () {",
                  "    var jsonData = pm.response.json();",
                  "    pm.expect(jsonData).to.have.property('result');",
                  "});",
                  "",
                  "pm.test(\"Response time is acceptable\", function () {",
                  "    pm.expect(pm.response.responseTime).to.be.below(5000);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "Update retention policy",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/trpc/dataRetention.updatePolicy",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "trpc",
                "dataRetention.updatePolicy"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"json\": {\n    \"retentionDays\": 90,\n    \"applyToAgentRuns\": true,\n    \"applyToBenchmarks\": true,\n    \"applyToAlerts\": false\n  }\n}"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response has result\", function () {",
                  "    var jsonData = pm.response.json();",
                  "    pm.expect(jsonData).to.have.property('result');",
                  "});",
                  "",
                  "pm.test(\"Response time is acceptable\", function () {",
                  "    pm.expect(pm.response.responseTime).to.be.below(5000);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "Get data statistics",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/trpc/dataRetention.getDataStats",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "trpc",
                "dataRetention.getDataStats"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response has result\", function () {",
                  "    var jsonData = pm.response.json();",
                  "    pm.expect(jsonData).to.have.property('result');",
                  "});",
                  "",
                  "pm.test(\"Response time is acceptable\", function () {",
                  "    pm.expect(pm.response.responseTime).to.be.below(5000);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "Execute data cleanup",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/trpc/dataRetention.executeCleanup",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "trpc",
                "dataRetention.executeCleanup"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response has result\", function () {",
                  "    var jsonData = pm.response.json();",
                  "    pm.expect(jsonData).to.have.property('result');",
                  "});",
                  "",
                  "pm.test(\"Response time is acceptable\", function () {",
                  "    pm.expect(pm.response.responseTime).to.be.below(5000);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Telemetry",
      "item": [
        {
          "name": "Ingest agent telemetry data",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/trpc/ingest.telemetry",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "trpc",
                "ingest.telemetry"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"json\": {\n    \"apiKey\": \"bca_your_api_key\",\n    \"agentId\": 42,\n    \"status\": \"success\",\n    \"latency\": 1250,\n    \"cost\": 0.0042,\n    \"accuracy\": 95.5\n  }\n}"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response has result\", function () {",
                  "    var jsonData = pm.response.json();",
                  "    pm.expect(jsonData).to.have.property('result');",
                  "});",
                  "",
                  "pm.test(\"Response time is acceptable\", function () {",
                  "    pm.expect(pm.response.responseTime).to.be.below(5000);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "Batch telemetry ingestion",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/trpc/ingest.batch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "trpc",
                "ingest.batch"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"json\": {\n    \"apiKey\": \"bca_your_api_key\"\n  }\n}"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response has result\", function () {",
                  "    var jsonData = pm.response.json();",
                  "    pm.expect(jsonData).to.have.property('result');",
                  "});",
                  "",
                  "pm.test(\"Response time is acceptable\", function () {",
                  "    pm.expect(pm.response.responseTime).to.be.below(5000);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Agent Runs",
      "item": [
        {
          "name": "Record agent run (authenticated)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/trpc/agents.recordRun",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "trpc",
                "agents.recordRun"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"json\": {\n    \"agentId\": 42,\n    \"status\": \"success\",\n    \"latency\": 1250,\n    \"cost\": 0.0042,\n    \"accuracy\": 95.5,\n    \"inputData\": \"Analyze quarterly sales data\",\n    \"outputData\": \"Sales increased 15% YoY\",\n    \"errorMessage\": \"Timeout after 30s\",\n    \"toolCalls\": \"[{\\\"name\\\": \\\"search_database\\\"}]\",\n    \"reasoningPath\": \"First analyzed trends\",\n    \"temperature\": 0.7,\n    \"taskType\": \"data_analysis\",\n    \"modelTier\": 2,\n    \"totalAgreementRate\": 0.85,\n    \"normalizedEditDistance\": 0.12,\n    \"factualDriftCount\": 0,\n    \"consistencyScore\": 0.92\n  }\n}"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response has result\", function () {",
                  "    var jsonData = pm.response.json();",
                  "    pm.expect(jsonData).to.have.property('result');",
                  "});",
                  "",
                  "pm.test(\"Response time is acceptable\", function () {",
                  "    pm.expect(pm.response.responseTime).to.be.below(5000);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Validation",
      "item": [
        {
          "name": "Create validation schema",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/trpc/validation.create",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "trpc",
                "validation.create"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"json\": {\n    \"agentId\": 42,\n    \"name\": \"Production Data Format\",\n    \"description\": \"Ensures all production telemetry includes required fields\",\n    \"jsonSchema\": \"{\\\"type\\\": \\\"object\\\", \\\"required\\\": [\\\"accuracy\\\", \\\"cost\\\"], \\\"properties\\\": {\\\"accuracy\\\": {\\\"type\\\": \\\"number\\\", \\\"minimum\\\": 0, \\\"maximum\\\": 100}}}\",\n    \"webhookUrl\": \"https://example.com/webhooks/validation-failure\"\n  }\n}"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response has result\", function () {",
                  "    var jsonData = pm.response.json();",
                  "    pm.expect(jsonData).to.have.property('result');",
                  "});",
                  "",
                  "pm.test(\"Response time is acceptable\", function () {",
                  "    pm.expect(pm.response.responseTime).to.be.below(5000);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "List validation schemas",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/trpc/validation.list",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "trpc",
                "validation.list"
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response has result\", function () {",
                  "    var jsonData = pm.response.json();",
                  "    pm.expect(jsonData).to.have.property('result');",
                  "});",
                  "",
                  "pm.test(\"Response time is acceptable\", function () {",
                  "    pm.expect(pm.response.responseTime).to.be.below(5000);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    }
  ]
}