{
    "schemes": [],
    "swagger": "2.0",
    "info": {
        "description": "Bug-report automation for QA teams.",
        "title": "insightrecorder API",
        "contact": {},
        "version": "0.1.0"
    },
    "host": "",
    "basePath": "/",
    "paths": {
        "/api/auth/login": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "auth"
                ],
                "summary": "Obtain a JWT access token",
                "parameters": [
                    {
                        "description": "Credentials",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handlers.apiCredentials"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.apiAuthResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    },
                    "429": {
                        "description": "Too Many Requests",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/auth/me": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "auth"
                ],
                "summary": "Current authenticated user",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.apiUser"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/auth/register": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "auth"
                ],
                "summary": "Create an account and obtain a token",
                "parameters": [
                    {
                        "description": "New account",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handlers.apiRegisterRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/handlers.apiAuthResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/bugs": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns a paginated, optionally filtered/searched list of bugs.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bugs"
                ],
                "summary": "List bugs",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Severity filter (P0-P3)",
                        "name": "filter",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Owner filter",
                        "name": "owner",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Free-text search (title/ref)",
                        "name": "q",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Sort: newest|oldest|severity (default newest)",
                        "name": "sort",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Page size (1-200, default 50)",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Pagination offset (default 0)",
                        "name": "offset",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.bugListResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bugs"
                ],
                "summary": "Create a bug",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Replay-safe key; the first response is stored and replayed for retries",
                        "name": "Idempotency-Key",
                        "in": "header"
                    },
                    {
                        "description": "New bug",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handlers.createBugRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/entities.Bug"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/bugs/{id}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bugs"
                ],
                "summary": "Get a bug",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bug ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/entities.Bug"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "tags": [
                    "bugs"
                ],
                "summary": "Delete a bug",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bug ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bugs"
                ],
                "summary": "Update a bug's status and owner",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bug ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Triage update",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handlers.triageRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/entities.Bug"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/bugs/{id}/send": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bugs"
                ],
                "summary": "Send a bug report to an external tracker",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bug ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Replay-safe key; the first response is stored and replayed for retries",
                        "name": "Idempotency-Key",
                        "in": "header"
                    },
                    {
                        "description": "Destination",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handlers.sendRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/entities.Bug"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/bugs/{id}/summarize": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Calls the configured LLM to summarize the bug's captured data and stores the result.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bugs"
                ],
                "summary": "Generate an AI triage summary for a bug",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bug ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/entities.Bug"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    },
                    "503": {
                        "description": "Service Unavailable",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/capture/{token}": {
            "post": {
                "description": "Public ingest endpoint for the capture SDK. The tenant is identified by the opaque capture token in the URL; artifacts are PII-redacted before storage. Severity defaults to P2.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "capture"
                ],
                "summary": "Submit a capture from the browser SDK",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Per-tenant capture token",
                        "name": "token",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "name": "policy_signature",
                        "in": "path"
                    },
                    {
                        "type": "integer",
                        "description": "Which redaction policy the agent applied before transmitting, and the\nsignature this server issued with it. Optional: an older agent, or one\nthat could not reach the policy endpoint, sends neither — it still\nredacted, using its built-in strict default.",
                        "name": "policy_version",
                        "in": "path"
                    },
                    {
                        "type": "string",
                        "name": "severity",
                        "in": "path"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "name": "steps",
                        "in": "path"
                    },
                    {
                        "type": "string",
                        "name": "title",
                        "in": "path"
                    },
                    {
                        "type": "string",
                        "name": "url",
                        "in": "path"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/handlers.captureResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    },
                    "429": {
                        "description": "Too Many Requests",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/compliance/evidence": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "compliance"
                ],
                "summary": "Export SOC 2 compliance evidence (access review + audit integrity)",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.evidence"
                        }
                    }
                }
            }
        },
        "/api/log-retention-rules": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "logs"
                ],
                "summary": "Per-stream log retention rules",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.logRetentionResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "logs"
                ],
                "summary": "Replace per-stream log retention rules",
                "parameters": [
                    {
                        "description": "Rules",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handlers.logRetentionResponse"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.logRetentionResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/logs": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "logs"
                ],
                "summary": "Query ingested logs",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Correlate by trace id",
                        "name": "trace_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "Severity bands (multi; any-of, case-insensitive)",
                        "name": "severity",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Source format (otlp, json, syslog, cef, leef, gelf)",
                        "name": "format",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Body substring",
                        "name": "q",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.logListResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "logs"
                ],
                "summary": "Ingest logs (structured JSON / NDJSON)",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.ingestResult"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/logs/analyze": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "logs"
                ],
                "summary": "Analyze logs for incidents (AI)",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Correlate by trace id",
                        "name": "trace_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "Severity bands (multi; any-of, case-insensitive)",
                        "name": "severity",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Source format (otlp, json, syslog, cef, leef, gelf)",
                        "name": "format",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Body substring",
                        "name": "q",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/entities.LogAnalysis"
                        }
                    },
                    "503": {
                        "description": "Service Unavailable",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/logs/histogram": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "logs"
                ],
                "summary": "Log match distribution over time",
                "parameters": [
                    {
                        "type": "string",
                        "description": "search query (same DSL as GET /api/logs)",
                        "name": "q",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "window, e.g. 15m (default 1h)",
                        "name": "since",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "bar width, e.g. 1m",
                        "name": "bucket",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.logHistogramResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/logs/otlp": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "logs"
                ],
                "summary": "Ingest logs (OTLP/HTTP, Protobuf or JSON encoding)",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.ingestResult"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/logs/{format}": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "tags": [
                    "logs"
                ],
                "summary": "Ingest logs (syslog, CEF, LEEF, or GELF)",
                "parameters": [
                    {
                        "enum": [
                            "syslog",
                            "cef",
                            "leef",
                            "gelf"
                        ],
                        "type": "string",
                        "description": "Log format",
                        "name": "format",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.ingestResult"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/metrics": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metrics"
                ],
                "summary": "Query ingested metrics",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Metric name (exact)",
                        "name": "name",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "RFC3339 start; defaults to one hour ago",
                        "name": "since",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "RFC3339 end",
                        "name": "until",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Downsample bucket, e.g. 1m, 5m, 1h",
                        "name": "step",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "Label match, repeated as key=value",
                        "name": "label",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.metricSeriesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/metrics/names": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metrics"
                ],
                "summary": "List ingested metric names",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Name prefix, e.g. postgresql.",
                        "name": "prefix",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.metricNamesResponse"
                        }
                    }
                }
            }
        },
        "/api/metrics/otlp": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metrics"
                ],
                "summary": "Ingest metrics (OTLP/HTTP, Protobuf or JSON encoding)",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.ingestResult"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    },
                    "429": {
                        "description": "Too Many Requests",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/redaction-policy": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "redaction"
                ],
                "summary": "Get the live redaction policy",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/entities.RedactionPolicy"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "redaction"
                ],
                "summary": "Update the redaction policy (creates a new version)",
                "parameters": [
                    {
                        "description": "Policy",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handlers.redactionUpdateRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/entities.RedactionPolicy"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/settings": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "settings"
                ],
                "summary": "Get workspace capture defaults",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.settingsDTO"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Requires the settings:write permission.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "settings"
                ],
                "summary": "Update workspace capture defaults",
                "parameters": [
                    {
                        "description": "Settings",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handlers.settingsDTO"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.settingsDTO"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/slack/commands/{token}": {
            "post": {
                "tags": [
                    "slack"
                ],
                "summary": "Slack slash command (/insightrecorder)",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/slack/interactive/{token}": {
            "post": {
                "tags": [
                    "slack"
                ],
                "summary": "Slack interactive actions (resolve incident)",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/traces": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "traces"
                ],
                "summary": "List traces",
                "parameters": [
                    {
                        "type": "string",
                        "description": "exact trace id",
                        "name": "trace_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "emitting service",
                        "name": "service",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "operation name contains",
                        "name": "q",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "only traces with a failed span",
                        "name": "errors",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.traceListResponse"
                        }
                    }
                }
            }
        },
        "/api/traces/otlp": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "traces"
                ],
                "summary": "Ingest trace spans (OTLP/HTTP, Protobuf or JSON encoding)",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.ingestResult"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    },
                    "429": {
                        "description": "Too Many Requests",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/traces/{id}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "traces"
                ],
                "summary": "Fetch one trace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "trace id",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.traceResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/webhooks/asana/{token}": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "webhooks"
                ],
                "summary": "Asana webhook (2-way sync)",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/webhooks/clickup/{token}": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "webhooks"
                ],
                "summary": "ClickUp webhook (2-way sync)",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/webhooks/github/{token}": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "webhooks"
                ],
                "summary": "GitHub issues webhook (2-way sync)",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/webhooks/jira/{token}": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "webhooks"
                ],
                "summary": "Jira issue webhook (2-way sync)",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/webhooks/linear/{token}": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "webhooks"
                ],
                "summary": "Linear issues webhook (2-way sync)",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/webhooks/notion/{token}": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "webhooks"
                ],
                "summary": "Notion webhook (2-way sync)",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/webhooks/opsgenie/{token}": {
            "post": {
                "tags": [
                    "webhooks"
                ],
                "summary": "Opsgenie webhook (2-way incident resolve)",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            }
        },
        "/api/webhooks/trello/{token}": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "webhooks"
                ],
                "summary": "Trello webhook (2-way sync)",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.errorResponse"
                        }
                    }
                }
            },
            "head": {
                "tags": [
                    "webhooks"
                ],
                "summary": "Trello webhook verification (HEAD)",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/health": {
            "get": {
                "description": "Returns ok when the process is running (no dependency checks).",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "system"
                ],
                "summary": "Liveness probe",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.healthResponse"
                        }
                    }
                }
            }
        },
        "/health/ready": {
            "get": {
                "description": "Returns ready only when the database is reachable; 503 otherwise.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "system"
                ],
                "summary": "Readiness probe",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handlers.healthResponse"
                        }
                    },
                    "503": {
                        "description": "Service Unavailable",
                        "schema": {
                            "$ref": "#/definitions/handlers.healthResponse"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "entities.AISummary": {
            "type": "object",
            "properties": {
                "affected_files": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "frequency": {
                    "type": "string"
                },
                "likely_cause": {
                    "type": "string"
                },
                "suggested_fix": {
                    "type": "string"
                },
                "tldr": {
                    "type": "string"
                }
            }
        },
        "entities.Bug": {
            "type": "object",
            "properties": {
                "ai_summary": {
                    "description": "generated triage context",
                    "allOf": [
                        {
                            "$ref": "#/definitions/entities.AISummary"
                        }
                    ]
                },
                "captured_at": {
                    "description": "when the session was recorded",
                    "type": "string"
                },
                "console": {
                    "description": "captured console output",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.LogLine"
                    }
                },
                "id": {
                    "description": "UUID v7 (primary key, used in URLs/API)",
                    "type": "string"
                },
                "last_seen_at": {
                    "type": "string"
                },
                "meta": {
                    "description": "environment metadata",
                    "allOf": [
                        {
                            "$ref": "#/definitions/entities.SessionMeta"
                        }
                    ]
                },
                "network": {
                    "description": "captured network activity",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.NetCall"
                    }
                },
                "occurrences": {
                    "description": "Occurrences counts how many times this failure has been captured, and\nLastSeenAt when it last happened. Both are triage signal: \"seen 47 times\nsince Tuesday\" says more than the first capture's timestamp.",
                    "type": "integer"
                },
                "owner": {
                    "description": "assigned engineer, may be empty",
                    "type": "string"
                },
                "ref": {
                    "description": "human-facing reference, e.g. \"BUG-2147\"",
                    "type": "string"
                },
                "severity": {
                    "description": "P0..P3",
                    "allOf": [
                        {
                            "$ref": "#/definitions/entities.Severity"
                        }
                    ]
                },
                "status": {
                    "description": "triage lifecycle state",
                    "allOf": [
                        {
                            "$ref": "#/definitions/entities.Status"
                        }
                    ]
                },
                "steps": {
                    "description": "reproduction steps",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "sync_ref": {
                    "description": "external ticket, e.g. \"JIRA-3294\", may be empty",
                    "type": "string"
                },
                "title": {
                    "description": "human summary of the failure",
                    "type": "string"
                },
                "url": {
                    "description": "page where the bug occurred",
                    "type": "string"
                }
            }
        },
        "entities.CustomPattern": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "regex": {
                    "type": "string"
                }
            }
        },
        "entities.LogAnalysis": {
            "type": "object",
            "properties": {
                "analyzed": {
                    "description": "number of records considered (set server-side)",
                    "type": "integer"
                },
                "confidence": {
                    "description": "high|medium|low",
                    "type": "string"
                },
                "evidence": {
                    "description": "supporting log signals",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "incident": {
                    "description": "short label, or \"No incident detected\"",
                    "type": "string"
                },
                "recommended_action": {
                    "description": "the single most important next step",
                    "type": "string"
                },
                "severity": {
                    "description": "critical|high|medium|low|info",
                    "type": "string"
                },
                "summary": {
                    "description": "one-paragraph explanation",
                    "type": "string"
                }
            }
        },
        "entities.LogBucket": {
            "type": "object",
            "properties": {
                "at": {
                    "type": "string"
                },
                "count": {
                    "type": "integer"
                }
            }
        },
        "entities.LogLine": {
            "type": "object",
            "properties": {
                "level": {
                    "description": "\"info\" | \"warn\" | \"error\"",
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "source": {
                    "description": "originating file/module",
                    "type": "string"
                },
                "time": {
                    "type": "string"
                }
            }
        },
        "entities.LogRecord": {
            "type": "object",
            "properties": {
                "attributes": {
                    "description": "structured fields",
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "body": {
                    "description": "the log message",
                    "type": "string"
                },
                "format": {
                    "description": "source format: otlp|json|syslog|cef|leef|gelf",
                    "type": "string"
                },
                "id": {
                    "description": "ID is the storage id (UUID v7), assigned on ingest. It exists on the read\npath so a record can be addressed: the keyset cursor and the \"what\nsurrounded this line\" context view both need to name one row, and a\ntimestamp alone cannot (two records share a millisecond routinely).",
                    "type": "string"
                },
                "observed_timestamp": {
                    "description": "when we received it",
                    "type": "string"
                },
                "resource": {
                    "description": "origin (service.name, …)",
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "severity_number": {
                    "description": "OTel severity number (1..24)",
                    "type": "integer"
                },
                "severity_text": {
                    "description": "INFO, ERROR, …",
                    "type": "string"
                },
                "span_id": {
                    "type": "string"
                },
                "timestamp": {
                    "description": "event time",
                    "type": "string"
                },
                "trace_id": {
                    "type": "string"
                }
            }
        },
        "entities.LogRetentionRule": {
            "type": "object",
            "properties": {
                "days": {
                    "description": "Days is the retention window for records this rule matches. Must be \u003e 0.",
                    "type": "integer"
                },
                "service_prefix": {
                    "description": "ServicePrefix matches service.name by prefix (e.g. \"payments\" or\n\"logs.security.\"). Empty means any service.",
                    "type": "string"
                },
                "severity": {
                    "description": "Severity is a floor: records at or above it match (e.g. \"error\" matches\nerror and fatal). Empty means any severity.",
                    "type": "string"
                }
            }
        },
        "entities.MetricKind": {
            "type": "string",
            "enum": [
                "gauge",
                "sum"
            ],
            "x-enum-varnames": [
                "MetricGauge",
                "MetricSum"
            ]
        },
        "entities.MetricResolution": {
            "type": "string",
            "enum": [
                "raw",
                "5m"
            ],
            "x-enum-varnames": [
                "MetricRaw",
                "MetricRollup5m"
            ]
        },
        "entities.MetricSample": {
            "type": "object",
            "properties": {
                "timestamp": {
                    "type": "string"
                },
                "value": {
                    "type": "number"
                }
            }
        },
        "entities.MetricSeries": {
            "type": "object",
            "properties": {
                "attributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "kind": {
                    "$ref": "#/definitions/entities.MetricKind"
                },
                "name": {
                    "type": "string"
                },
                "points": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.MetricSample"
                    }
                },
                "resource": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "unit": {
                    "type": "string"
                }
            }
        },
        "entities.NetCall": {
            "type": "object",
            "properties": {
                "is_error": {
                    "type": "boolean"
                },
                "method": {
                    "type": "string"
                },
                "size": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "time": {
                    "description": "when the request started; zero if not captured",
                    "type": "string"
                },
                "timing": {
                    "description": "nanoseconds",
                    "type": "integer"
                },
                "trace_id": {
                    "description": "TraceID joins this request to the server's own log line for it. The\ncapture agent sends a W3C traceparent on same-origin requests (and on\norigins the customer explicitly allows), so a bug that shows\n\"POST /charges -\u003e 500\" can lead to what the server recorded about it.\nEmpty when the request was cross-origin, predates the agent, or the\nheader could not be attached safely.",
                    "type": "string"
                },
                "url": {
                    "type": "string"
                }
            }
        },
        "entities.RedactionPolicy": {
            "type": "object",
            "properties": {
                "allowlist_selectors": {
                    "description": "captured verbatim (client agent)",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "created_at": {
                    "type": "string"
                },
                "created_by": {
                    "type": "string"
                },
                "custom_patterns": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.CustomPattern"
                    }
                },
                "id": {
                    "type": "string"
                },
                "redact_body_keys": {
                    "description": "JSON keys masked in bodies",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "strictness": {
                    "$ref": "#/definitions/entities.RedactionStrictness"
                },
                "strip_headers": {
                    "description": "network headers dropped",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "tenant_id": {
                    "type": "string"
                },
                "version": {
                    "type": "integer"
                }
            }
        },
        "entities.RedactionStrictness": {
            "type": "string",
            "enum": [
                "strict",
                "balanced"
            ],
            "x-enum-varnames": [
                "StrictnessStrict",
                "StrictnessBalanced"
            ]
        },
        "entities.SessionMeta": {
            "type": "object",
            "properties": {
                "browser": {
                    "type": "string"
                },
                "build": {
                    "type": "string"
                },
                "custom": {
                    "description": "Custom is free-form context the host app attaches (release, feature flags,\ntenant/plan, cart value, experiment bucket…). It lives inside the meta\nJSONB column, so it needs no schema change. Values are PII-redacted like\nevery other captured surface, and the map is bounded (see the caps below)\nbecause keys are caller-supplied and unbounded — the same cardinality trap\nas attribute keys elsewhere.",
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "flags": {
                    "type": "string"
                },
                "locale": {
                    "type": "string"
                },
                "network": {
                    "type": "string"
                },
                "os": {
                    "type": "string"
                },
                "session": {
                    "type": "string"
                },
                "user": {
                    "type": "string"
                },
                "viewport": {
                    "type": "string"
                }
            }
        },
        "entities.Severity": {
            "type": "string",
            "enum": [
                "P0",
                "P1",
                "P2",
                "P3"
            ],
            "x-enum-comments": {
                "SeverityP0": "critical: outage or data loss",
                "SeverityP1": "high: major feature broken",
                "SeverityP2": "medium: degraded experience",
                "SeverityP3": "low: cosmetic or minor"
            },
            "x-enum-descriptions": [
                "critical: outage or data loss",
                "high: major feature broken",
                "medium: degraded experience",
                "low: cosmetic or minor"
            ],
            "x-enum-varnames": [
                "SeverityP0",
                "SeverityP1",
                "SeverityP2",
                "SeverityP3"
            ]
        },
        "entities.Span": {
            "type": "object",
            "properties": {
                "attributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "end": {
                    "type": "string"
                },
                "events": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.SpanEvent"
                    }
                },
                "kind": {
                    "$ref": "#/definitions/entities.SpanKind"
                },
                "name": {
                    "description": "operation, e.g. \"POST /checkout\"",
                    "type": "string"
                },
                "parent_span_id": {
                    "description": "empty on the root span",
                    "type": "string"
                },
                "resource": {
                    "description": "service.name, service.version, host…",
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "span_id": {
                    "description": "16 hex chars",
                    "type": "string"
                },
                "start": {
                    "type": "string"
                },
                "status": {
                    "$ref": "#/definitions/entities.SpanStatus"
                },
                "status_message": {
                    "type": "string"
                },
                "trace_id": {
                    "description": "32 hex chars, shared by the whole trace",
                    "type": "string"
                }
            }
        },
        "entities.SpanEvent": {
            "type": "object",
            "properties": {
                "attributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "name": {
                    "type": "string"
                },
                "time": {
                    "type": "string"
                }
            }
        },
        "entities.SpanKind": {
            "type": "string",
            "enum": [
                "internal",
                "server",
                "client",
                "producer",
                "consumer"
            ],
            "x-enum-varnames": [
                "SpanInternal",
                "SpanServer",
                "SpanClient",
                "SpanProducer",
                "SpanConsumer"
            ]
        },
        "entities.SpanStatus": {
            "type": "string",
            "enum": [
                "unset",
                "ok",
                "error"
            ],
            "x-enum-varnames": [
                "SpanStatusUnset",
                "SpanStatusOK",
                "SpanStatusError"
            ]
        },
        "entities.Status": {
            "type": "string",
            "enum": [
                "Triage",
                "In progress",
                "Fixed"
            ],
            "x-enum-varnames": [
                "StatusTriage",
                "StatusInProgress",
                "StatusFixed"
            ]
        },
        "entities.TraceSummary": {
            "type": "object",
            "properties": {
                "duration": {
                    "description": "nanoseconds, like NetCall.Timing",
                    "type": "integer"
                },
                "errors": {
                    "type": "integer"
                },
                "root_name": {
                    "type": "string"
                },
                "service": {
                    "type": "string"
                },
                "span_count": {
                    "type": "integer"
                },
                "start": {
                    "type": "string"
                },
                "trace_id": {
                    "type": "string"
                }
            }
        },
        "handlers.accessRow": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "is_admin": {
                    "type": "boolean"
                },
                "last_login": {
                    "description": "nil = never signed in",
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "permissions": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "roles": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "handlers.apiAuthResponse": {
            "type": "object",
            "properties": {
                "expires_at": {
                    "type": "string"
                },
                "token": {
                    "type": "string"
                },
                "token_type": {
                    "type": "string"
                },
                "user": {
                    "$ref": "#/definitions/handlers.apiUser"
                }
            }
        },
        "handlers.apiCredentials": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "password": {
                    "type": "string"
                },
                "totp": {
                    "description": "TOTP is the second-factor code (or a recovery code) — required when the\naccount has MFA enabled.",
                    "type": "string"
                }
            }
        },
        "handlers.apiRegisterRequest": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "password": {
                    "type": "string"
                },
                "terms_accepted": {
                    "description": "TermsAccepted must be true: the API creates a workspace and its first\nadmin, and no account is created without the agreement that permits it.",
                    "type": "boolean"
                }
            }
        },
        "handlers.apiUser": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "handlers.auditEvidence": {
            "type": "object",
            "properties": {
                "chain_verified": {
                    "type": "boolean"
                },
                "head_hash": {
                    "type": "string"
                },
                "head_seq": {
                    "type": "integer"
                }
            }
        },
        "handlers.bugListResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.Bug"
                    }
                },
                "pagination": {
                    "$ref": "#/definitions/handlers.pageMeta"
                }
            }
        },
        "handlers.captureResponse": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "ref": {
                    "type": "string"
                }
            }
        },
        "handlers.createBugRequest": {
            "type": "object",
            "properties": {
                "console": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.LogLine"
                    }
                },
                "meta": {
                    "$ref": "#/definitions/entities.SessionMeta"
                },
                "network": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.NetCall"
                    }
                },
                "severity": {
                    "type": "string"
                },
                "steps": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "title": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                }
            }
        },
        "handlers.errorResponse": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string"
                }
            }
        },
        "handlers.evidence": {
            "type": "object",
            "properties": {
                "access_review": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handlers.accessRow"
                    }
                },
                "audit": {
                    "$ref": "#/definitions/handlers.auditEvidence"
                },
                "generated_at": {
                    "type": "string"
                },
                "region": {
                    "type": "string"
                },
                "tenant_id": {
                    "type": "string"
                }
            }
        },
        "handlers.healthResponse": {
            "type": "object",
            "properties": {
                "status": {
                    "type": "string"
                }
            }
        },
        "handlers.ingestResult": {
            "type": "object",
            "properties": {
                "accepted": {
                    "type": "integer"
                },
                "rejected": {
                    "type": "integer"
                }
            }
        },
        "handlers.logHistogramResponse": {
            "type": "object",
            "properties": {
                "bucket": {
                    "type": "string"
                },
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.LogBucket"
                    }
                }
            }
        },
        "handlers.logListResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.LogRecord"
                    }
                },
                "pagination": {
                    "$ref": "#/definitions/handlers.pageMeta"
                }
            }
        },
        "handlers.logRetentionResponse": {
            "type": "object",
            "properties": {
                "rules": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.LogRetentionRule"
                    }
                }
            }
        },
        "handlers.metricNamesResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "handlers.metricSeriesResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.MetricSeries"
                    }
                },
                "resolution": {
                    "$ref": "#/definitions/entities.MetricResolution"
                },
                "step": {
                    "type": "string"
                }
            }
        },
        "handlers.pageMeta": {
            "type": "object",
            "properties": {
                "limit": {
                    "type": "integer"
                },
                "offset": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "handlers.redactionUpdateRequest": {
            "type": "object",
            "properties": {
                "allowlist_selectors": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "custom_patterns": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.CustomPattern"
                    }
                },
                "redact_body_keys": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "strictness": {
                    "type": "string"
                },
                "strip_headers": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "handlers.sendRequest": {
            "type": "object",
            "properties": {
                "dest": {
                    "type": "string"
                }
            }
        },
        "handlers.settingsDTO": {
            "type": "object",
            "properties": {
                "auto_ai_summary": {
                    "type": "boolean"
                },
                "buffer_seconds": {
                    "type": "integer"
                },
                "default_severity": {
                    "type": "string"
                },
                "mask_selectors": {
                    "type": "string"
                },
                "network_capture": {
                    "type": "string"
                },
                "retention_days": {
                    "type": "integer"
                }
            }
        },
        "handlers.traceListResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.TraceSummary"
                    }
                }
            }
        },
        "handlers.traceResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.Span"
                    }
                }
            }
        },
        "handlers.triageRequest": {
            "type": "object",
            "properties": {
                "owner": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                }
            }
        }
    },
    "securityDefinitions": {
        "BearerAuth": {
            "description": "JWT access token as \"Bearer \u003ctoken\u003e\".",
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    }
}