{ "openapi": "3.0.0", "components": { "examples": {}, "headers": {}, "parameters": {}, "requestBodies": {}, "responses": {}, "schemas": { "UsageTimelineRangeResponse": { "type": "string", "enum": [ "12h", "24h" ] }, "UsageTimelineBucketUnitResponse": { "type": "string", "enum": [ "hour" ], "nullable": false }, "UsageTimelineCompletenessState": { "type": "string", "enum": [ "complete", "partial", "unavailable" ] }, "UsageTimelineCompletenessResponse": { "properties": { "token": { "$ref": "#/components/schemas/UsageTimelineCompletenessState" }, "cost": { "$ref": "#/components/schemas/UsageTimelineCompletenessState" } }, "required": [ "token", "cost" ], "type": "object", "additionalProperties": false }, "UsageTimelineTotalsResponse": { "properties": { "totalTokens": { "type": "string", "nullable": true }, "estimatedCostUsd": { "type": "string", "nullable": true }, "tokenComplete": { "type": "boolean" }, "costComplete": { "type": "boolean" }, "completeness": { "$ref": "#/components/schemas/UsageTimelineCompletenessResponse" }, "warnings": { "items": { "type": "string" }, "type": "array" } }, "required": [ "totalTokens", "estimatedCostUsd", "tokenComplete", "costComplete", "completeness", "warnings" ], "type": "object", "additionalProperties": false }, "UsageTimelineBucketResponse": { "properties": { "totalTokens": { "type": "string", "nullable": true }, "estimatedCostUsd": { "type": "string", "nullable": true }, "tokenComplete": { "type": "boolean" }, "costComplete": { "type": "boolean" }, "completeness": { "$ref": "#/components/schemas/UsageTimelineCompletenessResponse" }, "warnings": { "items": { "type": "string" }, "type": "array" }, "startAt": { "type": "string" }, "endAt": { "type": "string" } }, "required": [ "totalTokens", "estimatedCostUsd", "tokenComplete", "costComplete", "completeness", "warnings", "startAt", "endAt" ], "type": "object", "additionalProperties": false }, "UsageTimelineCoverageResponse": { "type": "string", "enum": [ "current", "stale", "missing" ] }, "CostGenerationIdentityResponse": { "properties": { "generationId": { "type": "string" }, "sourceFactRevision": { "type": "string" }, "pricingCatalogVersion": { "type": "string" }, "pricingContentHash": { "type": "string" }, "calculatorVersion": { "type": "string" }, "completedAt": { "type": "string" } }, "required": [ "generationId", "sourceFactRevision", "pricingCatalogVersion", "pricingContentHash", "calculatorVersion", "completedAt" ], "type": "object", "additionalProperties": false }, "UsageTimelineResponse": { "properties": { "range": { "$ref": "#/components/schemas/UsageTimelineRangeResponse" }, "bucketUnit": { "$ref": "#/components/schemas/UsageTimelineBucketUnitResponse" }, "startAt": { "type": "string" }, "endAt": { "type": "string" }, "totals": { "$ref": "#/components/schemas/UsageTimelineTotalsResponse" }, "buckets": { "items": { "$ref": "#/components/schemas/UsageTimelineBucketResponse" }, "type": "array" }, "unknownTimeObservationCount": { "type": "string" }, "costCoverage": { "$ref": "#/components/schemas/UsageTimelineCoverageResponse" }, "latestCompletedCostGeneration": { "allOf": [ { "$ref": "#/components/schemas/CostGenerationIdentityResponse" } ], "nullable": true } }, "required": [ "range", "bucketUnit", "startAt", "endAt", "totals", "buckets", "unknownTimeObservationCount", "costCoverage", "latestCompletedCostGeneration" ], "type": "object", "additionalProperties": false }, "ErrorResponse": { "properties": { "error": { "properties": { "message": { "type": "string" }, "code": { "type": "string" } }, "required": [ "message", "code" ], "type": "object" } }, "required": [ "error" ], "type": "object", "additionalProperties": false }, "HealthResponse": { "properties": { "status": { "type": "string", "enum": [ "healthy" ], "nullable": false } }, "required": [ "status" ], "type": "object", "additionalProperties": false }, "TokenCompletenessResponse": { "properties": { "input": { "type": "boolean" }, "cachedInput": { "type": "boolean" }, "uncachedInput": { "type": "boolean" }, "output": { "type": "boolean" }, "total": { "type": "boolean" } }, "required": [ "input", "cachedInput", "uncachedInput", "output", "total" ], "type": "object", "additionalProperties": false }, "AttributionStatus": { "type": "string", "enum": [ "unlinked", "unconfigured", "pending", "linked", "not_found", "error" ] }, "SessionPhase": { "type": "string", "enum": [ "research", "explore", "proposal", "apply", "verify", "quick-flow", "other" ] }, "LinearIssueResponse": { "properties": { "id": { "type": "string" }, "identifier": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" }, "team": { "properties": { "name": { "type": "string" }, "key": { "type": "string" }, "id": { "type": "string" } }, "required": [ "name", "key", "id" ], "type": "object" }, "state": { "properties": { "name": { "type": "string" }, "id": { "type": "string" } }, "required": [ "name", "id" ], "type": "object" }, "updatedAt": { "type": "string" }, "synchronizedAt": { "type": "string" } }, "required": [ "id", "identifier", "title", "url", "team", "state", "updatedAt", "synchronizedAt" ], "type": "object", "additionalProperties": false }, "LinearFailureCategory": { "type": "string", "enum": [ "authentication", "rate_limit", "network", "timeout", "upstream", "identifier_mismatch", "unknown" ] }, "SessionAttributionResponse": { "properties": { "status": { "$ref": "#/components/schemas/AttributionStatus" }, "candidateIdentifier": { "type": "string" }, "phase": { "$ref": "#/components/schemas/SessionPhase" }, "issue": { "$ref": "#/components/schemas/LinearIssueResponse" }, "relinkRequired": { "type": "boolean" }, "lastAttemptAt": { "type": "string" }, "lastSuccessAt": { "type": "string" }, "synchronizationState": { "type": "string", "enum": [ "unlinked", "unconfigured", "pending", "synchronized", "not_found", "error" ] }, "failureCategory": { "$ref": "#/components/schemas/LinearFailureCategory" } }, "required": [ "status", "relinkRequired", "synchronizationState" ], "type": "object", "additionalProperties": false }, "SessionResponse": { "properties": { "sessionId": { "type": "string" }, "currentTitle": { "type": "string" }, "startedAt": { "type": "string" }, "endedAt": { "type": "string" }, "developerTurns": { "type": "string" }, "inputTokens": { "type": "string", "nullable": true }, "cachedInputTokens": { "type": "string", "nullable": true }, "uncachedInputTokens": { "type": "string", "nullable": true }, "outputTokens": { "type": "string", "nullable": true }, "totalTokens": { "type": "string", "nullable": true }, "estimatedCostUsd": { "type": "string", "nullable": true }, "costComplete": { "type": "boolean" }, "pricingGapCodes": { "items": { "type": "string" }, "type": "array" }, "usageObserved": { "type": "boolean" }, "tokenCompleteness": { "$ref": "#/components/schemas/TokenCompletenessResponse" }, "usageAnomalies": { "items": { "type": "string" }, "type": "array" }, "importState": { "type": "string" }, "attribution": { "$ref": "#/components/schemas/SessionAttributionResponse" } }, "required": [ "sessionId", "developerTurns", "inputTokens", "cachedInputTokens", "uncachedInputTokens", "outputTokens", "totalTokens", "estimatedCostUsd", "costComplete", "pricingGapCodes", "usageObserved", "tokenCompleteness", "usageAnomalies", "importState", "attribution" ], "type": "object", "additionalProperties": false }, "SessionPageResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/SessionResponse" }, "type": "array" }, "total": { "type": "number", "format": "double" }, "limit": { "type": "number", "format": "double" }, "offset": { "type": "number", "format": "double" } }, "required": [ "items", "total", "limit", "offset" ], "type": "object", "additionalProperties": false }, "SessionRelinkResponse": { "properties": { "attribution": { "$ref": "#/components/schemas/SessionAttributionResponse" } }, "required": [ "attribution" ], "type": "object", "additionalProperties": false }, "SessionRelinkErrorResponse": { "properties": { "error": { "properties": { "failureCategory": { "$ref": "#/components/schemas/LinearFailureCategory" }, "message": { "type": "string" }, "code": { "type": "string" } }, "required": [ "message", "code" ], "type": "object" } }, "required": [ "error" ], "type": "object", "additionalProperties": false }, "SessionRelinkRequest": { "properties": { "issueIdentifier": { "type": "string", "description": "Exact Linear issue identifier to link or relink.", "pattern": "^[A-Za-z][A-Za-z0-9]*-[1-9][0-9]*$" } }, "required": [ "issueIdentifier" ], "type": "object", "additionalProperties": false }, "SessionPhaseResponse": { "properties": { "attribution": { "$ref": "#/components/schemas/SessionAttributionResponse" } }, "required": [ "attribution" ], "type": "object", "additionalProperties": false }, "SessionPhaseRequest": { "properties": { "phase": { "allOf": [ { "$ref": "#/components/schemas/SessionPhase" } ], "nullable": true, "description": "Canonical phase to assign, or null to clear the explicit assignment." } }, "required": [ "phase" ], "type": "object", "additionalProperties": false }, "Record_AttributionStatus.number_": { "properties": { "unlinked": { "type": "number", "format": "double" }, "unconfigured": { "type": "number", "format": "double" }, "pending": { "type": "number", "format": "double" }, "linked": { "type": "number", "format": "double" }, "not_found": { "type": "number", "format": "double" }, "error": { "type": "number", "format": "double" } }, "required": [ "unlinked", "unconfigured", "pending", "linked", "not_found", "error" ], "type": "object", "description": "Construct a type with a set of properties K of type T" }, "LinearSyncRunResponse": { "properties": { "runId": { "type": "string" }, "trigger": { "type": "string" }, "state": { "type": "string" }, "candidateCount": { "type": "number", "format": "double" }, "linkedCount": { "type": "number", "format": "double" }, "notFoundCount": { "type": "number", "format": "double" }, "errorCount": { "type": "number", "format": "double" }, "failureCategory": { "$ref": "#/components/schemas/LinearFailureCategory" }, "startedAt": { "type": "string" }, "completedAt": { "type": "string" } }, "required": [ "runId", "trigger", "state", "candidateCount", "linkedCount", "notFoundCount", "errorCount" ], "type": "object", "additionalProperties": false }, "LinearStatusResponse": { "properties": { "configured": { "type": "boolean" }, "state": { "type": "string" }, "acceptingWork": { "type": "boolean" }, "counts": { "$ref": "#/components/schemas/Record_AttributionStatus.number_" }, "currentRun": { "$ref": "#/components/schemas/LinearSyncRunResponse" }, "lastCompletedRun": { "$ref": "#/components/schemas/LinearSyncRunResponse" } }, "required": [ "configured", "state", "acceptingWork", "counts" ], "type": "object", "additionalProperties": false }, "LinearSyncResponse": { "properties": { "runId": { "type": "string" }, "state": { "type": "string", "enum": [ "queued", "running" ] }, "coalesced": { "type": "boolean" } }, "required": [ "runId", "state", "coalesced" ], "type": "object", "additionalProperties": false }, "IssueUsageIdentityResponse": { "properties": { "id": { "type": "string" }, "identifier": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" } }, "required": [ "id", "identifier", "title", "url" ], "type": "object", "additionalProperties": false }, "UsageMetricsResponse": { "description": "Shared accounting metrics. Integer and fixed-decimal values are strings for JSON safety.", "properties": { "sessionCount": { "type": "string", "description": "Distinct sessions in this grouping. Daily values are non-additive across buckets." }, "developerTurns": { "type": "string" }, "inputTokens": { "type": "string", "nullable": true }, "cachedInputTokens": { "type": "string", "nullable": true }, "outputTokens": { "type": "string", "nullable": true }, "totalTokens": { "type": "string", "nullable": true }, "estimatedCostUsd": { "type": "string", "nullable": true }, "tokenComplete": { "type": "boolean" }, "costComplete": { "type": "boolean" }, "anomalyCodes": { "items": { "type": "string" }, "type": "array" }, "pricingGapCodes": { "items": { "type": "string" }, "type": "array" } }, "required": [ "sessionCount", "developerTurns", "inputTokens", "cachedInputTokens", "outputTokens", "totalTokens", "estimatedCostUsd", "tokenComplete", "costComplete", "anomalyCodes", "pricingGapCodes" ], "type": "object", "additionalProperties": false }, "IssueUsageSummaryResponse": { "properties": { "issue": { "$ref": "#/components/schemas/IssueUsageIdentityResponse" }, "metrics": { "$ref": "#/components/schemas/UsageMetricsResponse" } }, "required": [ "issue", "metrics" ], "type": "object", "additionalProperties": false }, "IssueUsageListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/IssueUsageSummaryResponse" }, "type": "array" }, "total": { "type": "string" }, "limit": { "type": "number", "format": "double" }, "offset": { "type": "number", "format": "double" } }, "required": [ "items", "total", "limit", "offset" ], "type": "object", "additionalProperties": false }, "IssueUsageModelResponse": { "properties": { "model": { "type": "string", "description": "Canonical model identity from the latest completed cost generation, or `unknown`." }, "observedModels": { "items": { "type": "string" }, "type": "array" }, "metrics": { "$ref": "#/components/schemas/UsageMetricsResponse" } }, "required": [ "model", "observedModels", "metrics" ], "type": "object", "additionalProperties": false }, "IssueUsageSessionResponse": { "properties": { "sessionId": { "type": "string" }, "title": { "type": "string", "nullable": true }, "phase": { "allOf": [ { "$ref": "#/components/schemas/SessionPhase" } ], "nullable": true }, "importState": { "type": "string" }, "lastError": { "type": "string", "nullable": true }, "startedAt": { "type": "string", "nullable": true }, "endedAt": { "type": "string", "nullable": true }, "metrics": { "$ref": "#/components/schemas/UsageMetricsResponse" }, "models": { "items": { "$ref": "#/components/schemas/IssueUsageModelResponse" }, "type": "array" } }, "required": [ "sessionId", "title", "phase", "importState", "lastError", "startedAt", "endedAt", "metrics", "models" ], "type": "object", "additionalProperties": false }, "IssueUsageDailyResponse": { "properties": { "date": { "type": "string", "nullable": true, "description": "UTC calendar date, or null for facts without a valid source timestamp." }, "metrics": { "$ref": "#/components/schemas/UsageMetricsResponse", "description": "Metrics are additive except sessionCount, which is distinct and non-additive across days." } }, "required": [ "date", "metrics" ], "type": "object", "additionalProperties": false }, "IssueUsageDetailResponse": { "properties": { "issue": { "$ref": "#/components/schemas/IssueUsageIdentityResponse" }, "metrics": { "$ref": "#/components/schemas/UsageMetricsResponse" }, "latestCompletedCostGeneration": { "allOf": [ { "$ref": "#/components/schemas/CostGenerationIdentityResponse" } ], "nullable": true }, "sessions": { "items": { "$ref": "#/components/schemas/IssueUsageSessionResponse" }, "type": "array" }, "models": { "items": { "$ref": "#/components/schemas/IssueUsageModelResponse" }, "type": "array" }, "daily": { "items": { "$ref": "#/components/schemas/IssueUsageDailyResponse" }, "type": "array", "description": "Known UTC dates sort ascending; the explicit unknown-time bucket sorts last." } }, "required": [ "issue", "metrics", "latestCompletedCostGeneration", "sessions", "models", "daily" ], "type": "object", "additionalProperties": false }, "RootStatusResponse": { "properties": { "root": { "type": "string" }, "available": { "type": "boolean" }, "reason": { "type": "string" }, "discoveredFiles": { "type": "number", "format": "double" } }, "required": [ "root", "available", "discoveredFiles" ], "type": "object", "additionalProperties": false }, "ImportRunResponse": { "properties": { "runId": { "type": "string" }, "trigger": { "type": "string" }, "state": { "type": "string" }, "startedAt": { "type": "string" }, "completedAt": { "type": "string" }, "rootsDiscovered": { "type": "number", "format": "double" }, "filesDiscovered": { "type": "number", "format": "double" }, "filesImported": { "type": "number", "format": "double" }, "sessionsImported": { "type": "number", "format": "double" }, "warnings": { "type": "number", "format": "double" }, "errors": { "type": "number", "format": "double" }, "summary": { "type": "string" } }, "required": [ "runId", "trigger", "state", "rootsDiscovered", "filesDiscovered", "filesImported", "sessionsImported", "warnings", "errors" ], "type": "object", "additionalProperties": false }, "CheckpointStatusResponse": { "properties": { "source": { "type": "string" }, "status": { "type": "string" }, "completeOffset": { "type": "string" }, "unknownRecords": { "type": "number", "format": "double" }, "malformedRecords": { "type": "number", "format": "double" }, "lastError": { "type": "string" } }, "required": [ "source", "status", "completeOffset", "unknownRecords", "malformedRecords" ], "type": "object", "additionalProperties": false }, "ImportStatusResponse": { "properties": { "roots": { "items": { "$ref": "#/components/schemas/RootStatusResponse" }, "type": "array" }, "currentRun": { "$ref": "#/components/schemas/ImportRunResponse" }, "lastCompletedRun": { "$ref": "#/components/schemas/ImportRunResponse" }, "checkpoints": { "items": { "$ref": "#/components/schemas/CheckpointStatusResponse" }, "type": "array" }, "acceptingWork": { "type": "boolean" } }, "required": [ "roots", "checkpoints", "acceptingWork" ], "type": "object", "additionalProperties": false }, "RescanResponse": { "properties": { "runId": { "type": "string" }, "state": { "type": "string", "enum": [ "queued", "running" ] }, "coalesced": { "type": "boolean" } }, "required": [ "runId", "state", "coalesced" ], "type": "object", "additionalProperties": false }, "CostGenerationResponse": { "properties": { "generationId": { "type": "string" }, "sourceFactRevision": { "type": "string" }, "state": { "type": "string", "enum": [ "running", "completed", "failed" ] }, "pricingSchemaVersion": { "type": "number", "format": "double" }, "pricingCatalogVersion": { "type": "string" }, "pricingContentHash": { "type": "string" }, "calculatorVersion": { "type": "string" }, "tokenUnit": { "type": "string" }, "startedAt": { "type": "string" }, "completedAt": { "type": "string" }, "failureCategory": { "type": "string", "enum": [ "calculation_failed" ], "nullable": false } }, "required": [ "generationId", "sourceFactRevision", "state", "pricingSchemaVersion", "pricingCatalogVersion", "pricingContentHash", "calculatorVersion", "tokenUnit", "startedAt" ], "type": "object", "additionalProperties": false }, "CostWorkResponse": { "properties": { "generationId": { "type": "string" }, "state": { "type": "string", "enum": [ "running", "queued" ] } }, "required": [ "generationId", "state" ], "type": "object", "additionalProperties": false }, "CostConfigurationResponse": { "properties": { "schemaVersion": { "type": "number", "format": "double" }, "catalogVersion": { "type": "string" }, "contentHash": { "type": "string" }, "currency": { "type": "string", "enum": [ "USD" ], "nullable": false }, "tokenUnit": { "type": "string" } }, "required": [ "schemaVersion", "catalogVersion", "contentHash", "currency", "tokenUnit" ], "type": "object", "additionalProperties": false }, "CostCalculationStatusResponse": { "properties": { "estimateKind": { "type": "string", "enum": [ "configured_api_equivalent_usd" ], "nullable": false }, "latestCompleted": { "$ref": "#/components/schemas/CostGenerationResponse" }, "active": { "$ref": "#/components/schemas/CostWorkResponse" }, "queued": { "$ref": "#/components/schemas/CostWorkResponse" }, "latestFailure": { "$ref": "#/components/schemas/CostGenerationResponse" }, "currentFactRevision": { "type": "string" }, "coverage": { "type": "string", "enum": [ "current", "stale", "missing" ] }, "config": { "$ref": "#/components/schemas/CostConfigurationResponse" }, "calculatorVersion": { "type": "string" }, "acceptingWork": { "type": "boolean" } }, "required": [ "estimateKind", "currentFactRevision", "coverage", "config", "calculatorVersion", "acceptingWork" ], "type": "object", "additionalProperties": false }, "RecalculateCostResponse": { "properties": { "generationId": { "type": "string" }, "state": { "type": "string", "enum": [ "running", "queued" ] }, "coalesced": { "type": "boolean" } }, "required": [ "generationId", "state", "coalesced" ], "type": "object", "additionalProperties": false } }, "securitySchemes": {} }, "info": { "title": "@ai-task-observer/backend", "version": "0.1.0", "contact": {} }, "paths": { "/api/usage/timeline": { "get": { "operationId": "Timeline", "responses": { "200": { "description": "Usage timeline", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsageTimelineResponse" } } } }, "422": { "description": "Unsupported usage range", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "description": "Returns global committed usage in a supported rolling range.", "tags": [ "Usage timeline" ], "security": [], "parameters": [ { "in": "query", "name": "range", "required": false, "schema": { "type": "string" } } ] } }, "/api/health": { "get": { "operationId": "GetHealth", "responses": { "200": { "description": "Healthy", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthResponse" } } } } }, "tags": [ "System" ], "security": [], "parameters": [] } }, "/api/sessions": { "get": { "operationId": "List", "responses": { "200": { "description": "Session page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionPageResponse" } } } } }, "tags": [ "Sessions" ], "security": [], "parameters": [ { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "format": "double", "type": "number" } }, { "in": "query", "name": "offset", "required": false, "schema": { "default": 0, "format": "double", "type": "number" } } ] } }, "/api/sessions/{sessionId}": { "get": { "operationId": "Detail", "responses": { "200": { "description": "Session detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionResponse" } } } }, "404": { "description": "Session not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": [ "Sessions" ], "security": [], "parameters": [ { "in": "path", "name": "sessionId", "required": true, "schema": { "type": "string" } } ] } }, "/api/sessions/{sessionId}/relink": { "post": { "operationId": "Relink", "responses": { "200": { "description": "Session attribution relinked", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionRelinkResponse" } } } }, "404": { "description": "Session or Linear issue not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionRelinkErrorResponse" } } } }, "409": { "description": "Linear integration is not configured", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionRelinkErrorResponse" } } } }, "422": { "description": "Invalid Linear issue identifier", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionRelinkErrorResponse" } } } }, "502": { "description": "Linear rejected or mismatched the exact lookup", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionRelinkErrorResponse" } } } }, "503": { "description": "Linear exact lookup temporarily unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionRelinkErrorResponse" } } } } }, "tags": [ "Sessions" ], "security": [], "parameters": [ { "in": "path", "name": "sessionId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionRelinkRequest" } } } } } }, "/api/sessions/{sessionId}/phase": { "put": { "operationId": "SetPhase", "responses": { "200": { "description": "Session phase updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionPhaseResponse" } } } }, "404": { "description": "Session not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Invalid session phase", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": [ "Sessions" ], "security": [], "parameters": [ { "in": "path", "name": "sessionId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionPhaseRequest" } } } } } }, "/api/linear/status": { "get": { "operationId": "Status", "responses": { "200": { "description": "Linear integration status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LinearStatusResponse" } } } } }, "tags": [ "Linear" ], "security": [], "parameters": [] } }, "/api/linear/sync": { "post": { "operationId": "Sync", "responses": { "202": { "description": "Synchronization accepted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LinearSyncResponse" } } } }, "409": { "description": "Linear is not configured", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": [ "Linear" ], "security": [], "parameters": [] } }, "/api/issues/usage": { "get": { "operationId": "ListIssueUsage", "responses": { "200": { "description": "Issue usage page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IssueUsageListResponse" } } } }, "422": { "description": "Invalid pagination", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "description": "Lists usage-bearing issues in identifier-then-stable-ID order.", "tags": [ "Issue usage" ], "security": [], "parameters": [ { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "format": "double", "type": "number" } }, { "in": "query", "name": "offset", "required": false, "schema": { "default": 0, "format": "double", "type": "number" } } ] } }, "/api/issues/{issueId}/usage": { "get": { "operationId": "GetIssueUsage", "responses": { "200": { "description": "Issue usage detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IssueUsageDetailResponse" } } } }, "404": { "description": "Issue has no currently linked sessions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "description": "Retrieves current committed-link accounting for one stable Linear issue ID.", "tags": [ "Issue usage" ], "security": [], "parameters": [ { "in": "path", "name": "issueId", "required": true, "schema": { "type": "string" } } ] } }, "/api/imports/status": { "get": { "operationId": "ImportStatus", "responses": { "200": { "description": "Status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportStatusResponse" } } } } }, "tags": [ "Imports" ], "security": [], "parameters": [] } }, "/api/imports/rescan": { "post": { "operationId": "Rescan", "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RescanResponse" } } } } }, "tags": [ "Imports" ], "security": [], "parameters": [] } }, "/api/costs/status": { "get": { "operationId": "CostCalculationStatus", "responses": { "200": { "description": "Status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CostCalculationStatusResponse" } } } } }, "tags": [ "Costs" ], "security": [], "parameters": [] } }, "/api/costs/recalculate": { "post": { "operationId": "RecalculateCosts", "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecalculateCostResponse" } } } } }, "tags": [ "Costs" ], "security": [], "parameters": [] } } }, "servers": [ { "url": "/" } ] }