{ "info": { "title": "Sixb API", "description": "Ontology-first digital twins runtime API", "version": "0.1.0" }, "components": { "securitySchemes": { "sixbCsrf": { "type": "apiKey", "in": "header", "name": "x-sixb-csrf", "description": "Required for cookie-authenticated mutating requests. Use the csrfToken returned by the corresponding session endpoint." }, "sixbSession": { "type": "http", "scheme": "bearer", "bearerFormat": "Sixb session access token", "description": "A signed-in native client's session access token, from device login and renewed through /api/auth/refresh. Accepted wherever a browser session is; browsers authenticate with the session cookie instead." }, "sixbAccessToken": { "type": "http", "scheme": "bearer", "bearerFormat": "Sixb access token", "description": "A personal access token or service-account token, for scripts and services. Accepted only on routes that document this scheme. A native client's session token uses sixbSession instead." }, "sixbSharedGrant": { "type": "apiKey", "in": "header", "name": "x-sixb-share-grant", "description": "Selects the shared grant whose grant-specific HttpOnly session cookie must authenticate the request." } }, "schemas": { "ErrorResponse": { "type": "object", "required": ["error"], "additionalProperties": false, "properties": { "error": { "type": "string" } } }, "ObjectQueryObject": { "type": "object", "required": ["primaryId", "objectTypeId", "properties", "createdAt", "updatedAt"], "additionalProperties": false, "properties": { "score": { "type": "number" }, "primaryId": { "type": "string" }, "objectTypeId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": true }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/ObjectQueryLinkValue" } }, "linkProperties": { "type": "object", "additionalProperties": true } } }, "ObjectQueryLinkValue": { "oneOf": [ { "$ref": "#/components/schemas/ObjectQueryObject" }, { "type": "array", "items": { "$ref": "#/components/schemas/ObjectQueryObject" } } ], "nullable": true }, "ObjectQueryIssue": { "type": "object", "required": ["path", "code", "message"], "additionalProperties": false, "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } } }, "ObjectQueryPlanSummary": { "type": "object", "required": ["mode", "providerIssues", "fallbackIssues", "issues"], "additionalProperties": false, "properties": { "mode": { "type": "string", "enum": ["pushdown", "fallback", "pipeline", "rejected"] }, "providerIssues": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectQueryIssue" } }, "fallbackIssues": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectQueryIssue" } }, "issues": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectQueryIssue" } }, "fallback": { "type": "object", "required": ["maxRows", "requiresExplicitBound"], "additionalProperties": false, "properties": { "maxRows": { "type": "number" }, "requiresExplicitBound": { "type": "boolean" } } } } }, "ObjectQueryResponse": { "type": "object", "required": ["objects", "hasMore", "plan"], "additionalProperties": false, "properties": { "objects": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectQueryObject" } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" }, "nextPageToken": { "type": "string" }, "plan": { "$ref": "#/components/schemas/ObjectQueryPlanSummary" } } }, "ObjectQueryCountResponse": { "type": "object", "required": ["count", "plan"], "additionalProperties": false, "properties": { "count": { "type": "number" }, "plan": { "$ref": "#/components/schemas/ObjectQueryPlanSummary" } } }, "ObjectQueryExistsResponse": { "type": "object", "required": ["exists", "plan"], "additionalProperties": false, "properties": { "exists": { "type": "boolean" }, "plan": { "$ref": "#/components/schemas/ObjectQueryPlanSummary" } } }, "ObjectQueryFacetBucket": { "type": "object", "required": ["value", "count"], "additionalProperties": false, "properties": { "value": {}, "count": { "type": "number" } } }, "ObjectQueryFacetResult": { "type": "object", "required": ["propertyId", "buckets"], "additionalProperties": false, "properties": { "propertyId": { "type": "string" }, "buckets": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectQueryFacetBucket" } } } }, "ObjectQueryFacetsResponse": { "type": "object", "required": ["total", "facets", "plan"], "additionalProperties": false, "properties": { "total": { "type": "number" }, "facets": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectQueryFacetResult" } }, "plan": { "$ref": "#/components/schemas/ObjectQueryPlanSummary" } } }, "ObjectQueryLink": { "type": "object", "required": ["source", "linkId", "target", "createdAt", "updatedAt"], "additionalProperties": false, "properties": { "source": { "$ref": "#/components/schemas/ObjectRef" }, "linkId": { "type": "string" }, "target": { "$ref": "#/components/schemas/ObjectRef" }, "properties": { "type": "object", "additionalProperties": true }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } } }, "ObjectQueryLinksResponse": { "type": "object", "required": ["objects", "links", "hasMore"], "additionalProperties": false, "properties": { "objects": { "type": "array", "description": "Selected objects followed by visible endpoint objects from this link page, de-duplicated. Empty unless includeObjects is true.", "items": { "$ref": "#/components/schemas/ObjectQueryObject" } }, "links": { "type": "array", "description": "Visible physical links in deterministic identity order.", "items": { "$ref": "#/components/schemas/ObjectQueryLink" } }, "hasMore": { "type": "boolean" }, "nextPageToken": { "type": "string" } } }, "AiUsageLimitErrorResponse": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["ai.usage_limit_exceeded", "ai.usage_limit_unavailable"], "description": "Stable machine-readable failure code for programmatic handling." }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["error", "code"], "additionalProperties": false }, "ObjectQueryErrorResponse": { "type": "object", "required": ["error"], "additionalProperties": false, "properties": { "error": { "type": "string" }, "issues": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectQueryIssue" } } } }, "ObjectQueryRequest": { "type": "object", "required": ["query"], "additionalProperties": false, "properties": { "query": { "$ref": "#/components/schemas/ObjectQuery" }, "includeTotal": { "type": "boolean" } } }, "ObjectQueryCountRequest": { "type": "object", "required": ["query"], "additionalProperties": false, "properties": { "query": { "$ref": "#/components/schemas/ObjectQuery" } } }, "ObjectQueryExistsRequest": { "type": "object", "required": ["query"], "additionalProperties": false, "properties": { "query": { "$ref": "#/components/schemas/ObjectQuery" } } }, "ObjectQueryFacetRequest": { "type": "object", "required": ["propertyId", "limit"], "additionalProperties": false, "properties": { "propertyId": { "type": "string", "minLength": 1 }, "limit": { "type": "integer", "minimum": 1 } } }, "ObjectQueryFacetsRequest": { "type": "object", "required": ["query", "facets"], "additionalProperties": false, "properties": { "query": { "$ref": "#/components/schemas/ObjectQuery" }, "facets": { "type": "array", "minItems": 1, "items": { "$ref": "#/components/schemas/ObjectQueryFacetRequest" } } } }, "ObjectQueryLinksRequest": { "type": "object", "required": ["query"], "additionalProperties": false, "properties": { "query": { "$ref": "#/components/schemas/ObjectQuery" }, "direction": { "type": "string", "enum": ["outgoing", "incoming", "both"], "default": "both" }, "linkId": { "type": "string", "minLength": 1 }, "includeObjects": { "type": "boolean", "default": false, "description": "Include selected objects and visible endpoints from the current link page." }, "pageSize": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 100 }, "pageToken": { "type": "string", "minLength": 1, "description": "Opaque token from the previous page. The project, normalized query, direction, and linkId must remain unchanged." } } }, "ObjectRef": { "type": "object", "required": ["objectTypeId", "primaryId"], "additionalProperties": false, "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } } }, "ObjectQuery": { "oneOf": [ { "type": "object", "required": ["kind", "objectTypeId"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["start"] }, "objectTypeId": { "type": "string", "minLength": 1 }, "includeSubtypes": { "type": "boolean" } } }, { "type": "object", "required": ["kind", "refs"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["refs"] }, "refs": { "type": "array", "minItems": 1, "description": "One to 1,000 unique identities after normalization; duplicate entries are accepted and removed.", "items": { "$ref": "#/components/schemas/ObjectRef" } } } }, { "type": "object", "required": ["kind", "input", "predicate"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["filter"] }, "input": { "$ref": "#/components/schemas/ObjectQuery" }, "predicate": { "$ref": "#/components/schemas/ObjectQueryPredicate" } } }, { "type": "object", "required": ["kind", "input", "query"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["text"] }, "input": { "$ref": "#/components/schemas/ObjectQuery" }, "query": { "type": "string" }, "fields": { "type": "array", "items": { "type": "string", "minLength": 1 } } } }, { "type": "object", "required": ["kind", "input", "vector", "profile", "k"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["vector"] }, "input": { "$ref": "#/components/schemas/ObjectQuery" }, "vector": { "type": "string", "minLength": 1, "maxLength": 8000 }, "profile": { "type": "string", "minLength": 1 }, "k": { "type": "integer", "minimum": 1 } } }, { "type": "object", "required": ["kind", "input", "model"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["rerank"] }, "input": { "$ref": "#/components/schemas/ObjectQuery" }, "model": { "type": "object", "required": ["provider", "modelId"], "additionalProperties": false, "properties": { "provider": { "type": "string", "minLength": 1 }, "modelId": { "type": "string", "minLength": 1 } } } } }, { "type": "object", "required": ["kind", "input", "linkId", "direction"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["traverse"] }, "input": { "$ref": "#/components/schemas/ObjectQuery" }, "linkId": { "type": "string", "minLength": 1 }, "direction": { "type": "string", "enum": ["outgoing", "incoming"] }, "sourceObjectTypeId": { "type": "string", "minLength": 1 } } }, { "type": "object", "required": ["kind", "op", "inputs"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["set"] }, "op": { "type": "string", "enum": ["union", "intersect", "subtract"] }, "inputs": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectQuery" } } } }, { "type": "object", "required": ["kind", "input", "fields"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["sort"] }, "input": { "$ref": "#/components/schemas/ObjectQuery" }, "fields": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectQuerySortField" } } } }, { "type": "object", "required": ["kind", "input", "limit"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["limit"] }, "input": { "$ref": "#/components/schemas/ObjectQuery" }, "limit": { "type": "integer", "minimum": 0 } } }, { "type": "object", "required": ["kind", "input", "pageSize"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["page"] }, "input": { "$ref": "#/components/schemas/ObjectQuery" }, "pageSize": { "type": "integer", "minimum": 1 }, "pageToken": { "type": "string" } } }, { "type": "object", "required": ["kind", "input"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["project"] }, "input": { "$ref": "#/components/schemas/ObjectQuery" }, "properties": { "type": "array", "items": { "type": "string", "minLength": 1 } } } }, { "type": "object", "required": ["kind", "input", "expansions"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["expand"] }, "input": { "$ref": "#/components/schemas/ObjectQuery" }, "expansions": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectExpansion" } } } } ], "discriminator": { "propertyName": "kind" } }, "ObjectExpansion": { "type": "object", "required": ["linkId", "direction"], "additionalProperties": false, "properties": { "linkId": { "type": "string", "minLength": 1 }, "direction": { "type": "string", "enum": ["outgoing", "incoming"] }, "sourceObjectTypeId": { "type": "string", "minLength": 1 }, "limit": { "type": "integer", "minimum": 0 }, "orderBy": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectQuerySortField" } }, "expand": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectExpansion" } } } }, "ObjectQueryPredicate": { "oneOf": [ { "type": "object", "required": ["op", "items"], "additionalProperties": false, "properties": { "op": { "type": "string", "enum": ["and", "or"] }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectQueryPredicate" } } } }, { "type": "object", "required": ["op", "item"], "additionalProperties": false, "properties": { "op": { "type": "string", "enum": ["not"] }, "item": { "$ref": "#/components/schemas/ObjectQueryPredicate" } } }, { "type": "object", "required": ["op", "propertyId", "value"], "additionalProperties": false, "properties": { "op": { "type": "string", "enum": ["eq", "neq", "lt", "lte", "gt", "gte"] }, "propertyId": { "type": "string", "minLength": 1 }, "value": {} } }, { "type": "object", "required": ["op", "propertyId", "values"], "additionalProperties": false, "properties": { "op": { "type": "string", "enum": ["in"] }, "propertyId": { "type": "string", "minLength": 1 }, "values": { "type": "array", "items": {} } } }, { "type": "object", "required": ["op", "propertyId", "value"], "additionalProperties": false, "properties": { "op": { "type": "string", "enum": ["exists"] }, "propertyId": { "type": "string", "minLength": 1 }, "value": { "type": "boolean" } } }, { "type": "object", "required": ["op", "propertyId", "value"], "additionalProperties": false, "properties": { "op": { "type": "string", "enum": ["contains"] }, "propertyId": { "type": "string", "minLength": 1 }, "value": {} } } ], "discriminator": { "propertyName": "op" } }, "ObjectQuerySortField": { "oneOf": [ { "type": "object", "required": ["kind", "propertyId"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["property"] }, "propertyId": { "type": "string", "minLength": 1 }, "direction": { "type": "string", "enum": ["asc", "desc"] } } }, { "type": "object", "required": ["kind"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["relevance"] }, "direction": { "type": "string", "enum": ["asc", "desc"] } } } ], "discriminator": { "propertyName": "kind" } } } }, "security": [ { "sixbSession": [] } ], "tags": [ { "name": "Project", "description": "Current project metadata" }, { "name": "Status", "description": "Runtime status" }, { "name": "AI Accounting", "description": "Project AI token usage, cost analytics, and model-call accounting" }, { "name": "Ontology", "description": "Object type definitions" }, { "name": "Connectors", "description": "Connector metadata" }, { "name": "Connector Connections", "description": "Connected external accounts" }, { "name": "Connector Connection Runs", "description": "Interactive OAuth connection runs" }, { "name": "Webhooks", "description": "Webhook run history" }, { "name": "Datasets", "description": "Dataset definitions" }, { "name": "Dataset Versions", "description": "Dataset version history" }, { "name": "Dataset Rows", "description": "Dataset row previews" }, { "name": "Syncs", "description": "Sync metadata" }, { "name": "Sync Runs", "description": "Sync run history and requests" }, { "name": "Pipelines", "description": "Pipeline metadata" }, { "name": "Pipeline Runs", "description": "Pipeline run history and requests" }, { "name": "Workflows", "description": "Workflow metadata" }, { "name": "Workflow Runs", "description": "Workflow run history and requests" }, { "name": "Workflow Interventions", "description": "Workflow intervention tasks" }, { "name": "Rules", "description": "Rule definitions" }, { "name": "Rule States", "description": "Active rule states" }, { "name": "Projections", "description": "Projection definitions" }, { "name": "Projection Runs", "description": "Projection run history" }, { "name": "Objects", "description": "Twin objects and state" }, { "name": "Object Files", "description": "Object-backed file content" }, { "name": "Actions", "description": "Action metadata and requests" }, { "name": "Action Runs", "description": "Action run history" }, { "name": "Agents", "description": "Agent catalog" }, { "name": "Models", "description": "Project model catalog" }, { "name": "Agent Threads", "description": "Agent conversation threads and messages" }, { "name": "Agent Runs", "description": "Agent run state and cancellation" }, { "name": "Files", "description": "File uploads and file references" }, { "name": "Links", "description": "Object relationship links" }, { "name": "Telemetry", "description": "Telemetry history and appends" }, { "name": "Events", "description": "Domain event stream" }, { "name": "Logs", "description": "Run log stream" }, { "name": "Auth Sessions", "description": "Authentication sessions and sign-out" }, { "name": "Auth Members", "description": "User membership administration" }, { "name": "Auth Invitations", "description": "User invitations" }, { "name": "Auth Access Tokens", "description": "Personal access-token management" }, { "name": "Auth Service Accounts", "description": "Service accounts and service-account access tokens" }, { "name": "Shared Access", "description": "Scoped shared-access grant lifecycle" } ], "openapi": "3.0.3", "paths": { "/api/auth/device-authorizations": { "post": { "summary": "Start device authorization", "tags": ["Auth Sessions"], "operationId": "createDeviceAuthorization", "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "clientName": { "type": "string", "minLength": 1, "maxLength": 100 } }, "required": ["clientName"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "clientName": { "type": "string", "minLength": 1, "maxLength": 100 } }, "required": ["clientName"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "clientName": { "type": "string", "minLength": 1, "maxLength": 100 } }, "required": ["clientName"], "additionalProperties": false } } } }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "type": "object", "properties": { "deviceCode": { "type": "string" }, "userCode": { "type": "string" }, "verificationUri": { "type": "string" }, "verificationUriComplete": { "type": "string" }, "expiresAt": { "type": "string" }, "interval": { "type": "number" } }, "required": [ "deviceCode", "userCode", "verificationUri", "verificationUriComplete", "expiresAt", "interval" ], "additionalProperties": false } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/device-authorizations/token": { "post": { "summary": "Exchange an approved device authorization", "tags": ["Auth Sessions"], "operationId": "exchangeDeviceAuthorization", "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "deviceCode": { "type": "string", "minLength": 1 } }, "required": ["deviceCode"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "deviceCode": { "type": "string", "minLength": 1 } }, "required": ["deviceCode"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "deviceCode": { "type": "string", "minLength": 1 } }, "required": ["deviceCode"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "enum": ["pending"] } }, "required": ["status"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["denied"] } }, "required": ["status"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["expired"] } }, "required": ["status"], "additionalProperties": false }, { "type": "object", "properties": { "accessToken": { "type": "string" }, "refreshToken": { "type": "string" }, "expiresIn": { "type": "number" }, "status": { "type": "string", "enum": ["approved"] } }, "required": ["accessToken", "refreshToken", "expiresIn", "status"], "additionalProperties": false } ] } } } } } } }, "/api/auth/refresh": { "post": { "summary": "Refresh a native client's session tokens", "tags": ["Auth Sessions"], "operationId": "refreshAuthSession", "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "refreshToken": { "type": "string", "minLength": 1 } }, "required": ["refreshToken"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "refreshToken": { "type": "string", "minLength": 1 } }, "required": ["refreshToken"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "refreshToken": { "type": "string", "minLength": 1 } }, "required": ["refreshToken"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "accessToken": { "type": "string" }, "refreshToken": { "type": "string" }, "expiresIn": { "type": "number" } }, "required": ["accessToken", "refreshToken", "expiresIn"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/session": { "get": { "summary": "Get current auth session", "tags": ["Auth Sessions"], "operationId": "getAuthSession", "security": [ { "sixbSession": [] }, {} ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "authenticated": { "type": "boolean", "enum": [false] }, "authEnabled": { "type": "boolean" } }, "required": ["authenticated", "authEnabled"], "additionalProperties": false }, { "type": "object", "properties": { "authenticated": { "type": "boolean", "enum": [true] }, "csrfToken": { "type": "string" }, "applicationAccess": { "type": "object", "properties": { "allowed": { "type": "boolean" }, "audience": { "type": "string", "enum": ["atlas", "app"] } }, "required": ["allowed", "audience"], "additionalProperties": false }, "user": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "avatarUrl": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string" } } }, "required": ["id", "email", "groupIds"], "additionalProperties": false }, "session": { "type": "object", "properties": { "id": { "type": "string" }, "expiresAt": { "type": "string" } }, "required": ["id", "expiresAt"], "additionalProperties": false } }, "required": ["authenticated", "applicationAccess", "user", "session"], "additionalProperties": false } ] } } } } } } }, "/api/auth/sign-out": { "post": { "summary": "Sign out current auth session", "tags": ["Auth Sessions"], "operationId": "signOut", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] }, {} ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } }, "required": ["success"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/sessions": { "get": { "summary": "List active sessions for the current user", "tags": ["Auth Sessions"], "operationId": "listAuthSessions", "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "sessions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "audience": { "type": "string", "enum": ["atlas", "app"] }, "current": { "type": "boolean" }, "createdAt": { "type": "string" }, "expiresAt": { "type": "string" }, "lastSeenAt": { "type": "string" }, "userAgent": { "type": "string" }, "ipAddress": { "type": "string" }, "clientName": { "type": "string" } }, "required": ["id", "current", "createdAt", "expiresAt"], "additionalProperties": false } } }, "required": ["sessions"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/sessions/{sessionId}/revoke": { "post": { "summary": "Revoke one of the current user's sessions", "tags": ["Auth Sessions"], "operationId": "revokeAuthSession", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } }, "required": ["success"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/sign-out-all": { "post": { "summary": "Sign out the current user everywhere (all devices and apps)", "tags": ["Auth Sessions"], "operationId": "signOutAll", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "revokedCount": { "type": "number" } }, "required": ["success", "revokedCount"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/access-management-options": { "get": { "summary": "Get auth access-token management options", "tags": ["Auth Access Tokens"], "operationId": "getAuthAccessManagementOptions", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "groups": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" } }, "required": ["id"], "additionalProperties": false } } }, "required": ["groups"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/access-tokens": { "get": { "summary": "List personal access tokens for the current user", "tags": ["Auth Access Tokens"], "operationId": "listAuthAccessTokens", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "accessTokens": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "kind": { "type": "string", "enum": ["personal", "serviceAccount"] }, "status": { "type": "string", "enum": ["active", "expired", "revoked"] }, "subject": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false }, "subjectLabel": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "string" }, "expiresAt": { "type": "string" }, "revokedAt": { "type": "string" }, "lastUsedAt": { "type": "string" }, "lastUsedUserAgent": { "type": "string" }, "lastUsedIpAddress": { "type": "string" } }, "required": [ "id", "name", "kind", "status", "subject", "createdAt", "expiresAt" ], "additionalProperties": false } } }, "required": ["accessTokens"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } }, "post": { "summary": "Create a personal access token", "tags": ["Auth Access Tokens"], "operationId": "createAuthPersonalAccessToken", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "expiresAt": { "type": "string", "minLength": 1 }, "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": ["name", "expiresAt"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "expiresAt": { "type": "string", "minLength": 1 }, "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": ["name", "expiresAt"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "expiresAt": { "type": "string", "minLength": 1 }, "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": ["name", "expiresAt"], "additionalProperties": false } } } }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "type": "object", "properties": { "accessToken": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "kind": { "type": "string", "enum": ["personal", "serviceAccount"] }, "status": { "type": "string", "enum": ["active", "expired", "revoked"] }, "subject": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false }, "subjectLabel": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "string" }, "expiresAt": { "type": "string" }, "revokedAt": { "type": "string" }, "lastUsedAt": { "type": "string" }, "lastUsedUserAgent": { "type": "string" }, "lastUsedIpAddress": { "type": "string" } }, "required": [ "id", "name", "kind", "status", "subject", "createdAt", "expiresAt" ], "additionalProperties": false }, "tokenValue": { "type": "string" } }, "required": ["accessToken", "tokenValue"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/access-tokens/{tokenId}/revoke": { "post": { "summary": "Revoke one of the current user's personal access tokens", "tags": ["Auth Access Tokens"], "operationId": "revokeAuthAccessToken", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "tokenId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "accessToken": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "kind": { "type": "string", "enum": ["personal", "serviceAccount"] }, "status": { "type": "string", "enum": ["active", "expired", "revoked"] }, "subject": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false }, "subjectLabel": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "string" }, "expiresAt": { "type": "string" }, "revokedAt": { "type": "string" }, "lastUsedAt": { "type": "string" }, "lastUsedUserAgent": { "type": "string" }, "lastUsedIpAddress": { "type": "string" } }, "required": [ "id", "name", "kind", "status", "subject", "createdAt", "expiresAt" ], "additionalProperties": false } }, "required": ["accessToken"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/service-accounts": { "get": { "summary": "List auth service accounts", "tags": ["Auth Service Accounts"], "operationId": "listAuthServiceAccounts", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "serviceAccounts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "status": { "type": "string", "enum": ["active", "suspended"] }, "groupIds": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": ["id", "name", "status", "groupIds", "createdAt", "updatedAt"], "additionalProperties": false } } }, "required": ["serviceAccounts"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } }, "post": { "summary": "Create an auth service account", "tags": ["Auth Service Accounts"], "operationId": "createAuthServiceAccount", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": ["name"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": ["name"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": ["name"], "additionalProperties": false } } } }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "type": "object", "properties": { "serviceAccount": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "status": { "type": "string", "enum": ["active", "suspended"] }, "groupIds": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": ["id", "name", "status", "groupIds", "createdAt", "updatedAt"], "additionalProperties": false } }, "required": ["serviceAccount"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/service-accounts/{serviceAccountId}/disable": { "post": { "summary": "Disable an auth service account", "tags": ["Auth Service Accounts"], "operationId": "disableAuthServiceAccount", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "serviceAccountId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "serviceAccount": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "status": { "type": "string", "enum": ["active", "suspended"] }, "groupIds": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": ["id", "name", "status", "groupIds", "createdAt", "updatedAt"], "additionalProperties": false } }, "required": ["serviceAccount"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/service-accounts/{serviceAccountId}/access-tokens": { "get": { "summary": "List access tokens for an auth service account", "tags": ["Auth Service Accounts"], "operationId": "listAuthServiceAccountAccessTokens", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "serviceAccountId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "accessTokens": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "kind": { "type": "string", "enum": ["personal", "serviceAccount"] }, "status": { "type": "string", "enum": ["active", "expired", "revoked"] }, "subject": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false }, "subjectLabel": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "string" }, "expiresAt": { "type": "string" }, "revokedAt": { "type": "string" }, "lastUsedAt": { "type": "string" }, "lastUsedUserAgent": { "type": "string" }, "lastUsedIpAddress": { "type": "string" } }, "required": [ "id", "name", "kind", "status", "subject", "createdAt", "expiresAt" ], "additionalProperties": false } } }, "required": ["accessTokens"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } }, "post": { "summary": "Create an access token for an auth service account", "tags": ["Auth Service Accounts"], "operationId": "createAuthServiceAccountAccessToken", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "serviceAccountId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "expiresAt": { "type": "string", "minLength": 1 }, "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": ["name", "expiresAt"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "expiresAt": { "type": "string", "minLength": 1 }, "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": ["name", "expiresAt"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "expiresAt": { "type": "string", "minLength": 1 }, "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": ["name", "expiresAt"], "additionalProperties": false } } } }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "type": "object", "properties": { "accessToken": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "kind": { "type": "string", "enum": ["personal", "serviceAccount"] }, "status": { "type": "string", "enum": ["active", "expired", "revoked"] }, "subject": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false }, "subjectLabel": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "string" }, "expiresAt": { "type": "string" }, "revokedAt": { "type": "string" }, "lastUsedAt": { "type": "string" }, "lastUsedUserAgent": { "type": "string" }, "lastUsedIpAddress": { "type": "string" } }, "required": [ "id", "name", "kind", "status", "subject", "createdAt", "expiresAt" ], "additionalProperties": false }, "tokenValue": { "type": "string" } }, "required": ["accessToken", "tokenValue"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/service-accounts/{serviceAccountId}/access-tokens/{tokenId}/revoke": { "post": { "summary": "Revoke an access token for an auth service account", "tags": ["Auth Service Accounts"], "operationId": "revokeAuthServiceAccountAccessToken", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "serviceAccountId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "tokenId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "accessToken": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "kind": { "type": "string", "enum": ["personal", "serviceAccount"] }, "status": { "type": "string", "enum": ["active", "expired", "revoked"] }, "subject": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false }, "subjectLabel": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "string" }, "expiresAt": { "type": "string" }, "revokedAt": { "type": "string" }, "lastUsedAt": { "type": "string" }, "lastUsedUserAgent": { "type": "string" }, "lastUsedIpAddress": { "type": "string" } }, "required": [ "id", "name", "kind", "status", "subject", "createdAt", "expiresAt" ], "additionalProperties": false } }, "required": ["accessToken"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/invitations": { "post": { "summary": "Create an auth invitation", "tags": ["Auth Invitations"], "operationId": "createAuthInvitation", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "minLength": 1 }, "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "destinationId": { "type": "string", "enum": ["atlas", "app"] }, "expiresAt": { "type": "string" }, "returnTo": { "type": "string" }, "revealLink": { "type": "boolean" } }, "required": ["email"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "email": { "type": "string", "minLength": 1 }, "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "destinationId": { "type": "string", "enum": ["atlas", "app"] }, "expiresAt": { "type": "string" }, "returnTo": { "type": "string" }, "revealLink": { "type": "boolean" } }, "required": ["email"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "email": { "type": "string", "minLength": 1 }, "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "destinationId": { "type": "string", "enum": ["atlas", "app"] }, "expiresAt": { "type": "string" }, "returnTo": { "type": "string" }, "revealLink": { "type": "boolean" } }, "required": ["email"], "additionalProperties": false } } } }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "type": "object", "properties": { "invitation": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string", "enum": ["pending", "accepted", "revoked"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "expiresAt": { "type": "string" }, "acceptedAt": { "type": "string" }, "revokedAt": { "type": "string" } }, "required": [ "id", "email", "groupIds", "status", "createdAt", "updatedAt", "expiresAt" ], "additionalProperties": false }, "delivery": { "type": "object", "properties": { "status": { "type": "string", "enum": ["sent", "skipped", "rate_limited", "not_supported"] }, "link": { "type": "object", "properties": { "url": { "type": "string", "format": "uri" }, "expiresAt": { "type": "string" } }, "required": ["url"], "additionalProperties": false } }, "required": ["status"], "additionalProperties": false } }, "required": ["invitation", "delivery"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } }, "get": { "summary": "List auth invitations", "tags": ["Auth Invitations"], "operationId": "listAuthInvitations", "parameters": [ { "name": "email", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["pending", "accepted", "revoked"] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "invitations": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string", "enum": ["pending", "accepted", "revoked"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "expiresAt": { "type": "string" }, "acceptedAt": { "type": "string" }, "revokedAt": { "type": "string" } }, "required": [ "id", "email", "groupIds", "status", "createdAt", "updatedAt", "expiresAt" ], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["invitations", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/invitation-options": { "get": { "summary": "Get auth invitation options", "tags": ["Auth Invitations"], "operationId": "getAuthInvitationOptions", "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "groups": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" } }, "required": ["id"], "additionalProperties": false } }, "destinations": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "enum": ["atlas", "app"] }, "label": { "type": "string" } }, "required": ["id", "label"], "additionalProperties": false } }, "defaultDestinationId": { "type": "string", "enum": ["atlas", "app"] }, "canInviteWithoutGroups": { "type": "boolean" }, "capabilities": { "type": "object", "properties": { "createInvitation": { "anyOf": [ { "type": "object", "properties": { "state": { "type": "string", "enum": ["enabled"] } }, "required": ["state"], "additionalProperties": false }, { "type": "object", "properties": { "state": { "type": "string", "enum": ["disabled"] }, "reason": { "type": "string", "enum": [ "missing_membership_policy", "invitation_delivery_not_supported" ] } }, "required": ["state", "reason"], "additionalProperties": false } ] } }, "required": ["createInvitation"], "additionalProperties": false } }, "required": ["groups", "destinations", "canInviteWithoutGroups", "capabilities"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/invitations/{invitationId}/revoke": { "post": { "summary": "Revoke an auth invitation", "tags": ["Auth Invitations"], "operationId": "revokeAuthInvitation", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "invitationId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "invitation": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "groupIds": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string", "enum": ["pending", "accepted", "revoked"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "expiresAt": { "type": "string" }, "acceptedAt": { "type": "string" }, "revokedAt": { "type": "string" } }, "required": [ "id", "email", "groupIds", "status", "createdAt", "updatedAt", "expiresAt" ], "additionalProperties": false } }, "required": ["invitation"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/membership-options": { "get": { "summary": "Get auth membership management options", "tags": ["Auth Members"], "operationId": "getAuthMembershipOptions", "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "groups": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" } }, "required": ["id"], "additionalProperties": false } }, "capabilities": { "type": "object", "properties": { "invite": { "type": "boolean" }, "assignGroups": { "type": "boolean" }, "suspend": { "type": "boolean" } }, "required": ["invite", "assignGroups", "suspend"], "additionalProperties": false } }, "required": ["groups", "capabilities"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/members": { "get": { "summary": "List auth members", "tags": ["Auth Members"], "operationId": "listAuthMembers", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "members": { "type": "array", "items": { "type": "object", "properties": { "user": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "avatarUrl": { "type": "string" }, "status": { "type": "string", "enum": ["active", "suspended"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": ["id", "email", "status", "createdAt", "updatedAt"], "additionalProperties": false }, "groupIds": { "type": "array", "items": { "type": "string" } }, "managedGroupIds": { "type": "array", "items": { "type": "string" } }, "capabilities": { "type": "object", "properties": { "assignGroups": { "type": "boolean" }, "suspend": { "type": "boolean" }, "reactivate": { "type": "boolean" } }, "required": ["assignGroups", "suspend", "reactivate"], "additionalProperties": false } }, "required": ["user", "groupIds", "managedGroupIds", "capabilities"], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["members", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/members/{userId}/groups": { "patch": { "summary": "Update an auth member's groups", "tags": ["Auth Members"], "operationId": "updateAuthMemberGroups", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": ["groupIds"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": ["groupIds"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "groupIds": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": ["groupIds"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "member": { "type": "object", "properties": { "user": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "avatarUrl": { "type": "string" }, "status": { "type": "string", "enum": ["active", "suspended"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": ["id", "email", "status", "createdAt", "updatedAt"], "additionalProperties": false }, "groupIds": { "type": "array", "items": { "type": "string" } }, "managedGroupIds": { "type": "array", "items": { "type": "string" } } }, "required": ["user", "groupIds", "managedGroupIds"], "additionalProperties": false } }, "required": ["member"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/members/{userId}/suspend": { "post": { "summary": "Suspend an auth member", "tags": ["Auth Members"], "operationId": "suspendAuthMember", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "member": { "type": "object", "properties": { "user": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "avatarUrl": { "type": "string" }, "status": { "type": "string", "enum": ["active", "suspended"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": ["id", "email", "status", "createdAt", "updatedAt"], "additionalProperties": false }, "groupIds": { "type": "array", "items": { "type": "string" } }, "managedGroupIds": { "type": "array", "items": { "type": "string" } } }, "required": ["user", "groupIds", "managedGroupIds"], "additionalProperties": false } }, "required": ["member"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/auth/members/{userId}/reactivate": { "post": { "summary": "Reactivate an auth member", "tags": ["Auth Members"], "operationId": "reactivateAuthMember", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "member": { "type": "object", "properties": { "user": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "avatarUrl": { "type": "string" }, "status": { "type": "string", "enum": ["active", "suspended"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": ["id", "email", "status", "createdAt", "updatedAt"], "additionalProperties": false }, "groupIds": { "type": "array", "items": { "type": "string" } }, "managedGroupIds": { "type": "array", "items": { "type": "string" } } }, "required": ["user", "groupIds", "managedGroupIds"], "additionalProperties": false } }, "required": ["member"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/ai/accounting/overview": { "get": { "summary": "Get project AI usage and cost analytics", "tags": ["AI Accounting"], "operationId": "getAiAccountingOverview", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "from", "in": "query", "required": true, "schema": { "type": "string", "format": "date-time" } }, { "name": "to", "in": "query", "required": true, "schema": { "type": "string", "format": "date-time" } }, { "name": "providerId", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1 } }, { "name": "modelId", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1 } }, { "name": "bucket", "in": "query", "required": true, "schema": { "type": "string", "enum": ["hour", "day", "week"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "range": { "type": "object", "properties": { "from": { "type": "string", "format": "date-time" }, "to": { "type": "string", "format": "date-time" } }, "required": ["from", "to"], "additionalProperties": false }, "bucket": { "type": "string", "enum": ["hour", "day", "week"] }, "totals": { "type": "object", "properties": { "modelCallCount": { "type": "integer", "minimum": 0 }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false, "description": "Sums of reported meters; unreported meters are absent. totalTokens sums available input and output counts and is a lower bound when coverage is incomplete." }, "usageCoverage": { "type": "object", "properties": { "completeCallCount": { "type": "integer", "minimum": 0, "description": "Calls reporting both inputTokens and outputTokens." }, "fieldCallCounts": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0 } }, "required": [ "inputTokens", "outputTokens", "uncachedInputTokens", "cacheReadInputTokens", "cacheWriteInputTokens", "textOutputTokens", "reasoningOutputTokens", "audioDurationMs" ], "additionalProperties": false } }, "required": ["completeCallCount", "fieldCallCounts"], "additionalProperties": false }, "costs": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false } }, "required": ["modelCallCount", "usage", "usageCoverage", "costs"], "additionalProperties": false }, "series": { "type": "array", "items": { "type": "object", "properties": { "modelCallCount": { "type": "integer", "minimum": 0 }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false, "description": "Sums of reported meters; unreported meters are absent. totalTokens sums available input and output counts and is a lower bound when coverage is incomplete." }, "usageCoverage": { "type": "object", "properties": { "completeCallCount": { "type": "integer", "minimum": 0, "description": "Calls reporting both inputTokens and outputTokens." }, "fieldCallCounts": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0 } }, "required": [ "inputTokens", "outputTokens", "uncachedInputTokens", "cacheReadInputTokens", "cacheWriteInputTokens", "textOutputTokens", "reasoningOutputTokens", "audioDurationMs" ], "additionalProperties": false } }, "required": ["completeCallCount", "fieldCallCounts"], "additionalProperties": false }, "costs": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "start": { "type": "string", "format": "date-time" }, "end": { "type": "string", "format": "date-time" } }, "required": [ "modelCallCount", "usage", "usageCoverage", "costs", "start", "end" ], "additionalProperties": false } }, "models": { "type": "array", "items": { "type": "object", "properties": { "modelCallCount": { "type": "integer", "minimum": 0 }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false, "description": "Sums of reported meters; unreported meters are absent. totalTokens sums available input and output counts and is a lower bound when coverage is incomplete." }, "usageCoverage": { "type": "object", "properties": { "completeCallCount": { "type": "integer", "minimum": 0, "description": "Calls reporting both inputTokens and outputTokens." }, "fieldCallCounts": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0 } }, "required": [ "inputTokens", "outputTokens", "uncachedInputTokens", "cacheReadInputTokens", "cacheWriteInputTokens", "textOutputTokens", "reasoningOutputTokens", "audioDurationMs" ], "additionalProperties": false } }, "required": ["completeCallCount", "fieldCallCounts"], "additionalProperties": false }, "costs": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "providerId": { "type": "string" }, "modelId": { "type": "string" } }, "required": [ "modelCallCount", "usage", "usageCoverage", "costs", "providerId", "modelId" ], "additionalProperties": false } }, "agents": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "modelCallCount": { "type": "integer", "minimum": 0 }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false, "description": "Sums of reported meters; unreported meters are absent. totalTokens sums available input and output counts and is a lower bound when coverage is incomplete." }, "usageCoverage": { "type": "object", "properties": { "completeCallCount": { "type": "integer", "minimum": 0, "description": "Calls reporting both inputTokens and outputTokens." }, "fieldCallCounts": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0 } }, "required": [ "inputTokens", "outputTokens", "uncachedInputTokens", "cacheReadInputTokens", "cacheWriteInputTokens", "textOutputTokens", "reasoningOutputTokens", "audioDurationMs" ], "additionalProperties": false } }, "required": ["completeCallCount", "fieldCallCounts"], "additionalProperties": false }, "costs": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "kind": { "type": "string", "enum": ["agent"] } }, "required": [ "modelCallCount", "usage", "usageCoverage", "costs", "kind" ], "additionalProperties": false }, { "type": "object", "properties": { "modelCallCount": { "type": "integer", "minimum": 0 }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false, "description": "Sums of reported meters; unreported meters are absent. totalTokens sums available input and output counts and is a lower bound when coverage is incomplete." }, "usageCoverage": { "type": "object", "properties": { "completeCallCount": { "type": "integer", "minimum": 0, "description": "Calls reporting both inputTokens and outputTokens." }, "fieldCallCounts": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0 } }, "required": [ "inputTokens", "outputTokens", "uncachedInputTokens", "cacheReadInputTokens", "cacheWriteInputTokens", "textOutputTokens", "reasoningOutputTokens", "audioDurationMs" ], "additionalProperties": false } }, "required": ["completeCallCount", "fieldCallCounts"], "additionalProperties": false }, "costs": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "kind": { "type": "string", "enum": ["workflowAgent"] }, "workflowId": { "type": "string" }, "agentStepId": { "type": "string" } }, "required": [ "modelCallCount", "usage", "usageCoverage", "costs", "kind", "workflowId", "agentStepId" ], "additionalProperties": false } ] } }, "workflows": { "type": "array", "items": { "type": "object", "properties": { "modelCallCount": { "type": "integer", "minimum": 0 }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false, "description": "Sums of reported meters; unreported meters are absent. totalTokens sums available input and output counts and is a lower bound when coverage is incomplete." }, "usageCoverage": { "type": "object", "properties": { "completeCallCount": { "type": "integer", "minimum": 0, "description": "Calls reporting both inputTokens and outputTokens." }, "fieldCallCounts": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0 } }, "required": [ "inputTokens", "outputTokens", "uncachedInputTokens", "cacheReadInputTokens", "cacheWriteInputTokens", "textOutputTokens", "reasoningOutputTokens", "audioDurationMs" ], "additionalProperties": false } }, "required": ["completeCallCount", "fieldCallCounts"], "additionalProperties": false }, "costs": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "workflowId": { "type": "string" } }, "required": [ "modelCallCount", "usage", "usageCoverage", "costs", "workflowId" ], "additionalProperties": false } } }, "required": [ "range", "bucket", "totals", "series", "models", "agents", "workflows" ], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/ai/model-calls": { "get": { "summary": "List project AI model-call accounting records", "tags": ["AI Accounting"], "operationId": "listAiModelCalls", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "from", "in": "query", "required": true, "schema": { "type": "string", "format": "date-time" } }, { "name": "to", "in": "query", "required": true, "schema": { "type": "string", "format": "date-time" } }, { "name": "providerId", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1 } }, { "name": "modelId", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1 } }, { "name": "executionId", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1 } }, { "name": "valuationStatus", "in": "query", "required": false, "schema": { "type": "string", "enum": ["rated", "unpriceable", "unvalued"] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^\\d+$" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^\\d+$" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "usage": { "type": "object", "properties": { "id": { "type": "string" }, "executionId": { "type": "string" }, "attempt": { "type": "integer", "exclusiveMinimum": true, "minimum": 0 }, "callId": { "type": "string" }, "providerId": { "type": "string" }, "requestedModelId": { "type": "string" }, "modelKind": { "type": "string", "enum": [ "language", "image", "video", "embedding", "decision", "transcription", "reranking" ] }, "requestedReasoning": { "anyOf": [ { "type": "string", "enum": [ "provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max" ] }, { "type": "object", "properties": { "budgetTokens": { "type": "integer", "minimum": 0 } }, "required": ["budgetTokens"], "additionalProperties": false } ] }, "responseModelId": { "type": "string" }, "responseId": { "type": "string" }, "providerIds": { "type": "object", "properties": { "requestId": { "type": "string" }, "responseId": { "type": "string" }, "generationId": { "type": "string" } }, "additionalProperties": false, "nullable": true }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false }, "occurredAt": { "type": "string", "format": "date-time" }, "recordedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "executionId", "attempt", "callId", "providerId", "requestedModelId", "responseId", "providerIds", "usage", "occurredAt", "recordedAt" ], "additionalProperties": false }, "attribution": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["request"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["action"] }, "actionId": { "type": "string" }, "actionRunId": { "type": "string" } }, "required": ["kind", "actionId", "actionRunId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["workflow"] }, "workflowId": { "type": "string" }, "workflowRunId": { "type": "string" } }, "required": ["kind", "workflowId", "workflowRunId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["agent"] }, "agentRunId": { "type": "string" }, "threadId": { "type": "string" } }, "required": ["kind", "agentRunId", "threadId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["workflowAgent"] }, "agentStepId": { "type": "string" }, "nodeRunId": { "type": "string" }, "workflowId": { "type": "string" }, "workflowRunId": { "type": "string" } }, "required": [ "kind", "agentStepId", "nodeRunId", "workflowId", "workflowRunId" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["subagent"] }, "subagentRunId": { "type": "string" }, "parentRunId": { "type": "string" } }, "required": ["kind", "subagentRunId", "parentRunId"], "additionalProperties": false } ] }, "cost": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "enum": ["rated"] }, "source": { "type": "string", "enum": ["estimate", "provider", "unknown"] }, "estimate": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "enum": ["rated"] }, "money": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false }, "components": { "type": "array", "items": { "type": "object", "properties": { "meter": { "type": "string", "enum": [ "tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning", "audio.input.milliseconds" ] }, "quantity": { "type": "string", "pattern": "^\\d+$" }, "rateAmountNanosPerMillion": { "type": "string", "pattern": "^\\d+$" }, "chargeAmountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": [ "meter", "quantity", "rateAmountNanosPerMillion", "chargeAmountNanos" ], "additionalProperties": false } } }, "required": ["status", "money", "components"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["unpriceable"] }, "reason": { "type": "string", "enum": [ "missingBillingIdentity", "missingRateCard", "missingUsageMeter", "unsupportedPricingDimension", "invalidUsageForFormula" ] }, "missingMeters": { "type": "array", "items": { "type": "string", "enum": [ "tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning", "audio.input.milliseconds" ] } } }, "required": ["status", "reason"], "additionalProperties": false } ] }, "billingIdentity": { "type": "object", "properties": { "providerId": { "type": "string" }, "modelId": { "type": "string" } }, "required": ["providerId", "modelId"], "additionalProperties": false }, "pricingContext": { "type": "object", "properties": { "serviceTier": { "type": "string" }, "batch": { "type": "boolean" }, "region": { "type": "string" }, "inferenceGeo": { "type": "string" }, "routedProviderId": { "type": "string" }, "routedModelId": { "type": "string" }, "deploymentId": { "type": "string" }, "inferenceProfileId": { "type": "string" }, "cacheWriteTtlSeconds": { "type": "integer", "exclusiveMinimum": true, "minimum": 0 }, "mode": { "type": "string" } }, "additionalProperties": false }, "priceSource": { "type": "object", "properties": { "sourceId": { "type": "string" }, "sourceEntryId": { "type": "string" }, "sourceVersion": { "type": "string" }, "sourceUrl": { "type": "string", "format": "uri" }, "observedAt": { "type": "string", "format": "date-time" } }, "required": [ "sourceId", "sourceEntryId", "sourceVersion", "observedAt" ], "additionalProperties": false }, "money": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false }, "components": { "type": "array", "items": { "type": "object", "properties": { "meter": { "type": "string", "enum": [ "tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning", "audio.input.milliseconds" ] }, "quantity": { "type": "string", "pattern": "^\\d+$" }, "rateAmountNanosPerMillion": { "type": "string", "pattern": "^\\d+$" }, "chargeAmountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": [ "meter", "quantity", "rateAmountNanosPerMillion", "chargeAmountNanos" ], "additionalProperties": false } }, "ratedAt": { "type": "string", "format": "date-time" } }, "required": [ "status", "source", "billingIdentity", "pricingContext", "priceSource", "money", "components", "ratedAt" ], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["unpriceable"] }, "source": { "type": "string", "enum": ["estimate", "provider", "unknown"] }, "estimate": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "enum": ["rated"] }, "money": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false }, "components": { "type": "array", "items": { "type": "object", "properties": { "meter": { "type": "string", "enum": [ "tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning", "audio.input.milliseconds" ] }, "quantity": { "type": "string", "pattern": "^\\d+$" }, "rateAmountNanosPerMillion": { "type": "string", "pattern": "^\\d+$" }, "chargeAmountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": [ "meter", "quantity", "rateAmountNanosPerMillion", "chargeAmountNanos" ], "additionalProperties": false } } }, "required": ["status", "money", "components"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["unpriceable"] }, "reason": { "type": "string", "enum": [ "missingBillingIdentity", "missingRateCard", "missingUsageMeter", "unsupportedPricingDimension", "invalidUsageForFormula" ] }, "missingMeters": { "type": "array", "items": { "type": "string", "enum": [ "tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning", "audio.input.milliseconds" ] } } }, "required": ["status", "reason"], "additionalProperties": false } ] }, "billingIdentity": { "type": "object", "properties": { "providerId": { "type": "string" }, "modelId": { "type": "string" } }, "required": ["providerId", "modelId"], "additionalProperties": false }, "pricingContext": { "type": "object", "properties": { "serviceTier": { "type": "string" }, "batch": { "type": "boolean" }, "region": { "type": "string" }, "inferenceGeo": { "type": "string" }, "routedProviderId": { "type": "string" }, "routedModelId": { "type": "string" }, "deploymentId": { "type": "string" }, "inferenceProfileId": { "type": "string" }, "cacheWriteTtlSeconds": { "type": "integer", "exclusiveMinimum": true, "minimum": 0 }, "mode": { "type": "string" } }, "additionalProperties": false }, "priceSource": { "type": "object", "properties": { "sourceId": { "type": "string" }, "sourceEntryId": { "type": "string" }, "sourceVersion": { "type": "string" }, "sourceUrl": { "type": "string", "format": "uri" }, "observedAt": { "type": "string", "format": "date-time" } }, "required": [ "sourceId", "sourceEntryId", "sourceVersion", "observedAt" ], "additionalProperties": false }, "reason": { "type": "string", "enum": [ "missingBillingIdentity", "missingRateCard", "missingUsageMeter", "unsupportedPricingDimension", "invalidUsageForFormula" ] }, "missingMeters": { "type": "array", "items": { "type": "string", "enum": [ "tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning", "audio.input.milliseconds" ] } }, "ratedAt": { "type": "string", "format": "date-time" } }, "required": [ "status", "source", "pricingContext", "reason", "ratedAt" ], "additionalProperties": false } ] }, "valuationStatus": { "type": "string", "enum": ["rated", "unpriceable", "unvalued"] } }, "required": ["usage", "valuationStatus"], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "integer", "minimum": 0 } }, "required": ["items", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/ai/limits": { "get": { "summary": "List project AI usage-limit policies", "tags": ["AI Accounting"], "operationId": "listAiLimitPolicies", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "includeDisabled", "in": "query", "required": false, "schema": { "type": "string", "enum": ["true", "false"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "subject": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["group"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["user"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } ] }, "limit": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "period": { "type": "string", "enum": ["calendarMonth"] }, "enabled": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "subject", "limit", "period", "enabled", "createdAt", "updatedAt" ], "additionalProperties": false } }, "capabilities": { "type": "object", "properties": { "manage": { "type": "boolean" } }, "required": ["manage"], "additionalProperties": false } }, "required": ["items", "capabilities"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } }, "post": { "summary": "Create an AI usage-limit policy", "tags": ["AI Accounting"], "operationId": "createAiLimitPolicy", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "subject": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["group"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["user"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } ] }, "limit": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "enabled": { "type": "boolean" } }, "required": ["subject", "limit"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "subject": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["group"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["user"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } ] }, "limit": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "enabled": { "type": "boolean" } }, "required": ["subject", "limit"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "subject": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["group"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["user"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } ] }, "limit": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "enabled": { "type": "boolean" } }, "required": ["subject", "limit"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "subject": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["group"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["user"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } ] }, "limit": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "period": { "type": "string", "enum": ["calendarMonth"] }, "enabled": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "subject", "limit", "period", "enabled", "createdAt", "updatedAt" ], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/ai/limits/status": { "get": { "summary": "Get current project AI usage-limit status", "tags": ["AI Accounting"], "operationId": "getAiLimitStatus", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "includeDisabled", "in": "query", "required": false, "schema": { "type": "string", "enum": ["true", "false"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "policy": { "type": "object", "properties": { "id": { "type": "string" }, "subject": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["group"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["user"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } ] }, "limit": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "period": { "type": "string", "enum": ["calendarMonth"] }, "enabled": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "subject", "limit", "period", "enabled", "createdAt", "updatedAt" ], "additionalProperties": false }, "period": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["calendarMonth"] }, "start": { "type": "string", "format": "date-time" }, "end": { "type": "string", "format": "date-time" }, "resetAt": { "type": "string", "format": "date-time" } }, "required": ["kind", "start", "end", "resetAt"], "additionalProperties": false }, "consumption": { "type": "object", "properties": { "actual": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "reserved": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "unknown": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "remaining": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] } }, "required": ["actual", "reserved", "unknown", "remaining"], "additionalProperties": false }, "accountingStatus": { "type": "string", "enum": ["complete", "unavailable"] }, "exhausted": { "type": "boolean" }, "orphaned": { "type": "boolean" } }, "required": [ "policy", "period", "consumption", "accountingStatus", "exhausted", "orphaned" ], "additionalProperties": false } }, "capabilities": { "type": "object", "properties": { "manage": { "type": "boolean" } }, "required": ["manage"], "additionalProperties": false } }, "required": ["items", "capabilities"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/ai/limits/subjects": { "get": { "summary": "Get selectable AI usage-limit subjects", "description": "Lists registered groups and auth principals available for AI usage-limit policies.", "tags": ["AI Accounting"], "operationId": "getAiLimitSubjectOptions", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "groups": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" } }, "required": ["id"], "additionalProperties": false } }, "users": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "status": { "type": "string", "enum": ["active", "suspended"] } }, "required": ["id", "email", "status"], "additionalProperties": false } }, "serviceAccounts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "status": { "type": "string", "enum": ["active", "suspended"] } }, "required": ["id", "name", "status"], "additionalProperties": false } } }, "required": ["groups", "users", "serviceAccounts"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/ai/limits/{limitId}": { "put": { "summary": "Update an AI usage-limit policy", "tags": ["AI Accounting"], "operationId": "updateAiLimitPolicy", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "limitId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "limit": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "enabled": { "type": "boolean" } }, "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "limit": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "enabled": { "type": "boolean" } }, "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "limit": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "enabled": { "type": "boolean" } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "subject": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["group"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["user"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } ] }, "limit": { "anyOf": [ { "type": "object", "properties": { "meter": { "type": "string", "enum": ["tokens.total"] }, "amount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["meter", "amount"], "additionalProperties": false }, { "type": "object", "properties": { "meter": { "type": "string", "enum": ["cost.catalogEstimated"] }, "amount": { "type": "object", "properties": { "currency": { "type": "string", "enum": ["USD"] }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "required": ["meter", "amount"], "additionalProperties": false } ] }, "period": { "type": "string", "enum": ["calendarMonth"] }, "enabled": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "subject", "limit", "period", "enabled", "createdAt", "updatedAt" ], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } }, "delete": { "summary": "Delete an AI usage-limit policy", "tags": ["AI Accounting"], "operationId": "deleteAiLimitPolicy", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "limitId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } }, "required": ["success"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/ai/model-call-groups": { "get": { "summary": "List AI model calls grouped by initiating execution", "tags": ["AI Accounting"], "operationId": "listAiModelCallGroups", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "from", "in": "query", "required": true, "schema": { "type": "string", "format": "date-time" } }, { "name": "to", "in": "query", "required": true, "schema": { "type": "string", "format": "date-time" } }, { "name": "providerId", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1 } }, { "name": "modelId", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1 } }, { "name": "valuationStatus", "in": "query", "required": false, "schema": { "type": "string", "enum": ["rated", "unpriceable", "unvalued"] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^\\d+$" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^\\d+$" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "executionId": { "type": "string" }, "attribution": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["request"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["action"] }, "actionId": { "type": "string" }, "actionRunId": { "type": "string" } }, "required": ["kind", "actionId", "actionRunId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["workflow"] }, "workflowId": { "type": "string" }, "workflowRunId": { "type": "string" } }, "required": ["kind", "workflowId", "workflowRunId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["agent"] }, "agentRunId": { "type": "string" }, "threadId": { "type": "string" } }, "required": ["kind", "agentRunId", "threadId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["workflowAgent"] }, "agentStepId": { "type": "string" }, "nodeRunId": { "type": "string" }, "workflowId": { "type": "string" }, "workflowRunId": { "type": "string" } }, "required": [ "kind", "agentStepId", "nodeRunId", "workflowId", "workflowRunId" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["subagent"] }, "subagentRunId": { "type": "string" }, "parentRunId": { "type": "string" } }, "required": ["kind", "subagentRunId", "parentRunId"], "additionalProperties": false } ] }, "modelCallCount": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "costs": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "firstCallAt": { "type": "string", "format": "date-time" }, "lastCallAt": { "type": "string", "format": "date-time" }, "label": { "type": "string" }, "executions": { "type": "array", "items": { "type": "object", "properties": { "executionId": { "type": "string" }, "attribution": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["request"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["action"] }, "actionId": { "type": "string" }, "actionRunId": { "type": "string" } }, "required": ["kind", "actionId", "actionRunId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["workflow"] }, "workflowId": { "type": "string" }, "workflowRunId": { "type": "string" } }, "required": ["kind", "workflowId", "workflowRunId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["agent"] }, "agentRunId": { "type": "string" }, "threadId": { "type": "string" } }, "required": ["kind", "agentRunId", "threadId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["workflowAgent"] }, "agentStepId": { "type": "string" }, "nodeRunId": { "type": "string" }, "workflowId": { "type": "string" }, "workflowRunId": { "type": "string" } }, "required": [ "kind", "agentStepId", "nodeRunId", "workflowId", "workflowRunId" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["subagent"] }, "subagentRunId": { "type": "string" }, "parentRunId": { "type": "string" } }, "required": ["kind", "subagentRunId", "parentRunId"], "additionalProperties": false } ] }, "modelCallCount": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "costs": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "firstCallAt": { "type": "string", "format": "date-time" }, "lastCallAt": { "type": "string", "format": "date-time" }, "models": { "type": "array", "items": { "type": "object", "properties": { "providerId": { "type": "string" }, "modelId": { "type": "string" } }, "required": ["providerId", "modelId"], "additionalProperties": false } }, "label": { "type": "string" } }, "required": [ "executionId", "modelCallCount", "costs", "firstCallAt", "lastCallAt", "models" ], "additionalProperties": false } }, "canOpenThread": { "type": "boolean" } }, "required": [ "executionId", "modelCallCount", "costs", "firstCallAt", "lastCallAt", "executions", "canOpenThread" ], "additionalProperties": false } }, "total": { "type": "integer", "minimum": 0 }, "hasMore": { "type": "boolean" } }, "required": ["items", "total", "hasMore"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/project": { "get": { "summary": "Get current project metadata", "tags": ["Project"], "operationId": "getProjectInfo", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" } }, "required": ["id"], "additionalProperties": false } } } } } } }, "/api/status": { "get": { "summary": "Get runtime status", "tags": ["Status"], "operationId": "getStatus", "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": ["ok", "degraded"] }, "objectTypes": { "type": "integer", "minimum": 0 }, "maintenance": { "type": "object", "properties": { "running": { "type": "boolean" }, "intervalMs": { "type": "integer", "exclusiveMinimum": true, "minimum": 0 }, "lastStartedAt": { "type": "string", "nullable": true }, "lastCompletedAt": { "type": "string", "nullable": true }, "lastDurationMs": { "type": "number", "minimum": 0, "nullable": true }, "consecutiveFailures": { "type": "integer", "minimum": 0 }, "lastError": { "type": "string", "nullable": true }, "outbox": { "type": "object", "properties": { "pendingCount": { "type": "integer", "minimum": 0 }, "oldestPendingAt": { "type": "string", "nullable": true }, "retryingCount": { "type": "integer", "minimum": 0 }, "maxAttempts": { "type": "integer", "minimum": 0 } }, "required": [ "pendingCount", "oldestPendingAt", "retryingCount", "maxAttempts" ], "additionalProperties": false, "nullable": true }, "cleanup": { "type": "object", "properties": { "publishedOutboxRowsDeleted": { "type": "integer", "minimum": 0 }, "terminalSourceRowsDeleted": { "type": "integer", "minimum": 0 }, "terminalSourceMaterializationsDeleted": { "type": "integer", "minimum": 0 } }, "required": [ "publishedOutboxRowsDeleted", "terminalSourceRowsDeleted", "terminalSourceMaterializationsDeleted" ], "additionalProperties": false, "nullable": true } }, "required": [ "running", "intervalMs", "lastStartedAt", "lastCompletedAt", "lastDurationMs", "consecutiveFailures", "lastError", "outbox", "cleanup" ], "additionalProperties": false } }, "required": ["status", "objectTypes", "maintenance"], "additionalProperties": false } } } } } } }, "/api/connectors": { "get": { "summary": "List registered connectors", "tags": ["Connectors"], "operationId": "listConnectors", "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "connection": { "type": "object", "properties": { "authentication": { "type": "string", "enum": ["oauth2"] } }, "required": ["authentication"], "additionalProperties": false, "nullable": true }, "syncIds": { "type": "array", "items": { "type": "string" } }, "webhooks": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "method": { "type": "string", "enum": ["POST"] }, "route": { "type": "string" }, "bodyFormat": { "type": "string", "enum": ["json", "text", "raw"] }, "hasVerify": { "type": "boolean" }, "hasIdempotency": { "type": "boolean" } }, "required": [ "id", "method", "route", "bodyFormat", "hasVerify", "hasIdempotency" ], "additionalProperties": false } } }, "required": ["id", "type", "connection", "syncIds", "webhooks"], "additionalProperties": false } } } } } } } }, "/api/connectors/{connectorId}": { "get": { "summary": "Get connector metadata", "tags": ["Connectors"], "operationId": "getConnector", "parameters": [ { "name": "connectorId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "connection": { "type": "object", "properties": { "authentication": { "type": "string", "enum": ["oauth2"] } }, "required": ["authentication"], "additionalProperties": false, "nullable": true }, "syncIds": { "type": "array", "items": { "type": "string" } }, "webhooks": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "method": { "type": "string", "enum": ["POST"] }, "route": { "type": "string" }, "bodyFormat": { "type": "string", "enum": ["json", "text", "raw"] }, "hasVerify": { "type": "boolean" }, "hasIdempotency": { "type": "boolean" } }, "required": [ "id", "method", "route", "bodyFormat", "hasVerify", "hasIdempotency" ], "additionalProperties": false } } }, "required": ["id", "type", "connection", "syncIds", "webhooks"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/connectors/{connectorId}/connections": { "get": { "summary": "List connector connections", "tags": ["Connector Connections"], "operationId": "listConnectorConnections", "parameters": [ { "name": "connectorId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "account": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "avatarUrl": { "type": "string", "format": "uri" } }, "required": ["id", "label"], "additionalProperties": false }, "status": { "type": "string", "enum": ["connected", "needs_reauthorization", "disconnected"] } }, "required": ["id", "connectorId", "owner", "slot", "account", "status"], "additionalProperties": false } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_invalid", "connector.configuration_invalid" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["connector.not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["internal.unexpected"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/connectors/{connectorId}/connections/{connectionId}": { "delete": { "summary": "Disconnect a connector account", "tags": ["Connector Connections"], "operationId": "disconnectConnectorConnection", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "connectorId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "connectionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } }, "required": ["success"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_invalid", "connector.configuration_invalid" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["connector.not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_required", "connector.operation_conflict", "connector.operation_in_progress", "connector.replacement_required", "connector.revocation_pending" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["internal.unexpected"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/connectors/{connectorId}/connections/{connectionId}/revoke": { "post": { "summary": "Revoke a connector authorization", "tags": ["Connector Connections"], "operationId": "revokeConnectorConnection", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "connectorId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "connectionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "affectedConnections": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "account": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "avatarUrl": { "type": "string", "format": "uri" } }, "required": ["id", "label"], "additionalProperties": false }, "status": { "type": "string", "enum": ["connected", "needs_reauthorization", "disconnected"] } }, "required": ["id", "connectorId", "owner", "slot", "account", "status"], "additionalProperties": false } } }, "required": ["affectedConnections"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_invalid", "connector.configuration_invalid" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["connector.not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_required", "connector.operation_conflict", "connector.operation_in_progress", "connector.replacement_required", "connector.revocation_pending" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["internal.unexpected"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "502": { "description": "Response for status 502", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["connector.adapter_invalid", "connector.provider_failed"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.credentials_unavailable", "connector.provider_unavailable" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/connectors/{connectorId}/connection-runs": { "get": { "summary": "List the initiating user's pending connector connection runs", "tags": ["Connector Connection Runs"], "operationId": "listPendingConnectorConnectionRuns", "parameters": [ { "name": "connectorId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["waiting"] }, "waitingFor": { "type": "string", "enum": ["provider_authorization"] }, "expiresAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "waitingFor", "expiresAt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["running"] } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["waiting"] }, "waitingFor": { "type": "string", "enum": ["account_selection"] }, "accounts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "avatarUrl": { "type": "string", "format": "uri" } }, "required": ["id", "label"], "additionalProperties": false } } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "waitingFor", "accounts" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["succeeded"] }, "connections": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "account": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "avatarUrl": { "type": "string", "format": "uri" } }, "required": ["id", "label"], "additionalProperties": false }, "status": { "type": "string", "enum": ["connected", "needs_reauthorization", "disconnected"] } }, "required": [ "id", "connectorId", "owner", "slot", "account", "status" ], "additionalProperties": false } }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "connections", "finishedAt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["failed"] }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "connector.adapter_invalid", "connector.authorization_invalid", "connector.authorization_required", "connector.credentials_unavailable", "connector.not_found", "connector.operation_conflict", "connector.operation_in_progress", "connector.provider_failed", "connector.provider_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "error", "finishedAt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["cancelled", "expired"] }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "finishedAt" ], "additionalProperties": false } ] } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_invalid", "connector.configuration_invalid" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["connector.not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["internal.unexpected"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } } } }, "post": { "summary": "Start a connector connection run", "tags": ["Connector Connection Runs"], "operationId": "startConnectorConnectionRun", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "connectorId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "slot": { "type": "string", "minLength": 1 }, "returnTo": { "type": "string", "format": "uri" } }, "required": ["slot", "returnTo"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "slot": { "type": "string", "minLength": 1 }, "returnTo": { "type": "string", "format": "uri" } }, "required": ["slot", "returnTo"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "slot": { "type": "string", "minLength": 1 }, "returnTo": { "type": "string", "format": "uri" } }, "required": ["slot", "returnTo"], "additionalProperties": false } } } }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string" }, "authorizationUrl": { "type": "string", "format": "uri" }, "affectedConnections": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "account": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "avatarUrl": { "type": "string", "format": "uri" } }, "required": ["id", "label"], "additionalProperties": false }, "status": { "type": "string", "enum": ["connected", "needs_reauthorization", "disconnected"] } }, "required": ["id", "connectorId", "owner", "slot", "account", "status"], "additionalProperties": false } } }, "required": ["runId", "authorizationUrl", "affectedConnections"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_invalid", "connector.configuration_invalid" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["connector.not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_required", "connector.operation_conflict", "connector.operation_in_progress", "connector.replacement_required", "connector.revocation_pending" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["internal.unexpected"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "502": { "description": "Response for status 502", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["connector.adapter_invalid", "connector.provider_failed"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.credentials_unavailable", "connector.provider_unavailable" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/connectors/{connectorId}/connection-runs/{runId}": { "get": { "summary": "Get a connector connection run", "tags": ["Connector Connection Runs"], "operationId": "getConnectorConnectionRun", "parameters": [ { "name": "connectorId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["waiting"] }, "waitingFor": { "type": "string", "enum": ["provider_authorization"] }, "expiresAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "waitingFor", "expiresAt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["running"] } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["waiting"] }, "waitingFor": { "type": "string", "enum": ["account_selection"] }, "accounts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "avatarUrl": { "type": "string", "format": "uri" } }, "required": ["id", "label"], "additionalProperties": false } } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "waitingFor", "accounts" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["succeeded"] }, "connections": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "account": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "avatarUrl": { "type": "string", "format": "uri" } }, "required": ["id", "label"], "additionalProperties": false }, "status": { "type": "string", "enum": ["connected", "needs_reauthorization", "disconnected"] } }, "required": ["id", "connectorId", "owner", "slot", "account", "status"], "additionalProperties": false } }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "connections", "finishedAt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["failed"] }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "connector.adapter_invalid", "connector.authorization_invalid", "connector.authorization_required", "connector.credentials_unavailable", "connector.not_found", "connector.operation_conflict", "connector.operation_in_progress", "connector.provider_failed", "connector.provider_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "error", "finishedAt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["cancelled", "expired"] }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "finishedAt" ], "additionalProperties": false } ] } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_invalid", "connector.configuration_invalid" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["connector.not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["internal.unexpected"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/connectors/{connectorId}/connections/{connectionId}/connection-runs": { "post": { "summary": "Add a connector connection from an existing authorization", "tags": ["Connector Connection Runs"], "operationId": "addConnectorConnection", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "connectorId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "connectionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "slot": { "type": "string", "minLength": 1 } }, "required": ["slot"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "slot": { "type": "string", "minLength": 1 } }, "required": ["slot"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "slot": { "type": "string", "minLength": 1 } }, "required": ["slot"], "additionalProperties": false } } } }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["waiting"] }, "waitingFor": { "type": "string", "enum": ["provider_authorization"] }, "expiresAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "waitingFor", "expiresAt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["running"] } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["waiting"] }, "waitingFor": { "type": "string", "enum": ["account_selection"] }, "accounts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "avatarUrl": { "type": "string", "format": "uri" } }, "required": ["id", "label"], "additionalProperties": false } } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "waitingFor", "accounts" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["succeeded"] }, "connections": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "account": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "avatarUrl": { "type": "string", "format": "uri" } }, "required": ["id", "label"], "additionalProperties": false }, "status": { "type": "string", "enum": ["connected", "needs_reauthorization", "disconnected"] } }, "required": ["id", "connectorId", "owner", "slot", "account", "status"], "additionalProperties": false } }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "connections", "finishedAt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["failed"] }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "connector.adapter_invalid", "connector.authorization_invalid", "connector.authorization_required", "connector.credentials_unavailable", "connector.not_found", "connector.operation_conflict", "connector.operation_in_progress", "connector.provider_failed", "connector.provider_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "error", "finishedAt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["cancelled", "expired"] }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "finishedAt" ], "additionalProperties": false } ] } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_invalid", "connector.configuration_invalid" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["connector.not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_required", "connector.operation_conflict", "connector.operation_in_progress", "connector.replacement_required", "connector.revocation_pending" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["internal.unexpected"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/connectors/{connectorId}/connection-runs/{runId}/selection": { "post": { "summary": "Select a connector account", "tags": ["Connector Connection Runs"], "operationId": "selectConnectorConnectionRunAccount", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "connectorId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "accountId": { "type": "string", "minLength": 1 }, "replace": { "type": "boolean" } }, "required": ["accountId"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "accountId": { "type": "string", "minLength": 1 }, "replace": { "type": "boolean" } }, "required": ["accountId"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "accountId": { "type": "string", "minLength": 1 }, "replace": { "type": "boolean" } }, "required": ["accountId"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["waiting"] }, "waitingFor": { "type": "string", "enum": ["provider_authorization"] }, "expiresAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "waitingFor", "expiresAt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["running"] } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["waiting"] }, "waitingFor": { "type": "string", "enum": ["account_selection"] }, "accounts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "avatarUrl": { "type": "string", "format": "uri" } }, "required": ["id", "label"], "additionalProperties": false } } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "waitingFor", "accounts" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["succeeded"] }, "connections": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "account": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "avatarUrl": { "type": "string", "format": "uri" } }, "required": ["id", "label"], "additionalProperties": false }, "status": { "type": "string", "enum": ["connected", "needs_reauthorization", "disconnected"] } }, "required": ["id", "connectorId", "owner", "slot", "account", "status"], "additionalProperties": false } }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "connections", "finishedAt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["failed"] }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "connector.adapter_invalid", "connector.authorization_invalid", "connector.authorization_required", "connector.credentials_unavailable", "connector.not_found", "connector.operation_conflict", "connector.operation_in_progress", "connector.provider_failed", "connector.provider_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "error", "finishedAt" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "kind": { "type": "string", "enum": ["connect", "reauthorize"] }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["cancelled", "expired"] }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "connectorId", "kind", "owner", "slot", "createdAt", "updatedAt", "status", "finishedAt" ], "additionalProperties": false } ] } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_invalid", "connector.configuration_invalid" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["connector.not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_required", "connector.operation_conflict", "connector.operation_in_progress", "connector.replacement_required", "connector.revocation_pending" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["internal.unexpected"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/connectors/{connectorId}/connections/{connectionId}/reauthorize": { "post": { "summary": "Reauthorize a connector connection", "tags": ["Connector Connection Runs"], "operationId": "reauthorizeConnectorConnection", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "connectorId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "connectionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "returnTo": { "type": "string", "format": "uri" } }, "required": ["returnTo"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "returnTo": { "type": "string", "format": "uri" } }, "required": ["returnTo"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "returnTo": { "type": "string", "format": "uri" } }, "required": ["returnTo"], "additionalProperties": false } } } }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string" }, "authorizationUrl": { "type": "string", "format": "uri" }, "affectedConnections": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "connectorId": { "type": "string" }, "owner": { "type": "object", "properties": { "type": { "type": "string", "enum": ["project"] } }, "required": ["type"], "additionalProperties": false }, "slot": { "type": "string" }, "account": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "avatarUrl": { "type": "string", "format": "uri" } }, "required": ["id", "label"], "additionalProperties": false }, "status": { "type": "string", "enum": ["connected", "needs_reauthorization", "disconnected"] } }, "required": ["id", "connectorId", "owner", "slot", "account", "status"], "additionalProperties": false } } }, "required": ["runId", "authorizationUrl", "affectedConnections"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_invalid", "connector.configuration_invalid" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["connector.not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.authorization_required", "connector.operation_conflict", "connector.operation_in_progress", "connector.replacement_required", "connector.revocation_pending" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["internal.unexpected"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "502": { "description": "Response for status 502", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["connector.adapter_invalid", "connector.provider_failed"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": [ "connector.credentials_unavailable", "connector.provider_unavailable" ], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/datasets": { "get": { "summary": "List registered datasets", "tags": ["Datasets"], "operationId": "listDatasets", "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "primaryKey": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "minItems": 2 } ] }, "sequenceBy": { "type": "string" }, "partitionBy": { "type": "array", "items": { "type": "string" } }, "schema": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "boolean", "int64", "float64", "decimal", "date", "timestamp", "json", "fileRef" ] }, "nullable": { "type": "boolean" } }, "required": ["name", "type"], "additionalProperties": false } } }, "required": ["columns"], "additionalProperties": false }, "kind": { "type": "string", "enum": ["dataset"] }, "materialized": { "type": "boolean" }, "latestVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append", "merge", "schema"] }, "createdAt": { "type": "string" }, "rowCount": { "type": "number" } }, "required": ["datasetId", "versionId", "mode", "createdAt"], "additionalProperties": false, "nullable": true }, "syncIds": { "type": "array", "items": { "type": "string" } }, "sourcePipelineIds": { "type": "array", "items": { "type": "string" } }, "targetPipelineIds": { "type": "array", "items": { "type": "string" } }, "projectionIds": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "schema", "kind", "materialized", "latestVersion", "syncIds", "sourcePipelineIds", "targetPipelineIds", "projectionIds" ], "additionalProperties": false } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/datasets/{datasetId}": { "get": { "summary": "Get dataset metadata", "tags": ["Datasets"], "operationId": "getDataset", "parameters": [ { "name": "datasetId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "primaryKey": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "minItems": 2 } ] }, "sequenceBy": { "type": "string" }, "partitionBy": { "type": "array", "items": { "type": "string" } }, "schema": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "boolean", "int64", "float64", "decimal", "date", "timestamp", "json", "fileRef" ] }, "nullable": { "type": "boolean" } }, "required": ["name", "type"], "additionalProperties": false } } }, "required": ["columns"], "additionalProperties": false }, "kind": { "type": "string", "enum": ["dataset"] }, "materialized": { "type": "boolean" }, "latestVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append", "merge", "schema"] }, "createdAt": { "type": "string" }, "rowCount": { "type": "number" } }, "required": ["datasetId", "versionId", "mode", "createdAt"], "additionalProperties": false, "nullable": true }, "syncIds": { "type": "array", "items": { "type": "string" } }, "sourcePipelineIds": { "type": "array", "items": { "type": "string" } }, "targetPipelineIds": { "type": "array", "items": { "type": "string" } }, "projectionIds": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "schema", "kind", "materialized", "latestVersion", "syncIds", "sourcePipelineIds", "targetPipelineIds", "projectionIds" ], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["dataset.not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error", "code"], "additionalProperties": false } } } } } } }, "/api/datasets/{datasetId}/versions": { "get": { "summary": "List dataset versions", "tags": ["Dataset Versions"], "operationId": "listDatasetVersions", "parameters": [ { "name": "datasetId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "versions": { "type": "array", "items": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "parentVersionId": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append", "merge", "schema"] }, "createdAt": { "type": "string" }, "schema": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "boolean", "int64", "float64", "decimal", "date", "timestamp", "json", "fileRef" ] }, "nullable": { "type": "boolean" } }, "required": ["name", "type"], "additionalProperties": false } } }, "required": ["columns"], "additionalProperties": false }, "producer": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["sync", "pipeline", "ingest"] }, "id": { "type": "string" }, "runId": { "type": "string" } }, "required": ["kind"], "additionalProperties": false }, "inputs": { "type": "array", "items": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["datasetId", "versionId"], "additionalProperties": false } }, "rowCount": { "type": "number" }, "sizeBytes": { "type": "number" } }, "required": ["datasetId", "versionId", "mode", "createdAt", "schema"], "additionalProperties": false } }, "count": { "type": "number" } }, "required": ["versions", "count"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["dataset.not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error", "code"], "additionalProperties": false } } } } } } }, "/api/datasets/{datasetId}/versions/{versionId}": { "get": { "summary": "Get dataset version", "tags": ["Dataset Versions"], "operationId": "getDatasetVersion", "parameters": [ { "name": "datasetId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "versionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "parentVersionId": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append", "merge", "schema"] }, "createdAt": { "type": "string" }, "schema": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "boolean", "int64", "float64", "decimal", "date", "timestamp", "json", "fileRef" ] }, "nullable": { "type": "boolean" } }, "required": ["name", "type"], "additionalProperties": false } } }, "required": ["columns"], "additionalProperties": false }, "producer": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["sync", "pipeline", "ingest"] }, "id": { "type": "string" }, "runId": { "type": "string" } }, "required": ["kind"], "additionalProperties": false }, "inputs": { "type": "array", "items": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["datasetId", "versionId"], "additionalProperties": false } }, "rowCount": { "type": "number" }, "sizeBytes": { "type": "number" } }, "required": ["datasetId", "versionId", "mode", "createdAt", "schema"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["dataset.not_found", "dataset.version_not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error", "code"], "additionalProperties": false } } } } } } }, "/api/datasets/{datasetId}/rows": { "get": { "summary": "Preview dataset rows", "tags": ["Dataset Rows"], "operationId": "listDatasetRows", "parameters": [ { "name": "datasetId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "versionId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "columns", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "version": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "parentVersionId": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append", "merge", "schema"] }, "createdAt": { "type": "string" }, "schema": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "boolean", "int64", "float64", "decimal", "date", "timestamp", "json", "fileRef" ] }, "nullable": { "type": "boolean" } }, "required": ["name", "type"], "additionalProperties": false } } }, "required": ["columns"], "additionalProperties": false }, "producer": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["sync", "pipeline", "ingest"] }, "id": { "type": "string" }, "runId": { "type": "string" } }, "required": ["kind"], "additionalProperties": false }, "inputs": { "type": "array", "items": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["datasetId", "versionId"], "additionalProperties": false } }, "rowCount": { "type": "number" }, "sizeBytes": { "type": "number" } }, "required": ["datasetId", "versionId", "mode", "createdAt", "schema"], "additionalProperties": false }, "columns": { "type": "array", "items": { "type": "string" } }, "rows": { "type": "array", "items": { "type": "object", "additionalProperties": {} } }, "count": { "type": "number" }, "limit": { "type": "number" }, "offset": { "type": "number" }, "total": { "type": "number" }, "hasMore": { "type": "boolean" } }, "required": [ "datasetId", "versionId", "version", "columns", "rows", "count", "limit", "offset", "hasMore" ], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["dataset.not_found", "dataset.version_not_found"], "description": "Stable machine-readable failure code for programmatic handling." } }, "required": ["error", "code"], "additionalProperties": false } } } } } } }, "/api/syncs": { "get": { "summary": "List registered syncs", "tags": ["Syncs"], "operationId": "listSyncs", "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append", "merge"] }, "connector": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } }, "required": ["id", "type"], "additionalProperties": false }, "target": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["dataset"] }, "dataset": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "primaryKey": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "minItems": 2 } ] }, "sequenceBy": { "type": "string" }, "partitionBy": { "type": "array", "items": { "type": "string" } }, "schema": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "boolean", "int64", "float64", "decimal", "date", "timestamp", "json", "fileRef" ] }, "nullable": { "type": "boolean" } }, "required": ["name", "type"], "additionalProperties": false } } }, "required": ["columns"], "additionalProperties": false } }, "required": ["id", "schema"], "additionalProperties": false } }, "required": ["kind", "dataset"], "additionalProperties": false }, "triggers": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["schedule"] }, "scheduleId": { "type": "string" } }, "required": ["type", "scheduleId"], "additionalProperties": false } }, "latestRun": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "syncId": { "type": "string" }, "datasetId": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append", "merge"] }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "rowsRead": { "type": "number" }, "output": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["datasetId", "versionId"], "additionalProperties": false }, "expectedLatestVersionId": { "type": "string" }, "commitMessage": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "sync.execution_failed" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false } }, "required": [ "id", "projectId", "syncId", "datasetId", "mode", "status", "queuedAt" ], "additionalProperties": false, "nullable": true } }, "required": ["id", "mode", "connector", "target", "triggers", "latestRun"], "additionalProperties": false } } } } } } } }, "/api/syncs/{syncId}": { "get": { "summary": "Get sync metadata", "tags": ["Syncs"], "operationId": "getSync", "parameters": [ { "name": "syncId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append", "merge"] }, "connector": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } }, "required": ["id", "type"], "additionalProperties": false }, "target": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["dataset"] }, "dataset": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "primaryKey": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "minItems": 2 } ] }, "sequenceBy": { "type": "string" }, "partitionBy": { "type": "array", "items": { "type": "string" } }, "schema": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "boolean", "int64", "float64", "decimal", "date", "timestamp", "json", "fileRef" ] }, "nullable": { "type": "boolean" } }, "required": ["name", "type"], "additionalProperties": false } } }, "required": ["columns"], "additionalProperties": false } }, "required": ["id", "schema"], "additionalProperties": false } }, "required": ["kind", "dataset"], "additionalProperties": false }, "triggers": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["schedule"] }, "scheduleId": { "type": "string" } }, "required": ["type", "scheduleId"], "additionalProperties": false } }, "latestRun": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "syncId": { "type": "string" }, "datasetId": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append", "merge"] }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "rowsRead": { "type": "number" }, "output": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["datasetId", "versionId"], "additionalProperties": false }, "expectedLatestVersionId": { "type": "string" }, "commitMessage": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "sync.execution_failed" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false } }, "required": [ "id", "projectId", "syncId", "datasetId", "mode", "status", "queuedAt" ], "additionalProperties": false, "nullable": true } }, "required": ["id", "mode", "connector", "target", "triggers", "latestRun"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/sync-runs": { "get": { "summary": "List sync run history", "tags": ["Sync Runs"], "operationId": "listSyncRuns", "parameters": [ { "name": "syncId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "datasetId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] } }, { "name": "startedAfter", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "startedBefore", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "runs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "syncId": { "type": "string" }, "datasetId": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append", "merge"] }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "rowsRead": { "type": "number" }, "output": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["datasetId", "versionId"], "additionalProperties": false }, "expectedLatestVersionId": { "type": "string" }, "commitMessage": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "sync.execution_failed" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false } }, "required": [ "id", "projectId", "syncId", "datasetId", "mode", "status", "queuedAt" ], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["runs", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/syncs/{syncId}/runs": { "post": { "summary": "Request a sync run", "tags": ["Sync Runs"], "operationId": "requestSyncRun", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "syncId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "expectedLatestVersionId": { "type": "string" }, "commitMessage": { "type": "string" } }, "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "expectedLatestVersionId": { "type": "string" }, "commitMessage": { "type": "string" } }, "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "expectedLatestVersionId": { "type": "string" }, "commitMessage": { "type": "string" } }, "additionalProperties": false } } } }, "responses": { "202": { "description": "Response for status 202", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string" }, "jobId": { "type": "string" }, "syncId": { "type": "string" }, "queuedAt": { "type": "string" } }, "required": ["runId", "jobId", "syncId", "queuedAt"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/pipelines": { "get": { "summary": "List registered pipelines", "tags": ["Pipelines"], "operationId": "listPipelines", "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "triggers": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["schedule"] }, "scheduleId": { "type": "string" } }, "required": ["type", "scheduleId"], "additionalProperties": false } }, "graph": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["sequence"] }, "nodes": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["step"] }, "step": { "type": "object", "properties": { "id": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append"] }, "executor": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["sql"] }, "dialect": { "type": "string", "enum": ["duckdb"] } }, "required": ["kind", "dialect"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["run"] } }, "required": ["kind"], "additionalProperties": false } ] }, "inputs": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "dataset": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "primaryKey": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "minItems": 2 } ] }, "sequenceBy": { "type": "string" }, "partitionBy": { "type": "array", "items": { "type": "string" } }, "schema": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "boolean", "int64", "float64", "decimal", "date", "timestamp", "json", "fileRef" ] }, "nullable": { "type": "boolean" } }, "required": ["name", "type"], "additionalProperties": false } } }, "required": ["columns"], "additionalProperties": false } }, "required": ["id", "schema"], "additionalProperties": false } }, "required": ["name", "dataset"], "additionalProperties": false } }, "output": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "primaryKey": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "minItems": 2 } ] }, "sequenceBy": { "type": "string" }, "partitionBy": { "type": "array", "items": { "type": "string" } }, "schema": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "boolean", "int64", "float64", "decimal", "date", "timestamp", "json", "fileRef" ] }, "nullable": { "type": "boolean" } }, "required": ["name", "type"], "additionalProperties": false } } }, "required": ["columns"], "additionalProperties": false } }, "required": ["id", "schema"], "additionalProperties": false } }, "required": ["id", "mode", "executor", "inputs", "output"], "additionalProperties": false } }, "required": ["kind", "step"], "additionalProperties": false } } }, "required": ["kind", "nodes"], "additionalProperties": false }, "latestRun": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "pipelineId": { "type": "string" }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "output": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["datasetId", "versionId"], "additionalProperties": false }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "pipeline.step_failed" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false } }, "required": ["id", "projectId", "pipelineId", "status", "queuedAt"], "additionalProperties": false, "nullable": true } }, "required": ["id", "triggers", "graph", "latestRun"], "additionalProperties": false } } } } } } } }, "/api/pipelines/{pipelineId}": { "get": { "summary": "Get pipeline metadata", "tags": ["Pipelines"], "operationId": "getPipeline", "parameters": [ { "name": "pipelineId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "triggers": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["schedule"] }, "scheduleId": { "type": "string" } }, "required": ["type", "scheduleId"], "additionalProperties": false } }, "graph": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["sequence"] }, "nodes": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["step"] }, "step": { "type": "object", "properties": { "id": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append"] }, "executor": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["sql"] }, "dialect": { "type": "string", "enum": ["duckdb"] } }, "required": ["kind", "dialect"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["run"] } }, "required": ["kind"], "additionalProperties": false } ] }, "inputs": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "dataset": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "primaryKey": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "minItems": 2 } ] }, "sequenceBy": { "type": "string" }, "partitionBy": { "type": "array", "items": { "type": "string" } }, "schema": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "boolean", "int64", "float64", "decimal", "date", "timestamp", "json", "fileRef" ] }, "nullable": { "type": "boolean" } }, "required": ["name", "type"], "additionalProperties": false } } }, "required": ["columns"], "additionalProperties": false } }, "required": ["id", "schema"], "additionalProperties": false } }, "required": ["name", "dataset"], "additionalProperties": false } }, "output": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "primaryKey": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "minItems": 2 } ] }, "sequenceBy": { "type": "string" }, "partitionBy": { "type": "array", "items": { "type": "string" } }, "schema": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "string", "boolean", "int64", "float64", "decimal", "date", "timestamp", "json", "fileRef" ] }, "nullable": { "type": "boolean" } }, "required": ["name", "type"], "additionalProperties": false } } }, "required": ["columns"], "additionalProperties": false } }, "required": ["id", "schema"], "additionalProperties": false } }, "required": ["id", "mode", "executor", "inputs", "output"], "additionalProperties": false } }, "required": ["kind", "step"], "additionalProperties": false } } }, "required": ["kind", "nodes"], "additionalProperties": false }, "latestRun": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "pipelineId": { "type": "string" }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "output": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["datasetId", "versionId"], "additionalProperties": false }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "pipeline.step_failed" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false } }, "required": ["id", "projectId", "pipelineId", "status", "queuedAt"], "additionalProperties": false, "nullable": true } }, "required": ["id", "triggers", "graph", "latestRun"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/pipeline-runs": { "get": { "summary": "List pipeline run history", "tags": ["Pipeline Runs"], "operationId": "listPipelineRuns", "parameters": [ { "name": "pipelineId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] } }, { "name": "startedAfter", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "startedBefore", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "runs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "pipelineId": { "type": "string" }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "output": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["datasetId", "versionId"], "additionalProperties": false }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "pipeline.step_failed" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false } }, "required": ["id", "projectId", "pipelineId", "status", "queuedAt"], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["runs", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/pipeline-runs/{runId}": { "get": { "summary": "Get pipeline run detail", "tags": ["Pipeline Runs"], "operationId": "getPipelineRun", "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "run": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "pipelineId": { "type": "string" }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "output": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["datasetId", "versionId"], "additionalProperties": false }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "pipeline.step_failed" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false } }, "required": ["id", "projectId", "pipelineId", "status", "queuedAt"], "additionalProperties": false }, "steps": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "pipelineRunId": { "type": "string" }, "pipelineId": { "type": "string" }, "stepId": { "type": "string" }, "datasetId": { "type": "string" }, "mode": { "type": "string", "enum": ["snapshot", "append"] }, "status": { "type": "string", "enum": ["running", "succeeded", "failed", "cancelled"] }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "inputs": { "type": "array", "items": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["datasetId", "versionId"], "additionalProperties": false } }, "output": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["datasetId", "versionId"], "additionalProperties": false }, "rowsWritten": { "type": "number" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "pipeline.step_failed" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false } }, "required": [ "id", "projectId", "pipelineRunId", "pipelineId", "stepId", "datasetId", "mode", "status", "startedAt", "inputs" ], "additionalProperties": false } } }, "required": ["run", "steps"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/pipelines/{pipelineId}/runs": { "post": { "summary": "Request a pipeline run", "tags": ["Pipeline Runs"], "operationId": "requestPipelineRun", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "pipelineId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "202": { "description": "Response for status 202", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string" }, "jobId": { "type": "string" }, "pipelineId": { "type": "string" }, "queuedAt": { "type": "string" } }, "required": ["runId", "jobId", "pipelineId", "queuedAt"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/workflows": { "get": { "summary": "List registered workflows", "tags": ["Workflows"], "operationId": "listWorkflows", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "triggers": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["schedule"] }, "scheduleId": { "type": "string" } }, "required": ["type", "scheduleId"], "additionalProperties": false } }, "nodes": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["step"] }, "id": { "type": "string" }, "key": { "type": "string" }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "output": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "required": ["type", "id", "key", "input", "output"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["action"] }, "id": { "type": "string" }, "key": { "type": "string" }, "objectTypeId": { "type": "string" }, "params": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "required": ["type", "id", "key", "params"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["intervention"] }, "id": { "type": "string" }, "key": { "type": "string" }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "response": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "description": { "type": "string" } }, "required": ["type", "id", "key", "input", "response"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["agent"] }, "id": { "type": "string" }, "key": { "type": "string" }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "output": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "required": ["type", "id", "key", "input", "output"], "additionalProperties": false } ] } }, "latestRun": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "workflowId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "waiting", "succeeded", "failed", "cancelled" ] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "workflow.node_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } }, "required": [ "id", "projectId", "workflowId", "status", "startedAt", "requestedBy" ], "additionalProperties": false, "nullable": true } }, "required": ["id", "input", "triggers", "nodes", "latestRun"], "additionalProperties": false } } } } } } } }, "/api/workflows/{workflowId}": { "get": { "summary": "Get workflow metadata", "tags": ["Workflows"], "operationId": "getWorkflow", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "triggers": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["schedule"] }, "scheduleId": { "type": "string" } }, "required": ["type", "scheduleId"], "additionalProperties": false } }, "nodes": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["step"] }, "id": { "type": "string" }, "key": { "type": "string" }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "output": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "required": ["type", "id", "key", "input", "output"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["action"] }, "id": { "type": "string" }, "key": { "type": "string" }, "objectTypeId": { "type": "string" }, "params": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "required": ["type", "id", "key", "params"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["intervention"] }, "id": { "type": "string" }, "key": { "type": "string" }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "response": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "description": { "type": "string" } }, "required": ["type", "id", "key", "input", "response"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["agent"] }, "id": { "type": "string" }, "key": { "type": "string" }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "output": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "required": ["type", "id", "key", "input", "output"], "additionalProperties": false } ] } }, "latestRun": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "workflowId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "waiting", "succeeded", "failed", "cancelled" ] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "workflow.node_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } }, "required": [ "id", "projectId", "workflowId", "status", "startedAt", "requestedBy" ], "additionalProperties": false, "nullable": true } }, "required": ["id", "input", "triggers", "nodes", "latestRun"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/workflow-interventions": { "get": { "summary": "List workflow interventions", "tags": ["Workflow Interventions"], "operationId": "listWorkflowInterventions", "parameters": [ { "name": "workflowId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "workflowRunId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "nodeRunId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "nodeId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "nodeKey", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "interventionId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["pending", "submitted", "cancelled", "expired"] } }, { "name": "requestedAfter", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "requestedBefore", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "interventions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "workflowId": { "type": "string" }, "workflowRunId": { "type": "string" }, "nodeRunId": { "type": "string" }, "nodeIndex": { "type": "number" }, "nodeId": { "type": "string" }, "nodeKey": { "type": "string" }, "interventionId": { "type": "string" }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "defaultResponse": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "status": { "type": "string", "enum": ["pending", "submitted", "cancelled", "expired"] }, "requestedAt": { "type": "string" }, "expiresAt": { "type": "string" }, "submittedAt": { "type": "string" }, "submittedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "response": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "cancelledAt": { "type": "string" }, "cancelledBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "expiredAt": { "type": "string" } }, "required": [ "id", "projectId", "workflowId", "workflowRunId", "nodeRunId", "nodeIndex", "nodeId", "nodeKey", "interventionId", "input", "defaultResponse", "status", "requestedAt" ], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["interventions", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/workflow-interventions/{interventionId}": { "get": { "summary": "Get workflow intervention detail", "tags": ["Workflow Interventions"], "operationId": "getWorkflowIntervention", "parameters": [ { "name": "interventionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "workflowId": { "type": "string" }, "workflowRunId": { "type": "string" }, "nodeRunId": { "type": "string" }, "nodeIndex": { "type": "number" }, "nodeId": { "type": "string" }, "nodeKey": { "type": "string" }, "interventionId": { "type": "string" }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "defaultResponse": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "status": { "type": "string", "enum": ["pending", "submitted", "cancelled", "expired"] }, "requestedAt": { "type": "string" }, "expiresAt": { "type": "string" }, "submittedAt": { "type": "string" }, "submittedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "response": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "cancelledAt": { "type": "string" }, "cancelledBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "expiredAt": { "type": "string" } }, "required": [ "id", "projectId", "workflowId", "workflowRunId", "nodeRunId", "nodeIndex", "nodeId", "nodeKey", "interventionId", "input", "defaultResponse", "status", "requestedAt" ], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/workflow-interventions/{interventionId}/submit": { "post": { "summary": "Submit a workflow intervention response", "tags": ["Workflow Interventions"], "operationId": "submitWorkflowIntervention", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "interventionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "required": ["response"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "response": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "required": ["response"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "response": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "required": ["response"], "additionalProperties": false } } } }, "responses": { "202": { "description": "Response for status 202", "content": { "application/json": { "schema": { "type": "object", "properties": { "intervention": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "workflowId": { "type": "string" }, "workflowRunId": { "type": "string" }, "nodeRunId": { "type": "string" }, "nodeIndex": { "type": "number" }, "nodeId": { "type": "string" }, "nodeKey": { "type": "string" }, "interventionId": { "type": "string" }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "defaultResponse": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "status": { "type": "string", "enum": ["pending", "submitted", "cancelled", "expired"] }, "requestedAt": { "type": "string" }, "expiresAt": { "type": "string" }, "submittedAt": { "type": "string" }, "submittedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "response": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "cancelledAt": { "type": "string" }, "cancelledBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "expiredAt": { "type": "string" } }, "required": [ "id", "projectId", "workflowId", "workflowRunId", "nodeRunId", "nodeIndex", "nodeId", "nodeKey", "interventionId", "input", "defaultResponse", "status", "requestedAt" ], "additionalProperties": false }, "jobId": { "type": "string" } }, "required": ["intervention", "jobId"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/workflow-interventions/{interventionId}/cancel": { "post": { "summary": "Cancel a workflow intervention", "tags": ["Workflow Interventions"], "operationId": "cancelWorkflowIntervention", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "interventionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": {}, "additionalProperties": false, "default": {} } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": {}, "additionalProperties": false, "default": {} } }, "multipart/form-data": { "schema": { "type": "object", "properties": {}, "additionalProperties": false, "default": {} } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "intervention": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "workflowId": { "type": "string" }, "workflowRunId": { "type": "string" }, "nodeRunId": { "type": "string" }, "nodeIndex": { "type": "number" }, "nodeId": { "type": "string" }, "nodeKey": { "type": "string" }, "interventionId": { "type": "string" }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "defaultResponse": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "status": { "type": "string", "enum": ["pending", "submitted", "cancelled", "expired"] }, "requestedAt": { "type": "string" }, "expiresAt": { "type": "string" }, "submittedAt": { "type": "string" }, "submittedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "response": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "cancelledAt": { "type": "string" }, "cancelledBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "expiredAt": { "type": "string" } }, "required": [ "id", "projectId", "workflowId", "workflowRunId", "nodeRunId", "nodeIndex", "nodeId", "nodeKey", "interventionId", "input", "defaultResponse", "status", "requestedAt" ], "additionalProperties": false } }, "required": ["intervention"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/workflow-runs": { "get": { "summary": "List workflow run history", "tags": ["Workflow Runs"], "operationId": "listWorkflowRuns", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "workflowId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["queued", "running", "waiting", "succeeded", "failed", "cancelled"] } }, { "name": "startedAfter", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "startedBefore", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "runs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "workflowId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "waiting", "succeeded", "failed", "cancelled" ] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "workflow.node_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } }, "required": [ "id", "projectId", "workflowId", "status", "startedAt", "requestedBy" ], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["runs", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/workflow-runs/{runId}": { "get": { "summary": "Get workflow run detail", "tags": ["Workflow Runs"], "operationId": "getWorkflowRun", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "run": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "workflowId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "waiting", "succeeded", "failed", "cancelled" ] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "workflow.node_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "output": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "required": [ "id", "projectId", "workflowId", "status", "startedAt", "requestedBy", "input" ], "additionalProperties": false }, "nodes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "workflowRunId": { "type": "string" }, "workflowId": { "type": "string" }, "nodeIndex": { "type": "number" }, "nodeType": { "type": "string", "enum": ["step", "action", "intervention", "agent"] }, "nodeId": { "type": "string" }, "nodeKey": { "type": "string" }, "status": { "type": "string", "enum": ["running", "waiting", "succeeded", "failed", "cancelled"] }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "output": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "workflow.node_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "agentExecution": { "type": "object", "properties": { "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "attempt": { "type": "integer", "minimum": 0 }, "modelId": { "type": "string" }, "finishReason": { "type": "string" }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false }, "cost": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "startedAt": { "type": "string" }, "completedAt": { "type": "string" } }, "required": ["status", "attempt"], "additionalProperties": false } }, "required": [ "id", "projectId", "workflowRunId", "workflowId", "nodeIndex", "nodeType", "nodeId", "nodeKey", "status", "input", "startedAt" ], "additionalProperties": false } } }, "required": ["run", "nodes"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/workflow-runs/{runId}/nodes/{nodeKey}/agent-execution": { "get": { "summary": "Get workflow agent node execution detail", "tags": ["Workflow Runs"], "operationId": "getWorkflowAgentNodeExecution", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "nodeKey", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "attempt": { "type": "integer", "minimum": 0 }, "modelId": { "type": "string" }, "finishReason": { "type": "string" }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false }, "cost": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "startedAt": { "type": "string" }, "completedAt": { "type": "string" }, "nodeRunId": { "type": "string" }, "prompt": { "type": "string" }, "trace": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["text"] }, "text": { "type": "string" }, "providerMetadata": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["type", "text"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["reasoning"] }, "text": { "type": "string" }, "providerMetadata": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["type", "text"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["step-start"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["file"] }, "fileRef": { "type": "object", "properties": { "blobId": { "type": "string" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "fileName": { "type": "string" }, "mediaType": { "type": "string" }, "logicalPath": { "type": "string" } }, "required": ["blobId", "digest", "sizeBytes"], "additionalProperties": false }, "providerMetadata": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["type", "fileRef"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["provider-state"] }, "providerId": { "type": "string" }, "data": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["type", "providerId", "data"], "additionalProperties": false }, { "type": "object", "properties": { "context": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "ref": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "primaryId"], "additionalProperties": false } }, "required": ["kind", "ref"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["app-state"] }, "id": { "type": "string", "minLength": 1 }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "value": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["kind", "id", "label", "description", "value"], "additionalProperties": false } ] }, "origin": { "type": "string", "enum": ["ambient", "explicit"] }, "type": { "type": "string", "enum": ["context"] } }, "required": ["context", "origin", "type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["tool-call"] }, "toolCallId": { "type": "string" }, "toolName": { "type": "string" }, "dynamic": { "type": "boolean" }, "providerExecuted": { "type": "boolean" }, "input": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "providerMetadata": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "state": { "type": "string", "enum": ["output-available"] }, "output": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": [ "type", "toolCallId", "toolName", "input", "state", "output" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["tool-call"] }, "toolCallId": { "type": "string" }, "toolName": { "type": "string" }, "dynamic": { "type": "boolean" }, "providerExecuted": { "type": "boolean" }, "input": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "providerMetadata": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "state": { "type": "string", "enum": ["output-error"] }, "errorText": { "type": "string" } }, "required": [ "type", "toolCallId", "toolName", "input", "state", "errorText" ], "additionalProperties": false } ] } }, "diagnostics": { "type": "array", "items": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "failurePhase": { "type": "string", "enum": ["agent-loop", "structured-finalizer"] }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "agent.execution_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "createdAt": { "type": "string" } }, "required": ["status", "attempt", "nodeRunId", "prompt", "createdAt"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/workflow-runs/{runId}/cancel": { "post": { "summary": "Cancel a workflow run", "tags": ["Workflow Runs"], "operationId": "cancelWorkflowRun", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": {}, "additionalProperties": false, "default": {} } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": {}, "additionalProperties": false, "default": {} } }, "multipart/form-data": { "schema": { "type": "object", "properties": {}, "additionalProperties": false, "default": {} } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "run": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "workflowId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "waiting", "succeeded", "failed", "cancelled" ] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "workflow.node_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "output": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "required": [ "id", "projectId", "workflowId", "status", "startedAt", "requestedBy", "input" ], "additionalProperties": false }, "nodes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "workflowRunId": { "type": "string" }, "workflowId": { "type": "string" }, "nodeIndex": { "type": "number" }, "nodeType": { "type": "string", "enum": ["step", "action", "intervention", "agent"] }, "nodeId": { "type": "string" }, "nodeKey": { "type": "string" }, "status": { "type": "string", "enum": ["running", "waiting", "succeeded", "failed", "cancelled"] }, "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "output": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "workflow.node_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "agentExecution": { "type": "object", "properties": { "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "attempt": { "type": "integer", "minimum": 0 }, "modelId": { "type": "string" }, "finishReason": { "type": "string" }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false }, "cost": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "startedAt": { "type": "string" }, "completedAt": { "type": "string" } }, "required": ["status", "attempt"], "additionalProperties": false } }, "required": [ "id", "projectId", "workflowRunId", "workflowId", "nodeIndex", "nodeType", "nodeId", "nodeKey", "status", "input", "startedAt" ], "additionalProperties": false } } }, "required": ["run", "nodes"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/workflow-runs/{runId}/files/content": { "get": { "summary": "Get workflow run file content", "tags": ["Workflows"], "operationId": "getWorkflowRunFileContent", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "File content", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "206": { "description": "Partial file content", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "304": { "description": "File representation is unchanged; reuse the privately cached content" }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "416": { "description": "Requested byte range is not satisfiable" }, "501": { "description": "The storage role backing this content is not configured", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "audience", "in": "query", "required": false, "schema": { "type": "string", "enum": ["atlas", "app"], "description": "Session audience for file navigation without Origin; must match Origin when present" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "^\\/(?:input|output)(?:\\/|$)" } }, { "name": "disposition", "in": "query", "required": false, "schema": { "type": "string", "enum": ["inline", "attachment"] } }, { "name": "v", "in": "query", "required": false, "schema": { "type": "string", "description": "Client cache key; the route still resolves the current file" } } ] }, "head": { "summary": "Head workflow run file content", "tags": ["Workflows"], "operationId": "headWorkflowRunFileContent", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "File content headers" }, "206": { "description": "Partial file content headers" }, "304": { "description": "File representation is unchanged; reuse the privately cached content" }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "416": { "description": "Requested byte range is not satisfiable" }, "501": { "description": "The storage role backing this content is not configured", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "audience", "in": "query", "required": false, "schema": { "type": "string", "enum": ["atlas", "app"], "description": "Session audience for file navigation without Origin; must match Origin when present" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "^\\/(?:input|output)(?:\\/|$)" } }, { "name": "disposition", "in": "query", "required": false, "schema": { "type": "string", "enum": ["inline", "attachment"] } }, { "name": "v", "in": "query", "required": false, "schema": { "type": "string", "description": "Client cache key; the route still resolves the current file" } } ] } }, "/api/workflow-runs/{runId}/nodes/{nodeKey}/files/content": { "get": { "summary": "Get workflow node run file content", "tags": ["Workflows"], "operationId": "getWorkflowNodeRunFileContent", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "File content", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "206": { "description": "Partial file content", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "304": { "description": "File representation is unchanged; reuse the privately cached content" }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "416": { "description": "Requested byte range is not satisfiable" }, "501": { "description": "The storage role backing this content is not configured", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "nodeKey", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "audience", "in": "query", "required": false, "schema": { "type": "string", "enum": ["atlas", "app"], "description": "Session audience for file navigation without Origin; must match Origin when present" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "^\\/(?:input|output)(?:\\/|$)" } }, { "name": "disposition", "in": "query", "required": false, "schema": { "type": "string", "enum": ["inline", "attachment"] } }, { "name": "v", "in": "query", "required": false, "schema": { "type": "string", "description": "Client cache key; the route still resolves the current file" } } ] }, "head": { "summary": "Head workflow node run file content", "tags": ["Workflows"], "operationId": "headWorkflowNodeRunFileContent", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "File content headers" }, "206": { "description": "Partial file content headers" }, "304": { "description": "File representation is unchanged; reuse the privately cached content" }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "416": { "description": "Requested byte range is not satisfiable" }, "501": { "description": "The storage role backing this content is not configured", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "nodeKey", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "audience", "in": "query", "required": false, "schema": { "type": "string", "enum": ["atlas", "app"], "description": "Session audience for file navigation without Origin; must match Origin when present" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "^\\/(?:input|output)(?:\\/|$)" } }, { "name": "disposition", "in": "query", "required": false, "schema": { "type": "string", "enum": ["inline", "attachment"] } }, { "name": "v", "in": "query", "required": false, "schema": { "type": "string", "description": "Client cache key; the route still resolves the current file" } } ] } }, "/api/workflows/{workflowId}/runs": { "post": { "summary": "Request a workflow run", "tags": ["Workflow Runs"], "operationId": "requestWorkflowRun", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "workflowId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "additionalProperties": false, "default": {} } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "additionalProperties": false, "default": {} } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "input": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "additionalProperties": false, "default": {} } } } }, "responses": { "202": { "description": "Response for status 202", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string" }, "jobId": { "type": "string" }, "workflowId": { "type": "string" }, "queuedAt": { "type": "string" } }, "required": ["runId", "jobId", "workflowId", "queuedAt"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/rules": { "get": { "summary": "List registered rules", "tags": ["Rules"], "operationId": "listRules", "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["rule"] }, "id": { "type": "string" }, "subject": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "objectTypeId": { "type": "string" } }, "required": ["kind", "objectTypeId"], "additionalProperties": false }, "predicate": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["all"] }, "predicates": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["all"] }, "predicates": { "type": "array", "items": {} } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["any"] }, "predicates": { "type": "array", "items": {} } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["not"] }, "predicate": {} }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["property"] }, "propertyId": { "type": "string" }, "op": { "type": "string", "enum": [ "eq", "notEq", "gt", "gte", "lt", "lte", "isPresent", "isMissing" ] }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ], "nullable": true } }, "required": ["kind", "propertyId", "op"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["link"] }, "linkId": { "type": "string" }, "op": { "type": "string", "enum": ["exists", "isMissing"] } }, "required": ["kind", "linkId", "op"], "additionalProperties": false } ] } } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["any"] }, "predicates": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["all"] }, "predicates": { "type": "array", "items": {} } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["any"] }, "predicates": { "type": "array", "items": {} } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["not"] }, "predicate": {} }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["property"] }, "propertyId": { "type": "string" }, "op": { "type": "string", "enum": [ "eq", "notEq", "gt", "gte", "lt", "lte", "isPresent", "isMissing" ] }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ], "nullable": true } }, "required": ["kind", "propertyId", "op"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["link"] }, "linkId": { "type": "string" }, "op": { "type": "string", "enum": ["exists", "isMissing"] } }, "required": ["kind", "linkId", "op"], "additionalProperties": false } ] } } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["not"] }, "predicate": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["all"] }, "predicates": { "type": "array", "items": {} } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["any"] }, "predicates": { "type": "array", "items": {} } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["not"] }, "predicate": {} }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["property"] }, "propertyId": { "type": "string" }, "op": { "type": "string", "enum": [ "eq", "notEq", "gt", "gte", "lt", "lte", "isPresent", "isMissing" ] }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ], "nullable": true } }, "required": ["kind", "propertyId", "op"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["link"] }, "linkId": { "type": "string" }, "op": { "type": "string", "enum": ["exists", "isMissing"] } }, "required": ["kind", "linkId", "op"], "additionalProperties": false } ] } }, "required": ["kind", "predicate"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["property"] }, "propertyId": { "type": "string" }, "op": { "type": "string", "enum": [ "eq", "notEq", "gt", "gte", "lt", "lte", "isPresent", "isMissing" ] }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ], "nullable": true } }, "required": ["kind", "propertyId", "op"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["link"] }, "linkId": { "type": "string" }, "op": { "type": "string", "enum": ["exists", "isMissing"] } }, "required": ["kind", "linkId", "op"], "additionalProperties": false } ] }, "dependencies": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["object.created", "object.updated", "object.deleted"] }, "objectTypeId": { "type": "string" } }, "required": ["type", "objectTypeId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["link.created", "link.updated", "link.deleted"] }, "sourceTypeId": { "type": "string" }, "linkId": { "type": "string" } }, "required": ["type", "sourceTypeId", "linkId"], "additionalProperties": false } ] } } }, "required": ["kind", "id", "subject", "predicate", "dependencies"], "additionalProperties": false } } } } } } } }, "/api/rules/{ruleId}": { "get": { "summary": "Get rule metadata", "tags": ["Rules"], "operationId": "getRule", "parameters": [ { "name": "ruleId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["rule"] }, "id": { "type": "string" }, "subject": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "objectTypeId": { "type": "string" } }, "required": ["kind", "objectTypeId"], "additionalProperties": false }, "predicate": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["all"] }, "predicates": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["all"] }, "predicates": { "type": "array", "items": {} } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["any"] }, "predicates": { "type": "array", "items": {} } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["not"] }, "predicate": {} }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["property"] }, "propertyId": { "type": "string" }, "op": { "type": "string", "enum": [ "eq", "notEq", "gt", "gte", "lt", "lte", "isPresent", "isMissing" ] }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ], "nullable": true } }, "required": ["kind", "propertyId", "op"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["link"] }, "linkId": { "type": "string" }, "op": { "type": "string", "enum": ["exists", "isMissing"] } }, "required": ["kind", "linkId", "op"], "additionalProperties": false } ] } } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["any"] }, "predicates": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["all"] }, "predicates": { "type": "array", "items": {} } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["any"] }, "predicates": { "type": "array", "items": {} } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["not"] }, "predicate": {} }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["property"] }, "propertyId": { "type": "string" }, "op": { "type": "string", "enum": [ "eq", "notEq", "gt", "gte", "lt", "lte", "isPresent", "isMissing" ] }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ], "nullable": true } }, "required": ["kind", "propertyId", "op"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["link"] }, "linkId": { "type": "string" }, "op": { "type": "string", "enum": ["exists", "isMissing"] } }, "required": ["kind", "linkId", "op"], "additionalProperties": false } ] } } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["not"] }, "predicate": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["all"] }, "predicates": { "type": "array", "items": {} } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["any"] }, "predicates": { "type": "array", "items": {} } }, "required": ["kind", "predicates"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["not"] }, "predicate": {} }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["property"] }, "propertyId": { "type": "string" }, "op": { "type": "string", "enum": [ "eq", "notEq", "gt", "gte", "lt", "lte", "isPresent", "isMissing" ] }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ], "nullable": true } }, "required": ["kind", "propertyId", "op"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["link"] }, "linkId": { "type": "string" }, "op": { "type": "string", "enum": ["exists", "isMissing"] } }, "required": ["kind", "linkId", "op"], "additionalProperties": false } ] } }, "required": ["kind", "predicate"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["property"] }, "propertyId": { "type": "string" }, "op": { "type": "string", "enum": [ "eq", "notEq", "gt", "gte", "lt", "lte", "isPresent", "isMissing" ] }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ], "nullable": true } }, "required": ["kind", "propertyId", "op"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["link"] }, "linkId": { "type": "string" }, "op": { "type": "string", "enum": ["exists", "isMissing"] } }, "required": ["kind", "linkId", "op"], "additionalProperties": false } ] }, "dependencies": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["object.created", "object.updated", "object.deleted"] }, "objectTypeId": { "type": "string" } }, "required": ["type", "objectTypeId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["link.created", "link.updated", "link.deleted"] }, "sourceTypeId": { "type": "string" }, "linkId": { "type": "string" } }, "required": ["type", "sourceTypeId", "linkId"], "additionalProperties": false } ] } } }, "required": ["kind", "id", "subject", "predicate", "dependencies"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/rule-states": { "get": { "summary": "List active rule states", "tags": ["Rule States"], "operationId": "listRuleStates", "parameters": [ { "name": "ruleId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "objectTypeId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "primaryId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "states": { "type": "array", "items": { "type": "object", "properties": { "projectId": { "type": "string" }, "ruleId": { "type": "string" }, "subject": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "objectTypeId": { "type": "string" }, "primaryId": { "type": "string" } }, "required": ["kind", "objectTypeId", "primaryId"], "additionalProperties": false }, "triggeredAt": { "type": "string" } }, "required": ["projectId", "ruleId", "subject", "triggeredAt"], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["states", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/share-grants": { "post": { "summary": "Issue a shared-access grant", "tags": ["Shared Access"], "operationId": "issueSharedAccessGrant", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "definitionId": { "type": "string", "minLength": 1 }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "primaryId"], "additionalProperties": false }, "destinationPath": { "type": "string", "minLength": 1, "maxLength": 4096 }, "expiresAt": { "type": "string", "format": "date-time" } }, "required": ["definitionId", "target", "destinationPath", "expiresAt"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "definitionId": { "type": "string", "minLength": 1 }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "primaryId"], "additionalProperties": false }, "destinationPath": { "type": "string", "minLength": 1, "maxLength": 4096 }, "expiresAt": { "type": "string", "format": "date-time" } }, "required": ["definitionId", "target", "destinationPath", "expiresAt"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "definitionId": { "type": "string", "minLength": 1 }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "primaryId"], "additionalProperties": false }, "destinationPath": { "type": "string", "minLength": 1, "maxLength": 4096 }, "expiresAt": { "type": "string", "format": "date-time" } }, "required": ["definitionId", "target", "destinationPath", "expiresAt"], "additionalProperties": false } } } }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "type": "object", "properties": { "grant": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "definitionId": { "type": "string", "minLength": 1 }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "primaryId"], "additionalProperties": false }, "issuedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "destinationPath": { "type": "string", "minLength": 1, "maxLength": 4096 }, "createdAt": { "type": "string", "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" }, "revokedAt": { "type": "string", "format": "date-time" }, "revokedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } }, "required": [ "id", "definitionId", "target", "issuedBy", "destinationPath", "createdAt", "expiresAt" ], "additionalProperties": false }, "url": { "type": "string", "pattern": "^\\/shared\\/" } }, "required": ["grant", "url"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } }, "get": { "summary": "List shared-access grants", "tags": ["Shared Access"], "operationId": "listSharedAccessGrants", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "definitionId", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "primaryId", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1 } }, { "name": "includeRevoked", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "includeExpired", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 200 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "grants": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "definitionId": { "type": "string", "minLength": 1 }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "primaryId"], "additionalProperties": false }, "issuedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "destinationPath": { "type": "string", "minLength": 1, "maxLength": 4096 }, "createdAt": { "type": "string", "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" }, "revokedAt": { "type": "string", "format": "date-time" }, "revokedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } }, "required": [ "id", "definitionId", "target", "issuedBy", "destinationPath", "createdAt", "expiresAt" ], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "integer", "minimum": 0 } }, "required": ["grants", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/share-grants/{grantId}": { "delete": { "summary": "Revoke a shared-access grant", "tags": ["Shared Access"], "operationId": "revokeSharedAccessGrant", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "grantId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "grant": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "definitionId": { "type": "string", "minLength": 1 }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "primaryId"], "additionalProperties": false }, "issuedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "destinationPath": { "type": "string", "minLength": 1, "maxLength": 4096 }, "createdAt": { "type": "string", "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" }, "revokedAt": { "type": "string", "format": "date-time" }, "revokedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false } }, "required": [ "id", "definitionId", "target", "issuedBy", "destinationPath", "createdAt", "expiresAt" ], "additionalProperties": false } }, "required": ["grant"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/shared-access/{grantId}/exchange": { "post": { "summary": "Exchange a shared link for a short-lived session", "tags": ["Shared Access"], "operationId": "exchangeSharedAccess", "security": [], "parameters": [ { "name": "grantId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "secret": { "type": "string", "pattern": "^[A-Za-z0-9_-]{43}$" } }, "required": ["secret"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "secret": { "type": "string", "pattern": "^[A-Za-z0-9_-]{43}$" } }, "required": ["secret"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "secret": { "type": "string", "pattern": "^[A-Za-z0-9_-]{43}$" } }, "required": ["secret"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "grantId": { "type": "string", "minLength": 1, "maxLength": 128 }, "destinationPath": { "type": "string", "minLength": 1, "maxLength": 4096 }, "expiresAt": { "type": "string", "format": "date-time" }, "absoluteExpiresAt": { "type": "string", "format": "date-time" }, "csrfToken": { "type": "string", "pattern": "^[A-Za-z0-9_-]{43}$" } }, "required": [ "grantId", "destinationPath", "expiresAt", "absoluteExpiresAt", "csrfToken" ], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/shared-access/{grantId}/session": { "get": { "summary": "Get the current shared-access session", "tags": ["Shared Access"], "operationId": "getSharedAccessSession", "security": [], "parameters": [ { "name": "grantId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "grantId": { "type": "string", "minLength": 1, "maxLength": 128 }, "destinationPath": { "type": "string", "minLength": 1, "maxLength": 4096 }, "expiresAt": { "type": "string", "format": "date-time" }, "absoluteExpiresAt": { "type": "string", "format": "date-time" }, "csrfToken": { "type": "string", "pattern": "^[A-Za-z0-9_-]{43}$" } }, "required": [ "grantId", "destinationPath", "expiresAt", "absoluteExpiresAt", "csrfToken" ], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/shared-access/{grantId}/sign-out": { "post": { "summary": "Sign out a shared-access session", "tags": ["Shared Access"], "operationId": "signOutSharedAccess", "security": [ { "sixbCsrf": [] }, {} ], "parameters": [ { "name": "grantId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "signedOut": { "type": "boolean", "enum": [true] } }, "required": ["signedOut"], "additionalProperties": false } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/object-types": { "get": { "summary": "List registered object types", "tags": ["Ontology"], "operationId": "listObjectTypes", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [] } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "extends": { "type": "string" }, "implements": { "type": "array", "items": { "type": "string" } }, "properties": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "mode": { "type": "string", "enum": ["static", "telemetry"] }, "required": { "type": "boolean" }, "nullable": { "type": "boolean" }, "primary": { "type": "boolean" }, "semanticType": { "type": "string" }, "schema": {}, "query": { "type": "object", "properties": { "searchable": { "type": "boolean" }, "filterable": { "type": "boolean" }, "sortable": { "type": "boolean" }, "text": { "type": "boolean" }, "exact": { "type": "boolean" }, "facet": { "type": "boolean" }, "weight": { "type": "number" } }, "additionalProperties": false }, "capabilities": { "type": "object", "properties": { "operators": { "type": "array", "items": { "type": "string", "enum": [ "eq", "neq", "lt", "lte", "gt", "gte", "in", "exists", "contains" ] } }, "sortable": { "type": "boolean" }, "facet": { "type": "boolean" }, "text": { "type": "boolean" } }, "required": ["operators", "sortable", "facet", "text"], "additionalProperties": false, "description": "What object queries accept for this property, resolved from its schema and query metadata." } }, "required": ["id", "name", "capabilities"], "additionalProperties": false } }, "search": { "type": "object", "properties": { "title": { "type": "string" }, "defaultText": { "type": "array", "items": { "type": "string" } }, "exact": { "type": "array", "items": { "type": "string" } }, "vectors": { "type": "object", "additionalProperties": { "type": "object", "properties": { "source": { "type": "array", "items": { "type": "string" } }, "model": { "type": "object", "properties": { "providerId": { "type": "string" }, "modelId": { "type": "string" }, "dimensions": { "type": "integer", "exclusiveMinimum": true, "minimum": 0 }, "inputMode": { "type": "string", "enum": ["symmetric", "asymmetric"] }, "representation": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "required": ["providerId", "modelId", "dimensions"], "additionalProperties": false } }, "required": ["source", "model"], "additionalProperties": false } } }, "additionalProperties": false }, "links": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "targetObjectTypeId": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "cardinality": { "type": "string", "enum": ["one", "many"] }, "properties": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "mode": { "type": "string", "enum": ["static", "telemetry"] }, "required": { "type": "boolean" }, "nullable": { "type": "boolean" }, "primary": { "type": "boolean" }, "semanticType": { "type": "string" }, "schema": {}, "query": { "type": "object", "properties": { "searchable": { "type": "boolean" }, "filterable": { "type": "boolean" }, "sortable": { "type": "boolean" }, "text": { "type": "boolean" }, "exact": { "type": "boolean" }, "facet": { "type": "boolean" }, "weight": { "type": "number" } }, "additionalProperties": false } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": ["id", "name", "targetObjectTypeId"], "additionalProperties": false } }, "actions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "params": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "nullable": { "type": "boolean" }, "semanticType": { "type": "string" }, "schema": {} }, "required": ["id", "name"], "additionalProperties": false } } }, "required": ["id", "name", "params"], "additionalProperties": false } } }, "required": ["id", "name", "properties", "links", "actions"], "additionalProperties": false } } } } } } } }, "/api/object-types/{objectTypeId}": { "get": { "summary": "Get object type definition", "tags": ["Ontology"], "operationId": "getObjectType", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [] } ], "parameters": [ { "name": "objectTypeId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "extends": { "type": "string" }, "implements": { "type": "array", "items": { "type": "string" } }, "properties": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "mode": { "type": "string", "enum": ["static", "telemetry"] }, "required": { "type": "boolean" }, "nullable": { "type": "boolean" }, "primary": { "type": "boolean" }, "semanticType": { "type": "string" }, "schema": {}, "query": { "type": "object", "properties": { "searchable": { "type": "boolean" }, "filterable": { "type": "boolean" }, "sortable": { "type": "boolean" }, "text": { "type": "boolean" }, "exact": { "type": "boolean" }, "facet": { "type": "boolean" }, "weight": { "type": "number" } }, "additionalProperties": false }, "capabilities": { "type": "object", "properties": { "operators": { "type": "array", "items": { "type": "string", "enum": [ "eq", "neq", "lt", "lte", "gt", "gte", "in", "exists", "contains" ] } }, "sortable": { "type": "boolean" }, "facet": { "type": "boolean" }, "text": { "type": "boolean" } }, "required": ["operators", "sortable", "facet", "text"], "additionalProperties": false, "description": "What object queries accept for this property, resolved from its schema and query metadata." } }, "required": ["id", "name", "capabilities"], "additionalProperties": false } }, "search": { "type": "object", "properties": { "title": { "type": "string" }, "defaultText": { "type": "array", "items": { "type": "string" } }, "exact": { "type": "array", "items": { "type": "string" } }, "vectors": { "type": "object", "additionalProperties": { "type": "object", "properties": { "source": { "type": "array", "items": { "type": "string" } }, "model": { "type": "object", "properties": { "providerId": { "type": "string" }, "modelId": { "type": "string" }, "dimensions": { "type": "integer", "exclusiveMinimum": true, "minimum": 0 }, "inputMode": { "type": "string", "enum": ["symmetric", "asymmetric"] }, "representation": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "required": ["providerId", "modelId", "dimensions"], "additionalProperties": false } }, "required": ["source", "model"], "additionalProperties": false } } }, "additionalProperties": false }, "links": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "targetObjectTypeId": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "cardinality": { "type": "string", "enum": ["one", "many"] }, "properties": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "mode": { "type": "string", "enum": ["static", "telemetry"] }, "required": { "type": "boolean" }, "nullable": { "type": "boolean" }, "primary": { "type": "boolean" }, "semanticType": { "type": "string" }, "schema": {}, "query": { "type": "object", "properties": { "searchable": { "type": "boolean" }, "filterable": { "type": "boolean" }, "sortable": { "type": "boolean" }, "text": { "type": "boolean" }, "exact": { "type": "boolean" }, "facet": { "type": "boolean" }, "weight": { "type": "number" } }, "additionalProperties": false } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": ["id", "name", "targetObjectTypeId"], "additionalProperties": false } }, "actions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "params": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "nullable": { "type": "boolean" }, "semanticType": { "type": "string" }, "schema": {} }, "required": ["id", "name"], "additionalProperties": false } } }, "required": ["id", "name", "params"], "additionalProperties": false } } }, "required": ["id", "name", "properties", "links", "actions"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/objects/search": { "get": { "summary": "Search objects", "tags": ["Objects"], "operationId": "searchObjects", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [] } ], "parameters": [ { "name": "q", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 200 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^\\d+$" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "ref": { "type": "object", "properties": { "objectTypeId": { "type": "string" }, "primaryId": { "type": "string" } }, "required": ["objectTypeId", "primaryId"], "additionalProperties": false }, "label": { "type": "string" } }, "required": ["ref", "label"], "additionalProperties": false } } }, "required": ["items"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/objects": { "get": { "summary": "List objects", "tags": ["Objects"], "operationId": "listObjects", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [] } ], "parameters": [ { "name": "objectTypeId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "idPrefix", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "idSuffix", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "updatedAfter", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "updatedBefore", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "createdAfter", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "createdBefore", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "orderBy", "in": "query", "required": false, "schema": { "type": "string", "enum": ["createdAt", "updatedAt", "primaryId"] } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "objects": { "type": "array", "items": { "type": "object", "properties": { "score": { "type": "number" }, "primaryId": { "type": "string" }, "objectTypeId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": {} }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "primaryId", "objectTypeId", "properties", "createdAt", "updatedAt" ], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["objects", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/objects/query": { "post": { "summary": "Query objects", "tags": ["Objects"], "operationId": "queryObjects", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [], "sixbCsrf": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryRequest" } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryResponse" } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryErrorResponse" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "AI usage limit exceeded or unavailable", "headers": { "Retry-After": { "description": "Seconds until the budget period resets, when known", "schema": { "type": "integer" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AiUsageLimitErrorResponse" } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/objects/query/links": { "post": { "summary": "Query object links", "tags": ["Links"], "operationId": "queryObjectLinks", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [], "sixbCsrf": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryLinksRequest" } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryLinksResponse" } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryErrorResponse" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/objects/query/count": { "post": { "summary": "Count objects", "tags": ["Objects"], "operationId": "countObjects", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [], "sixbCsrf": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryCountRequest" } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryCountResponse" } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryErrorResponse" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "AI usage limit exceeded or unavailable", "headers": { "Retry-After": { "description": "Seconds until the budget period resets, when known", "schema": { "type": "integer" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AiUsageLimitErrorResponse" } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/objects/query/exists": { "post": { "summary": "Check object existence", "tags": ["Objects"], "operationId": "existsObjects", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [], "sixbCsrf": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryExistsRequest" } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryExistsResponse" } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryErrorResponse" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "AI usage limit exceeded or unavailable", "headers": { "Retry-After": { "description": "Seconds until the budget period resets, when known", "schema": { "type": "integer" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AiUsageLimitErrorResponse" } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/objects/query/facets": { "post": { "summary": "Facet objects", "tags": ["Objects"], "operationId": "facetObjects", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [], "sixbCsrf": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryFacetsRequest" } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryFacetsResponse" } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectQueryErrorResponse" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Response for status 500", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/objects/{objectTypeId}/{objectId}/files/content": { "get": { "summary": "Get object file content", "tags": ["Object Files"], "operationId": "getObjectFileContent", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [] } ], "responses": { "200": { "description": "File content", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "206": { "description": "Partial file content", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "304": { "description": "File representation is unchanged; reuse the privately cached content" }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "416": { "description": "Requested byte range is not satisfiable" } }, "parameters": [ { "name": "objectTypeId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "objectId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "audience", "in": "query", "required": false, "schema": { "type": "string", "enum": ["atlas", "app"], "description": "Session audience for file navigation without Origin; must match Origin when present" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "disposition", "in": "query", "required": false, "schema": { "type": "string", "enum": ["inline", "attachment"] } }, { "name": "v", "in": "query", "required": false, "schema": { "type": "string", "description": "Client cache key; the route still resolves the current file" } }, { "name": "shareGrant", "in": "query", "required": false, "schema": { "type": "string", "description": "Share grant selector for elements that cannot send the x-sixb-share-grant header" } } ] }, "head": { "summary": "Head object file content", "tags": ["Object Files"], "operationId": "headObjectFileContent", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [] } ], "responses": { "200": { "description": "File content headers" }, "206": { "description": "Partial file content headers" }, "304": { "description": "File representation is unchanged; reuse the privately cached content" }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "416": { "description": "Requested byte range is not satisfiable" } }, "parameters": [ { "name": "objectTypeId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "objectId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "audience", "in": "query", "required": false, "schema": { "type": "string", "enum": ["atlas", "app"], "description": "Session audience for file navigation without Origin; must match Origin when present" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "disposition", "in": "query", "required": false, "schema": { "type": "string", "enum": ["inline", "attachment"] } }, { "name": "v", "in": "query", "required": false, "schema": { "type": "string", "description": "Client cache key; the route still resolves the current file" } }, { "name": "shareGrant", "in": "query", "required": false, "schema": { "type": "string", "description": "Share grant selector for elements that cannot send the x-sixb-share-grant header" } } ] } }, "/api/objects/{objectTypeId}/{objectId}": { "get": { "summary": "Get object by id", "tags": ["Objects"], "operationId": "getObject", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [] } ], "parameters": [ { "name": "objectTypeId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "objectId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "score": { "type": "number" }, "primaryId": { "type": "string" }, "objectTypeId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": {} }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": ["primaryId", "objectTypeId", "properties", "createdAt", "updatedAt"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } }, "put": { "summary": "Create or update object", "tags": ["Objects"], "operationId": "upsertObject", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "objectTypeId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "objectId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": {} } }, "required": ["properties"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": {} } }, "required": ["properties"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": {} } }, "required": ["properties"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "score": { "type": "number" }, "primaryId": { "type": "string" }, "objectTypeId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": {} }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": ["primaryId", "objectTypeId", "properties", "createdAt", "updatedAt"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/actions": { "get": { "summary": "List registered actions", "tags": ["Actions"], "operationId": "listActions", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [] } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "objectTypeId": { "type": "string" }, "params": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "nullable": { "type": "boolean" }, "semanticType": { "type": "string" }, "schema": {} }, "required": ["id", "name"], "additionalProperties": false } }, "phases": { "type": "object", "properties": { "validate": { "type": "boolean" }, "writeback": { "type": "boolean" }, "edits": { "type": "boolean" }, "effects": { "type": "boolean" } }, "required": ["validate", "writeback", "edits", "effects"], "additionalProperties": false } }, "required": ["id", "name", "params", "phases"], "additionalProperties": false } } } } } } } }, "/api/actions/{actionId}": { "get": { "summary": "Get action metadata", "tags": ["Actions"], "operationId": "getAction", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [] } ], "parameters": [ { "name": "actionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "objectTypeId": { "type": "string" }, "params": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "nullable": { "type": "boolean" }, "semanticType": { "type": "string" }, "schema": {} }, "required": ["id", "name"], "additionalProperties": false } }, "phases": { "type": "object", "properties": { "validate": { "type": "boolean" }, "writeback": { "type": "boolean" }, "edits": { "type": "boolean" }, "effects": { "type": "boolean" } }, "required": ["validate", "writeback", "edits", "effects"], "additionalProperties": false }, "inputSchema": { "type": "object", "additionalProperties": {} } }, "required": ["id", "name", "params", "phases", "inputSchema"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } }, "post": { "summary": "Request an action", "tags": ["Actions"], "operationId": "requestAction", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [], "sixbCsrf": [] } ], "parameters": [ { "name": "actionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "subject": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["none"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["kind", "objectTypeId", "primaryId"], "additionalProperties": false } ] }, "params": { "type": "object", "additionalProperties": {} }, "runId": { "type": "string", "minLength": 1 } }, "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "subject": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["none"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["kind", "objectTypeId", "primaryId"], "additionalProperties": false } ] }, "params": { "type": "object", "additionalProperties": {} }, "runId": { "type": "string", "minLength": 1 } }, "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "subject": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["none"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["kind", "objectTypeId", "primaryId"], "additionalProperties": false } ] }, "params": { "type": "object", "additionalProperties": {} }, "runId": { "type": "string", "minLength": 1 } }, "additionalProperties": false } } } }, "responses": { "202": { "description": "Response for status 202", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string" }, "queuedAt": { "type": "string" }, "jobId": { "type": "string" }, "created": { "type": "boolean" } }, "required": ["runId", "queuedAt", "created"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/files": { "post": { "summary": "Upload a file", "tags": ["Files"], "operationId": "uploadFileRaw", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "required": ["file"], "properties": { "file": { "type": "string", "format": "binary" }, "logicalPath": { "type": "string" } } } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "blobId": { "type": "string" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "fileName": { "type": "string" }, "mediaType": { "type": "string" }, "logicalPath": { "type": "string" } }, "required": ["blobId", "digest", "sizeBytes"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Response for status 413", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/files/uploads": { "post": { "summary": "Create a staged file upload", "tags": ["Files"], "operationId": "createFileUpload", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "fileName": { "type": "string" }, "mediaType": { "type": "string" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "logicalPath": { "type": "string" } }, "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "fileName": { "type": "string" }, "mediaType": { "type": "string" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "logicalPath": { "type": "string" } }, "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "fileName": { "type": "string" }, "mediaType": { "type": "string" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "logicalPath": { "type": "string" } }, "additionalProperties": false } } } }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "strategy": { "type": "string", "enum": ["server"] }, "uploadId": { "type": "string" }, "method": { "type": "string", "enum": ["PUT"] }, "url": { "type": "string" }, "expiresAt": { "type": "string" } }, "required": ["strategy", "uploadId", "method", "url", "expiresAt"], "additionalProperties": false }, { "type": "object", "properties": { "strategy": { "type": "string", "enum": ["direct-put"] }, "uploadId": { "type": "string" }, "method": { "type": "string", "enum": ["PUT"] }, "url": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "expiresAt": { "type": "string" } }, "required": ["strategy", "uploadId", "method", "url", "headers", "expiresAt"], "additionalProperties": false }, { "type": "object", "properties": { "strategy": { "type": "string", "enum": ["multipart"] }, "partReceipt": { "type": "string", "enum": ["etag", "none"] }, "uploadId": { "type": "string" }, "partSizeBytes": { "type": "integer", "exclusiveMinimum": true, "minimum": 0 }, "expiresAt": { "type": "string" } }, "required": [ "strategy", "partReceipt", "uploadId", "partSizeBytes", "expiresAt" ], "additionalProperties": false } ] } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/files/uploads/{uploadId}/content": { "put": { "summary": "Upload staged file content through Sixb", "tags": ["Files"], "operationId": "uploadFileContent", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "parameters": [ { "name": "uploadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } }, "required": ["success"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "410": { "description": "Response for status 410", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/files/uploads/{uploadId}/parts/{partNumber}": { "post": { "summary": "Sign a staged multipart upload part", "tags": ["Files"], "operationId": "signFileUploadPart", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "uploadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "partNumber", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^\\d+$" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "partNumber": { "type": "integer", "exclusiveMinimum": true, "minimum": 0 }, "method": { "type": "string", "enum": ["PUT"] }, "url": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "expiresAt": { "type": "string" } }, "required": ["partNumber", "method", "url", "headers", "expiresAt"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "410": { "description": "Response for status 410", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/files/uploads/{uploadId}/complete": { "post": { "summary": "Complete a staged file upload", "tags": ["Files"], "operationId": "completeFileUpload", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "uploadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "sizeBytes": { "type": "integer", "minimum": 0 }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "parts": { "type": "array", "items": { "type": "object", "properties": { "partNumber": { "type": "integer", "exclusiveMinimum": true, "minimum": 0 }, "etag": { "type": "string", "minLength": 1 } }, "required": ["partNumber"], "additionalProperties": false } } }, "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "sizeBytes": { "type": "integer", "minimum": 0 }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "parts": { "type": "array", "items": { "type": "object", "properties": { "partNumber": { "type": "integer", "exclusiveMinimum": true, "minimum": 0 }, "etag": { "type": "string", "minLength": 1 } }, "required": ["partNumber"], "additionalProperties": false } } }, "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "sizeBytes": { "type": "integer", "minimum": 0 }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "parts": { "type": "array", "items": { "type": "object", "properties": { "partNumber": { "type": "integer", "exclusiveMinimum": true, "minimum": 0 }, "etag": { "type": "string", "minLength": 1 } }, "required": ["partNumber"], "additionalProperties": false } } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "blobId": { "type": "string" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "fileName": { "type": "string" }, "mediaType": { "type": "string" }, "logicalPath": { "type": "string" } }, "required": ["blobId", "digest", "sizeBytes"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "410": { "description": "Response for status 410", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/files/uploads/{uploadId}/abort": { "post": { "summary": "Abort a staged file upload", "tags": ["Files"], "operationId": "abortFileUpload", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "uploadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } }, "required": ["success"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "410": { "description": "Response for status 410", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/action-runs": { "get": { "summary": "List action run history", "tags": ["Action Runs"], "operationId": "listActionRuns", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "actionId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] } }, { "name": "objectTypeId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "primaryId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "startedAfter", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "startedBefore", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "runs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "actionId": { "type": "string" }, "subject": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["none"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["kind", "objectTypeId", "primaryId"], "additionalProperties": false } ] }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "phase": { "type": "string", "enum": [ "request", "enqueue", "validation", "writeback", "edits", "commit", "effects", "cancelled" ] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "action.phase_failed", "action.read_conflict" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "type": "object", "properties": { "actionId": { "type": "string" }, "runId": { "type": "string" }, "phase": { "type": "string", "enum": [ "request", "enqueue", "validation", "writeback", "edits", "commit", "effects", "cancelled" ] } }, "required": ["actionId", "runId", "phase"], "additionalProperties": false }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at", "details"], "additionalProperties": false } }, "required": [ "id", "projectId", "actionId", "subject", "status", "queuedAt" ], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["runs", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/action-runs/{runId}": { "get": { "summary": "Get action run detail", "tags": ["Action Runs"], "operationId": "getActionRun", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [] } ], "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "actionId": { "type": "string" }, "subject": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["none"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["kind", "objectTypeId", "primaryId"], "additionalProperties": false } ] }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "phase": { "type": "string", "enum": [ "request", "enqueue", "validation", "writeback", "edits", "commit", "effects", "cancelled" ] }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "action.phase_failed", "action.read_conflict" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "type": "object", "properties": { "actionId": { "type": "string" }, "runId": { "type": "string" }, "phase": { "type": "string", "enum": [ "request", "enqueue", "validation", "writeback", "edits", "commit", "effects", "cancelled" ] } }, "required": ["actionId", "runId", "phase"], "additionalProperties": false }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at", "details"], "additionalProperties": false }, "params": { "type": "object", "additionalProperties": {} }, "writeback": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "enum": ["succeeded"] }, "completedAt": { "type": "string" }, "result": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["status", "completedAt", "result"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["failed"] }, "completedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "action.phase_failed", "action.read_conflict" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "type": "object", "properties": { "actionId": { "type": "string" }, "runId": { "type": "string" }, "phase": { "type": "string", "enum": ["writeback"] } }, "required": ["actionId", "runId", "phase"], "additionalProperties": false }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at", "details"], "additionalProperties": false } }, "required": ["status", "completedAt", "error"], "additionalProperties": false } ] }, "effects": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "enum": ["succeeded"] }, "completedAt": { "type": "string" } }, "required": ["status", "completedAt"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["failed"] }, "completedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "action.phase_failed", "action.read_conflict" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "type": "object", "properties": { "actionId": { "type": "string" }, "runId": { "type": "string" }, "phase": { "type": "string", "enum": ["effects"] } }, "required": ["actionId", "runId", "phase"], "additionalProperties": false }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at", "details"], "additionalProperties": false } }, "required": ["status", "completedAt", "error"], "additionalProperties": false } ] } }, "required": [ "id", "projectId", "actionId", "subject", "status", "queuedAt", "params" ], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/action-runs/{runId}/files/content": { "get": { "summary": "Get action run file content", "tags": ["Actions"], "operationId": "getActionRunFileContent", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "File content", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "206": { "description": "Partial file content", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "304": { "description": "File representation is unchanged; reuse the privately cached content" }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "416": { "description": "Requested byte range is not satisfiable" }, "501": { "description": "The storage role backing this content is not configured", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "audience", "in": "query", "required": false, "schema": { "type": "string", "enum": ["atlas", "app"], "description": "Session audience for file navigation without Origin; must match Origin when present" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "^\\/(?:params|writeback\\/result)(?:\\/|$)" } }, { "name": "disposition", "in": "query", "required": false, "schema": { "type": "string", "enum": ["inline", "attachment"] } }, { "name": "v", "in": "query", "required": false, "schema": { "type": "string", "description": "Client cache key; the route still resolves the current file" } } ] }, "head": { "summary": "Head action run file content", "tags": ["Actions"], "operationId": "headActionRunFileContent", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "File content headers" }, "206": { "description": "Partial file content headers" }, "304": { "description": "File representation is unchanged; reuse the privately cached content" }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "416": { "description": "Requested byte range is not satisfiable" }, "501": { "description": "The storage role backing this content is not configured", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "audience", "in": "query", "required": false, "schema": { "type": "string", "enum": ["atlas", "app"], "description": "Session audience for file navigation without Origin; must match Origin when present" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "pattern": "^\\/(?:params|writeback\\/result)(?:\\/|$)" } }, { "name": "disposition", "in": "query", "required": false, "schema": { "type": "string", "enum": ["inline", "attachment"] } }, { "name": "v", "in": "query", "required": false, "schema": { "type": "string", "description": "Client cache key; the route still resolves the current file" } } ] } }, "/api/agent": { "get": { "summary": "Get the project Agent", "tags": ["Agents"], "operationId": "getAgent", "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "model": { "type": "object", "properties": { "provider": { "type": "string", "minLength": 1 }, "modelId": { "type": "string", "minLength": 1 } }, "required": ["provider", "modelId"], "additionalProperties": false } }, "required": ["name", "model"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/agent-threads": { "get": { "summary": "List agent threads", "tags": ["Agent Threads"], "operationId": "listAgentThreads", "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["active", "archived"] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "threads": { "type": "array", "items": { "type": "object", "properties": { "sandboxState": { "type": "object", "properties": { "name": { "type": "string" }, "status": { "type": "string", "enum": ["new", "busy", "ready", "blocked", "unavailable"] }, "initialized": { "type": "boolean" } }, "required": ["name", "status", "initialized"], "additionalProperties": false }, "id": { "type": "string" }, "projectId": { "type": "string" }, "ownerPrincipal": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "title": { "type": "string" }, "sandboxParams": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "status": { "type": "string", "enum": ["active", "archived"] }, "activeRunId": { "type": "string", "nullable": true }, "lastMessageAt": { "type": "string" }, "messageCount": { "type": "number" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "projectId", "ownerPrincipal", "status", "activeRunId", "messageCount", "createdAt", "updatedAt" ], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["threads", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } }, "post": { "summary": "Create an agent thread", "tags": ["Agent Threads"], "operationId": "createAgentThread", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "threadId": { "type": "string", "minLength": 1 }, "sandbox": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "threadId": { "type": "string", "minLength": 1 }, "sandbox": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "threadId": { "type": "string", "minLength": 1 }, "sandbox": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } } }, "additionalProperties": false } } } }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "type": "object", "properties": { "thread": { "type": "object", "properties": { "sandboxState": { "type": "object", "properties": { "name": { "type": "string" }, "status": { "type": "string", "enum": ["new", "busy", "ready", "blocked", "unavailable"] }, "initialized": { "type": "boolean" } }, "required": ["name", "status", "initialized"], "additionalProperties": false }, "id": { "type": "string" }, "projectId": { "type": "string" }, "ownerPrincipal": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "title": { "type": "string" }, "sandboxParams": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "status": { "type": "string", "enum": ["active", "archived"] }, "activeRunId": { "type": "string", "nullable": true }, "lastMessageAt": { "type": "string" }, "messageCount": { "type": "number" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "projectId", "ownerPrincipal", "status", "activeRunId", "messageCount", "createdAt", "updatedAt" ], "additionalProperties": false } }, "required": ["thread"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/agent-threads/{threadId}": { "get": { "summary": "Get agent thread", "tags": ["Agent Threads"], "operationId": "getAgentThread", "parameters": [ { "name": "threadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "sandboxState": { "type": "object", "properties": { "name": { "type": "string" }, "status": { "type": "string", "enum": ["new", "busy", "ready", "blocked", "unavailable"] }, "initialized": { "type": "boolean" } }, "required": ["name", "status", "initialized"], "additionalProperties": false }, "id": { "type": "string" }, "projectId": { "type": "string" }, "ownerPrincipal": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "title": { "type": "string" }, "sandboxParams": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "status": { "type": "string", "enum": ["active", "archived"] }, "activeRunId": { "type": "string", "nullable": true }, "lastMessageAt": { "type": "string" }, "messageCount": { "type": "number" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "projectId", "ownerPrincipal", "status", "activeRunId", "messageCount", "createdAt", "updatedAt" ], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/agent-threads/{threadId}/sandbox/recreate": { "post": { "summary": "Explicitly recreate an unavailable or uncertain workspace without deleting its previous state", "operationId": "recreateAgentThreadSandbox", "tags": ["Agent Threads"], "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "threadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "expectedSandboxName": { "type": "string", "minLength": 1 } }, "required": ["expectedSandboxName"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "expectedSandboxName": { "type": "string", "minLength": 1 } }, "required": ["expectedSandboxName"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "expectedSandboxName": { "type": "string", "minLength": 1 } }, "required": ["expectedSandboxName"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "sandboxState": { "type": "object", "properties": { "name": { "type": "string" }, "status": { "type": "string", "enum": ["new", "busy", "ready", "blocked", "unavailable"] }, "initialized": { "type": "boolean" } }, "required": ["name", "status", "initialized"], "additionalProperties": false }, "id": { "type": "string" }, "projectId": { "type": "string" }, "ownerPrincipal": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "title": { "type": "string" }, "sandboxParams": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "status": { "type": "string", "enum": ["active", "archived"] }, "activeRunId": { "type": "string", "nullable": true }, "lastMessageAt": { "type": "string" }, "messageCount": { "type": "number" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "projectId", "ownerPrincipal", "status", "activeRunId", "messageCount", "createdAt", "updatedAt" ], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/agent-threads/{threadId}/messages": { "get": { "summary": "List agent thread messages", "tags": ["Agent Threads"], "operationId": "listAgentThreadMessages", "parameters": [ { "name": "threadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "role", "in": "query", "required": false, "schema": { "type": "string", "enum": ["system", "user", "assistant"] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "threadId": { "type": "string" }, "runId": { "type": "string", "nullable": true }, "role": { "type": "string", "enum": ["system", "user", "assistant"] }, "authorPrincipal": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount", "system"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "seq": { "type": "number" }, "parts": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["text"] }, "text": { "type": "string" }, "providerMetadata": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["type", "text"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["reasoning"] }, "text": { "type": "string" }, "providerMetadata": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["type", "text"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["step-start"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["file"] }, "fileRef": { "type": "object", "properties": { "blobId": { "type": "string" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "fileName": { "type": "string" }, "mediaType": { "type": "string" }, "logicalPath": { "type": "string" } }, "required": ["blobId", "digest", "sizeBytes"], "additionalProperties": false }, "providerMetadata": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["type", "fileRef"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["provider-state"] }, "providerId": { "type": "string" }, "data": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["type", "providerId", "data"], "additionalProperties": false }, { "type": "object", "properties": { "context": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "ref": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "primaryId"], "additionalProperties": false } }, "required": ["kind", "ref"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["app-state"] }, "id": { "type": "string", "minLength": 1 }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "value": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": [ "kind", "id", "label", "description", "value" ], "additionalProperties": false } ] }, "origin": { "type": "string", "enum": ["ambient", "explicit"] }, "type": { "type": "string", "enum": ["context"] } }, "required": ["context", "origin", "type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["tool-call"] }, "toolCallId": { "type": "string" }, "toolName": { "type": "string" }, "dynamic": { "type": "boolean" }, "providerExecuted": { "type": "boolean" }, "input": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "providerMetadata": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "state": { "type": "string", "enum": ["output-available"] }, "output": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": [ "type", "toolCallId", "toolName", "input", "state", "output" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["tool-call"] }, "toolCallId": { "type": "string" }, "toolName": { "type": "string" }, "dynamic": { "type": "boolean" }, "providerExecuted": { "type": "boolean" }, "input": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "providerMetadata": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "state": { "type": "string", "enum": ["output-error"] }, "errorText": { "type": "string" } }, "required": [ "type", "toolCallId", "toolName", "input", "state", "errorText" ], "additionalProperties": false } ] } }, "annotations": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed" ] }, "severity": { "type": "string", "enum": ["warning", "error"] }, "scope": { "type": "string", "enum": ["output"] }, "path": { "type": "string" }, "message": { "type": "string" } }, "required": ["code", "severity", "scope", "message"], "additionalProperties": false } }, "compaction": { "type": "object", "properties": { "checkpointId": { "type": "string" }, "summary": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["checkpointId", "summary", "createdAt"], "additionalProperties": false }, "metadata": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "contentVersion": { "type": "number" }, "createdAt": { "type": "string" }, "completedAt": { "type": "string" } }, "required": [ "id", "projectId", "threadId", "runId", "role", "seq", "parts", "annotations", "contentVersion", "createdAt" ], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["messages", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } }, "post": { "summary": "Post an agent thread message", "tags": ["Agent Threads"], "operationId": "postAgentThreadMessage", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "threadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1 }, "model": { "type": "object", "properties": { "provider": { "type": "string", "minLength": 1 }, "modelId": { "type": "string", "minLength": 1 } }, "required": ["provider", "modelId"], "additionalProperties": false }, "reasoning": { "anyOf": [ { "type": "string", "enum": [ "provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max" ] }, { "type": "object", "properties": { "budgetTokens": { "type": "integer", "minimum": 0 } }, "required": ["budgetTokens"], "additionalProperties": false } ] }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "blobId": { "type": "string" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "fileName": { "type": "string" }, "mediaType": { "type": "string" }, "logicalPath": { "type": "string" } }, "required": ["blobId", "digest", "sizeBytes"], "additionalProperties": false } }, "context": { "type": "array", "items": { "type": "object", "properties": { "context": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "ref": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "primaryId"], "additionalProperties": false } }, "required": ["kind", "ref"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["app-state"] }, "id": { "type": "string", "minLength": 1 }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "value": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["kind", "id", "label", "description", "value"], "additionalProperties": false } ] }, "origin": { "type": "string", "enum": ["ambient", "explicit"] } }, "required": ["context", "origin"], "additionalProperties": false }, "maxItems": 12 }, "messageId": { "type": "string", "minLength": 1 } }, "required": ["text"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1 }, "model": { "type": "object", "properties": { "provider": { "type": "string", "minLength": 1 }, "modelId": { "type": "string", "minLength": 1 } }, "required": ["provider", "modelId"], "additionalProperties": false }, "reasoning": { "anyOf": [ { "type": "string", "enum": [ "provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max" ] }, { "type": "object", "properties": { "budgetTokens": { "type": "integer", "minimum": 0 } }, "required": ["budgetTokens"], "additionalProperties": false } ] }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "blobId": { "type": "string" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "fileName": { "type": "string" }, "mediaType": { "type": "string" }, "logicalPath": { "type": "string" } }, "required": ["blobId", "digest", "sizeBytes"], "additionalProperties": false } }, "context": { "type": "array", "items": { "type": "object", "properties": { "context": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "ref": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "primaryId"], "additionalProperties": false } }, "required": ["kind", "ref"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["app-state"] }, "id": { "type": "string", "minLength": 1 }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "value": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["kind", "id", "label", "description", "value"], "additionalProperties": false } ] }, "origin": { "type": "string", "enum": ["ambient", "explicit"] } }, "required": ["context", "origin"], "additionalProperties": false }, "maxItems": 12 }, "messageId": { "type": "string", "minLength": 1 } }, "required": ["text"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1 }, "model": { "type": "object", "properties": { "provider": { "type": "string", "minLength": 1 }, "modelId": { "type": "string", "minLength": 1 } }, "required": ["provider", "modelId"], "additionalProperties": false }, "reasoning": { "anyOf": [ { "type": "string", "enum": [ "provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max" ] }, { "type": "object", "properties": { "budgetTokens": { "type": "integer", "minimum": 0 } }, "required": ["budgetTokens"], "additionalProperties": false } ] }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "blobId": { "type": "string" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "fileName": { "type": "string" }, "mediaType": { "type": "string" }, "logicalPath": { "type": "string" } }, "required": ["blobId", "digest", "sizeBytes"], "additionalProperties": false } }, "context": { "type": "array", "items": { "type": "object", "properties": { "context": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["object"] }, "ref": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "primaryId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "primaryId"], "additionalProperties": false } }, "required": ["kind", "ref"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["app-state"] }, "id": { "type": "string", "minLength": 1 }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "value": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["kind", "id", "label", "description", "value"], "additionalProperties": false } ] }, "origin": { "type": "string", "enum": ["ambient", "explicit"] } }, "required": ["context", "origin"], "additionalProperties": false }, "maxItems": 12 }, "messageId": { "type": "string", "minLength": 1 } }, "required": ["text"], "additionalProperties": false } } } }, "responses": { "202": { "description": "Response for status 202", "content": { "application/json": { "schema": { "type": "object", "properties": { "run": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "threadId": { "type": "string" }, "triggerMessageId": { "type": "string" }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "model": { "type": "object", "properties": { "provider": { "type": "string", "minLength": 1 }, "modelId": { "type": "string", "minLength": 1 } }, "required": ["provider", "modelId"], "additionalProperties": false }, "reasoning": { "anyOf": [ { "type": "string", "enum": [ "provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max" ] }, { "type": "object", "properties": { "budgetTokens": { "type": "integer", "minimum": 0 } }, "required": ["budgetTokens"], "additionalProperties": false } ] }, "modelId": { "type": "string" }, "finishReason": { "type": "string", "enum": [ "stop", "length", "content-filter", "tool-calls", "timeout", "error", "other", "unknown" ] }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false }, "cost": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "diagnostics": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed" ] }, "severity": { "type": "string", "enum": ["warning", "error"] }, "scope": { "type": "string", "enum": ["output"] }, "path": { "type": "string" }, "message": { "type": "string" } }, "required": ["code", "severity", "scope", "message"], "additionalProperties": false } }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "agent.execution_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "attempt": { "type": "number" }, "streamId": { "type": "string" }, "createdAt": { "type": "string" }, "startedAt": { "type": "string" }, "completedAt": { "type": "string" } }, "required": [ "id", "projectId", "threadId", "triggerMessageId", "status", "attempt", "streamId", "createdAt" ], "additionalProperties": false } }, "required": ["run"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["ai.usage_limit_exceeded", "ai.usage_limit_unavailable"], "description": "Stable machine-readable failure code for programmatic handling." }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["error", "code"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/agent-threads/{threadId}/messages/{messageId}/files/content": { "get": { "summary": "Get agent message file content", "tags": ["Agents"], "operationId": "getAgentMessageFileContent", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "File content", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "206": { "description": "Partial file content", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "304": { "description": "File representation is unchanged; reuse the privately cached content" }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "416": { "description": "Requested byte range is not satisfiable" }, "501": { "description": "The storage role backing this content is not configured", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "parameters": [ { "name": "threadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "messageId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "audience", "in": "query", "required": false, "schema": { "type": "string", "enum": ["atlas", "app"], "description": "Session audience for file navigation without Origin; must match Origin when present" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "disposition", "in": "query", "required": false, "schema": { "type": "string", "enum": ["inline", "attachment"] } }, { "name": "v", "in": "query", "required": false, "schema": { "type": "string", "description": "Client cache key; the route still resolves the current file" } } ] }, "head": { "summary": "Head agent message file content", "tags": ["Agents"], "operationId": "headAgentMessageFileContent", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "responses": { "200": { "description": "File content headers" }, "206": { "description": "Partial file content headers" }, "304": { "description": "File representation is unchanged; reuse the privately cached content" }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "416": { "description": "Requested byte range is not satisfiable" }, "501": { "description": "The storage role backing this content is not configured", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "parameters": [ { "name": "threadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "messageId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "audience", "in": "query", "required": false, "schema": { "type": "string", "enum": ["atlas", "app"], "description": "Session audience for file navigation without Origin; must match Origin when present" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "disposition", "in": "query", "required": false, "schema": { "type": "string", "enum": ["inline", "attachment"] } }, { "name": "v", "in": "query", "required": false, "schema": { "type": "string", "description": "Client cache key; the route still resolves the current file" } } ] } }, "/api/agent-threads/{threadId}/cancel": { "post": { "summary": "Cancel an agent thread's active run", "tags": ["Agent Runs"], "operationId": "cancelAgentRun", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "threadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1 } }, "required": ["runId"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1 } }, "required": ["runId"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1 } }, "required": ["runId"], "additionalProperties": false } } } }, "responses": { "202": { "description": "Response for status 202", "content": { "application/json": { "schema": { "type": "object", "properties": { "run": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "threadId": { "type": "string" }, "triggerMessageId": { "type": "string" }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "model": { "type": "object", "properties": { "provider": { "type": "string", "minLength": 1 }, "modelId": { "type": "string", "minLength": 1 } }, "required": ["provider", "modelId"], "additionalProperties": false }, "reasoning": { "anyOf": [ { "type": "string", "enum": [ "provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max" ] }, { "type": "object", "properties": { "budgetTokens": { "type": "integer", "minimum": 0 } }, "required": ["budgetTokens"], "additionalProperties": false } ] }, "modelId": { "type": "string" }, "finishReason": { "type": "string", "enum": [ "stop", "length", "content-filter", "tool-calls", "timeout", "error", "other", "unknown" ] }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false }, "cost": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "diagnostics": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed" ] }, "severity": { "type": "string", "enum": ["warning", "error"] }, "scope": { "type": "string", "enum": ["output"] }, "path": { "type": "string" }, "message": { "type": "string" } }, "required": ["code", "severity", "scope", "message"], "additionalProperties": false } }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "agent.execution_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "attempt": { "type": "number" }, "streamId": { "type": "string" }, "createdAt": { "type": "string" }, "startedAt": { "type": "string" }, "completedAt": { "type": "string" } }, "required": [ "id", "projectId", "threadId", "triggerMessageId", "status", "attempt", "streamId", "createdAt" ], "additionalProperties": false } }, "required": ["run"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/agent-threads/{threadId}/runs/{runId}/retry": { "post": { "summary": "Retry a failed agent run", "tags": ["Agent Runs"], "operationId": "retryAgentRun", "security": [ { "sixbCsrf": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "threadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "202": { "description": "Response for status 202", "content": { "application/json": { "schema": { "type": "object", "properties": { "run": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "threadId": { "type": "string" }, "triggerMessageId": { "type": "string" }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "model": { "type": "object", "properties": { "provider": { "type": "string", "minLength": 1 }, "modelId": { "type": "string", "minLength": 1 } }, "required": ["provider", "modelId"], "additionalProperties": false }, "reasoning": { "anyOf": [ { "type": "string", "enum": [ "provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max" ] }, { "type": "object", "properties": { "budgetTokens": { "type": "integer", "minimum": 0 } }, "required": ["budgetTokens"], "additionalProperties": false } ] }, "modelId": { "type": "string" }, "finishReason": { "type": "string", "enum": [ "stop", "length", "content-filter", "tool-calls", "timeout", "error", "other", "unknown" ] }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false }, "cost": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "diagnostics": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed" ] }, "severity": { "type": "string", "enum": ["warning", "error"] }, "scope": { "type": "string", "enum": ["output"] }, "path": { "type": "string" }, "message": { "type": "string" } }, "required": ["code", "severity", "scope", "message"], "additionalProperties": false } }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "agent.execution_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "attempt": { "type": "number" }, "streamId": { "type": "string" }, "createdAt": { "type": "string" }, "startedAt": { "type": "string" }, "completedAt": { "type": "string" } }, "required": [ "id", "projectId", "threadId", "triggerMessageId", "status", "attempt", "streamId", "createdAt" ], "additionalProperties": false } }, "required": ["run"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "string", "enum": ["ai.usage_limit_exceeded", "ai.usage_limit_unavailable"], "description": "Stable machine-readable failure code for programmatic handling." }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["error", "code"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/agent-threads/{threadId}/runs": { "get": { "summary": "List an agent thread's runs", "tags": ["Agent Runs"], "operationId": "listAgentThreadRuns", "parameters": [ { "name": "threadId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "runs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "threadId": { "type": "string" }, "triggerMessageId": { "type": "string" }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "model": { "type": "object", "properties": { "provider": { "type": "string", "minLength": 1 }, "modelId": { "type": "string", "minLength": 1 } }, "required": ["provider", "modelId"], "additionalProperties": false }, "reasoning": { "anyOf": [ { "type": "string", "enum": [ "provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max" ] }, { "type": "object", "properties": { "budgetTokens": { "type": "integer", "minimum": 0 } }, "required": ["budgetTokens"], "additionalProperties": false } ] }, "modelId": { "type": "string" }, "finishReason": { "type": "string", "enum": [ "stop", "length", "content-filter", "tool-calls", "timeout", "error", "other", "unknown" ] }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false }, "cost": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "diagnostics": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed" ] }, "severity": { "type": "string", "enum": ["warning", "error"] }, "scope": { "type": "string", "enum": ["output"] }, "path": { "type": "string" }, "message": { "type": "string" } }, "required": ["code", "severity", "scope", "message"], "additionalProperties": false } }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "agent.execution_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "attempt": { "type": "number" }, "streamId": { "type": "string" }, "createdAt": { "type": "string" }, "startedAt": { "type": "string" }, "completedAt": { "type": "string" } }, "required": [ "id", "projectId", "threadId", "triggerMessageId", "status", "attempt", "streamId", "createdAt" ], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["runs", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/agent-runs/{runId}": { "get": { "summary": "Get agent run", "tags": ["Agent Runs"], "operationId": "getAgentRun", "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "threadId": { "type": "string" }, "triggerMessageId": { "type": "string" }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string", "minLength": 1 } }, "required": ["type", "id"], "additionalProperties": false }, "status": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled"] }, "model": { "type": "object", "properties": { "provider": { "type": "string", "minLength": 1 }, "modelId": { "type": "string", "minLength": 1 } }, "required": ["provider", "modelId"], "additionalProperties": false }, "reasoning": { "anyOf": [ { "type": "string", "enum": [ "provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max" ] }, { "type": "object", "properties": { "budgetTokens": { "type": "integer", "minimum": 0 } }, "required": ["budgetTokens"], "additionalProperties": false } ] }, "modelId": { "type": "string" }, "finishReason": { "type": "string", "enum": [ "stop", "length", "content-filter", "tool-calls", "timeout", "error", "other", "unknown" ] }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0 }, "outputTokens": { "type": "integer", "minimum": 0 }, "totalTokens": { "type": "integer", "minimum": 0 }, "uncachedInputTokens": { "type": "integer", "minimum": 0 }, "cacheReadInputTokens": { "type": "integer", "minimum": 0 }, "cacheWriteInputTokens": { "type": "integer", "minimum": 0 }, "textOutputTokens": { "type": "integer", "minimum": 0 }, "reasoningOutputTokens": { "type": "integer", "minimum": 0 }, "audioDurationMs": { "type": "integer", "minimum": 0, "description": "Audio content duration in milliseconds; not billed duration." }, "reportingStatus": { "type": "string", "enum": ["complete", "partial", "unavailable"] } }, "required": ["reportingStatus"], "additionalProperties": false }, "cost": { "type": "object", "properties": { "amounts": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "amountNanos": { "type": "string", "pattern": "^\\d+$" } }, "required": ["currency", "amountNanos"], "additionalProperties": false } }, "ratedCallCount": { "type": "integer", "minimum": 0 }, "unpriceableCallCount": { "type": "integer", "minimum": 0 }, "unvaluedCallCount": { "type": "integer", "minimum": 0 } }, "required": [ "amounts", "ratedCallCount", "unpriceableCallCount", "unvaluedCallCount" ], "additionalProperties": false }, "diagnostics": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed" ] }, "severity": { "type": "string", "enum": ["warning", "error"] }, "scope": { "type": "string", "enum": ["output"] }, "path": { "type": "string" }, "message": { "type": "string" } }, "required": ["code", "severity", "scope", "message"], "additionalProperties": false } }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "agent.execution_failed", "ai.usage_limit_exceeded", "ai.usage_limit_unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "attempt": { "type": "number" }, "streamId": { "type": "string" }, "createdAt": { "type": "string" }, "startedAt": { "type": "string" }, "completedAt": { "type": "string" } }, "required": [ "id", "projectId", "threadId", "triggerMessageId", "status", "attempt", "streamId", "createdAt" ], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/models": { "get": { "summary": "List the project model catalog", "tags": ["Models"], "operationId": "listModels", "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "language": { "type": "array", "items": { "type": "object", "properties": { "provider": { "type": "string", "minLength": 1 }, "modelId": { "type": "string", "minLength": 1 }, "isDefault": { "type": "boolean" }, "name": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "publisher": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "name": { "type": "string", "minLength": 1 } }, "required": ["id", "name"], "additionalProperties": false }, "via": { "type": "string", "minLength": 1 }, "capabilities": { "type": "object", "properties": { "input": { "type": "array", "items": { "type": "string", "enum": ["text", "image", "audio", "video", "pdf"] } }, "output": { "type": "array", "items": { "type": "string", "enum": ["text", "image", "audio", "video", "pdf"] } }, "attachments": { "type": "boolean" }, "reasoning": { "type": "boolean" }, "tools": { "type": "boolean" }, "structuredOutput": { "type": "boolean" }, "contextWindowTokens": { "type": "integer", "exclusiveMinimum": true, "minimum": 0 } }, "required": ["input", "output"], "additionalProperties": false }, "reasoningLevels": { "type": "array", "items": { "type": "string", "enum": [ "provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max" ] } } }, "required": [ "provider", "modelId", "isDefault", "name", "publisher", "capabilities", "reasoningLevels" ], "additionalProperties": false } } }, "required": ["language"], "additionalProperties": false } } } } } } }, "/api/objects/{objectTypeId}/{objectId}/links/{linkId}": { "put": { "summary": "Create or update object link", "tags": ["Links"], "operationId": "upsertObjectLink", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "objectTypeId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "objectId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "linkId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "targetTypeId": { "type": "string", "minLength": 1 }, "targetId": { "type": "string", "minLength": 1 }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["targetTypeId", "targetId"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "targetTypeId": { "type": "string", "minLength": 1 }, "targetId": { "type": "string", "minLength": 1 }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["targetTypeId", "targetId"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "targetTypeId": { "type": "string", "minLength": 1 }, "targetId": { "type": "string", "minLength": 1 }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["targetTypeId", "targetId"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } }, "required": ["success"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } }, "delete": { "summary": "Remove object link", "tags": ["Links"], "operationId": "removeObjectLink", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "objectTypeId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "objectId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "linkId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "targetTypeId", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "targetId", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } }, "required": ["success"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/objects/{objectTypeId}/{objectId}/telemetry/{propertyId}": { "post": { "summary": "Append telemetry point", "tags": ["Telemetry"], "operationId": "appendTelemetry", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "objectTypeId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "objectId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "propertyId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "value": {}, "unit": { "type": "string" }, "at": { "type": "string" } }, "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "value": {}, "unit": { "type": "string" }, "at": { "type": "string" } }, "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "value": {}, "unit": { "type": "string" }, "at": { "type": "string" } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } }, "required": ["success"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/telemetry/history": { "post": { "summary": "Get bulk telemetry history", "tags": ["Telemetry"], "operationId": "getBulkTelemetryHistory", "security": [ { "sixbCsrf": [] }, { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [], "sixbCsrf": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "series": { "type": "array", "items": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "objectId": { "type": "string", "minLength": 1 }, "propertyId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "objectId", "propertyId"], "additionalProperties": false }, "minItems": 1 }, "from": { "type": "string" }, "to": { "type": "string" }, "limitPerSeries": { "type": "integer", "minimum": 0 }, "order": { "type": "string", "enum": ["asc", "desc"] } }, "required": ["series"], "additionalProperties": false } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "series": { "type": "array", "items": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "objectId": { "type": "string", "minLength": 1 }, "propertyId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "objectId", "propertyId"], "additionalProperties": false }, "minItems": 1 }, "from": { "type": "string" }, "to": { "type": "string" }, "limitPerSeries": { "type": "integer", "minimum": 0 }, "order": { "type": "string", "enum": ["asc", "desc"] } }, "required": ["series"], "additionalProperties": false } }, "multipart/form-data": { "schema": { "type": "object", "properties": { "series": { "type": "array", "items": { "type": "object", "properties": { "objectTypeId": { "type": "string", "minLength": 1 }, "objectId": { "type": "string", "minLength": 1 }, "propertyId": { "type": "string", "minLength": 1 } }, "required": ["objectTypeId", "objectId", "propertyId"], "additionalProperties": false }, "minItems": 1 }, "from": { "type": "string" }, "to": { "type": "string" }, "limitPerSeries": { "type": "integer", "minimum": 0 }, "order": { "type": "string", "enum": ["asc", "desc"] } }, "required": ["series"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "series": { "type": "array", "items": { "type": "object", "properties": { "objectTypeId": { "type": "string" }, "objectId": { "type": "string" }, "propertyId": { "type": "string" }, "points": { "type": "array", "items": { "type": "object", "properties": { "projectId": { "type": "string" }, "objectTypeId": { "type": "string" }, "objectId": { "type": "string" }, "propertyId": { "type": "string" }, "value": {}, "unit": { "type": "string" }, "at": { "type": "string" } }, "required": [ "projectId", "objectTypeId", "objectId", "propertyId", "at" ], "additionalProperties": false } } }, "required": ["objectTypeId", "objectId", "propertyId", "points"], "additionalProperties": false } } }, "required": ["series"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/objects/{objectTypeId}/{objectId}/telemetry/{propertyId}/history": { "get": { "summary": "Get telemetry history", "tags": ["Telemetry"], "operationId": "getTelemetryHistory", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [] } ], "parameters": [ { "name": "objectTypeId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "objectId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "propertyId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "from", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "to", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "projectId": { "type": "string" }, "objectTypeId": { "type": "string" }, "objectId": { "type": "string" }, "propertyId": { "type": "string" }, "value": {}, "unit": { "type": "string" }, "at": { "type": "string" } }, "required": ["projectId", "objectTypeId", "objectId", "propertyId", "at"], "additionalProperties": false } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/objects/{objectTypeId}/{objectId}/telemetry/{propertyId}/latest": { "get": { "summary": "Get latest telemetry point", "tags": ["Telemetry"], "operationId": "getLatestTelemetry", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] }, { "sixbSharedGrant": [] } ], "parameters": [ { "name": "objectTypeId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "objectId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "propertyId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "projectId": { "type": "string" }, "objectTypeId": { "type": "string" }, "objectId": { "type": "string" }, "propertyId": { "type": "string" }, "value": {}, "unit": { "type": "string" }, "at": { "type": "string" } }, "required": ["projectId", "objectTypeId", "objectId", "propertyId", "at"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/events": { "get": { "summary": "Read domain events", "tags": ["Events"], "operationId": "listEvents", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "topic", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "objects", "telemetry", "links", "actions", "schedules", "syncs", "pipelines", "workflows", "datasets", "rules" ] } }, { "name": "type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "object.created", "object.updated", "object.deleted", "telemetry.appended", "link.created", "link.updated", "link.deleted", "action.requested", "action.completed", "action.failed", "schedule.triggered", "sync.run.started", "sync.run.finished", "pipeline.run.started", "pipeline.run.step.started", "pipeline.run.step.finished", "pipeline.run.finished", "workflow.run.queued", "workflow.run.started", "workflow.run.node.started", "workflow.run.waiting", "workflow.run.node.waiting", "workflow.run.node.finished", "workflow.run.finished", "workflow.intervention.requested", "workflow.intervention.submitted", "workflow.intervention.cancelled", "workflow.intervention.expired", "dataset.version.committed", "rule.triggered", "rule.resolved" ] } }, { "name": "afterCursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "count": { "type": "number" }, "events": { "type": "array", "items": { "anyOf": [ { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "cursor": { "type": "string" }, "schemaVersion": { "type": "number", "enum": [1] }, "projectId": { "type": "string" }, "occurredAt": { "type": "string" }, "partitionKey": { "type": "string" }, "origin": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["action"] }, "actionId": { "type": "string" }, "runId": { "type": "string" } }, "required": ["kind", "actionId", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["telemetry"] }, "source": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" }, "batchOrdinal": { "type": "number" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId", "batchOrdinal" ], "additionalProperties": false } ] } }, "required": ["kind", "source"], "additionalProperties": false } ] }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false, "description": "Principal on whose behalf the write ran; absent for automatic or anonymous work." }, "executor": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["request"] }, "requestId": { "type": "string" } }, "required": ["type", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["primitive"] }, "kind": { "type": "string", "enum": [ "action", "pipeline", "projection", "rule", "sync", "webhook", "workflow" ] }, "id": { "type": "string" }, "runId": { "type": "string" } }, "required": ["type", "kind", "id", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["agent"] }, "runId": { "type": "string" } }, "required": ["type", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["kernel"] }, "operation": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.recover"] }, "recoveryId": { "type": "string" } }, "required": ["type", "recoveryId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.indexVectors"] }, "indexingId": { "type": "string" } }, "required": ["type", "indexingId"], "additionalProperties": false } ] } }, "required": ["type", "operation"], "additionalProperties": false } ] }, "commitId": { "type": "string" }, "commitOrdinal": { "type": "integer", "minimum": 0 }, "type": { "type": "string", "enum": ["object.created"] }, "topic": { "type": "string", "enum": ["objects"] }, "payload": { "type": "object", "properties": { "objectTypeId": { "type": "string" }, "primaryId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "propertyChanges": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "object", "properties": { "operation": { "type": "string", "enum": ["created"] }, "after": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["operation", "after"], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "enum": ["updated"] }, "before": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "after": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["operation", "before", "after"], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "enum": ["cleared"] }, "before": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "after": { "nullable": true, "enum": [null] } }, "required": ["operation", "before", "after"], "additionalProperties": false } ] } } }, "required": [ "objectTypeId", "primaryId", "properties", "propertyChanges" ], "additionalProperties": false } }, "required": [ "id", "cursor", "schemaVersion", "projectId", "occurredAt", "partitionKey", "origin", "executor", "commitId", "commitOrdinal", "type", "topic", "payload" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "cursor": { "type": "string" }, "schemaVersion": { "type": "number", "enum": [1] }, "projectId": { "type": "string" }, "occurredAt": { "type": "string" }, "partitionKey": { "type": "string" }, "origin": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["action"] }, "actionId": { "type": "string" }, "runId": { "type": "string" } }, "required": ["kind", "actionId", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["telemetry"] }, "source": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" }, "batchOrdinal": { "type": "number" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId", "batchOrdinal" ], "additionalProperties": false } ] } }, "required": ["kind", "source"], "additionalProperties": false } ] }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false, "description": "Principal on whose behalf the write ran; absent for automatic or anonymous work." }, "executor": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["request"] }, "requestId": { "type": "string" } }, "required": ["type", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["primitive"] }, "kind": { "type": "string", "enum": [ "action", "pipeline", "projection", "rule", "sync", "webhook", "workflow" ] }, "id": { "type": "string" }, "runId": { "type": "string" } }, "required": ["type", "kind", "id", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["agent"] }, "runId": { "type": "string" } }, "required": ["type", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["kernel"] }, "operation": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.recover"] }, "recoveryId": { "type": "string" } }, "required": ["type", "recoveryId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.indexVectors"] }, "indexingId": { "type": "string" } }, "required": ["type", "indexingId"], "additionalProperties": false } ] } }, "required": ["type", "operation"], "additionalProperties": false } ] }, "commitId": { "type": "string" }, "commitOrdinal": { "type": "integer", "minimum": 0 }, "type": { "type": "string", "enum": ["object.updated"] }, "topic": { "type": "string", "enum": ["objects"] }, "payload": { "type": "object", "properties": { "objectTypeId": { "type": "string" }, "primaryId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "propertyChanges": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "object", "properties": { "operation": { "type": "string", "enum": ["created"] }, "after": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["operation", "after"], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "enum": ["updated"] }, "before": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "after": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["operation", "before", "after"], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "enum": ["cleared"] }, "before": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "after": { "nullable": true, "enum": [null] } }, "required": ["operation", "before", "after"], "additionalProperties": false } ] } } }, "required": [ "objectTypeId", "primaryId", "properties", "propertyChanges" ], "additionalProperties": false } }, "required": [ "id", "cursor", "schemaVersion", "projectId", "occurredAt", "partitionKey", "origin", "executor", "commitId", "commitOrdinal", "type", "topic", "payload" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "cursor": { "type": "string" }, "schemaVersion": { "type": "number", "enum": [1] }, "projectId": { "type": "string" }, "occurredAt": { "type": "string" }, "partitionKey": { "type": "string" }, "origin": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["action"] }, "actionId": { "type": "string" }, "runId": { "type": "string" } }, "required": ["kind", "actionId", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["telemetry"] }, "source": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" }, "batchOrdinal": { "type": "number" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId", "batchOrdinal" ], "additionalProperties": false } ] } }, "required": ["kind", "source"], "additionalProperties": false } ] }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false, "description": "Principal on whose behalf the write ran; absent for automatic or anonymous work." }, "executor": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["request"] }, "requestId": { "type": "string" } }, "required": ["type", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["primitive"] }, "kind": { "type": "string", "enum": [ "action", "pipeline", "projection", "rule", "sync", "webhook", "workflow" ] }, "id": { "type": "string" }, "runId": { "type": "string" } }, "required": ["type", "kind", "id", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["agent"] }, "runId": { "type": "string" } }, "required": ["type", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["kernel"] }, "operation": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.recover"] }, "recoveryId": { "type": "string" } }, "required": ["type", "recoveryId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.indexVectors"] }, "indexingId": { "type": "string" } }, "required": ["type", "indexingId"], "additionalProperties": false } ] } }, "required": ["type", "operation"], "additionalProperties": false } ] }, "commitId": { "type": "string" }, "commitOrdinal": { "type": "integer", "minimum": 0 }, "type": { "type": "string", "enum": ["object.deleted"] }, "topic": { "type": "string", "enum": ["objects"] }, "payload": { "type": "object", "properties": { "objectTypeId": { "type": "string" }, "primaryId": { "type": "string" }, "propertyChanges": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "object", "properties": { "operation": { "type": "string", "enum": ["created"] }, "after": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["operation", "after"], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "enum": ["updated"] }, "before": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "after": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["operation", "before", "after"], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "enum": ["cleared"] }, "before": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "after": { "nullable": true, "enum": [null] } }, "required": ["operation", "before", "after"], "additionalProperties": false } ] } } }, "required": ["objectTypeId", "primaryId", "propertyChanges"], "additionalProperties": false } }, "required": [ "id", "cursor", "schemaVersion", "projectId", "occurredAt", "partitionKey", "origin", "executor", "commitId", "commitOrdinal", "type", "topic", "payload" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "cursor": { "type": "string" }, "schemaVersion": { "type": "number", "enum": [1] }, "projectId": { "type": "string" }, "occurredAt": { "type": "string" }, "partitionKey": { "type": "string" }, "origin": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["action"] }, "actionId": { "type": "string" }, "runId": { "type": "string" } }, "required": ["kind", "actionId", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["telemetry"] }, "source": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" }, "batchOrdinal": { "type": "number" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId", "batchOrdinal" ], "additionalProperties": false } ] } }, "required": ["kind", "source"], "additionalProperties": false } ] }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false, "description": "Principal on whose behalf the write ran; absent for automatic or anonymous work." }, "executor": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["request"] }, "requestId": { "type": "string" } }, "required": ["type", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["primitive"] }, "kind": { "type": "string", "enum": [ "action", "pipeline", "projection", "rule", "sync", "webhook", "workflow" ] }, "id": { "type": "string" }, "runId": { "type": "string" } }, "required": ["type", "kind", "id", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["agent"] }, "runId": { "type": "string" } }, "required": ["type", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["kernel"] }, "operation": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.recover"] }, "recoveryId": { "type": "string" } }, "required": ["type", "recoveryId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.indexVectors"] }, "indexingId": { "type": "string" } }, "required": ["type", "indexingId"], "additionalProperties": false } ] } }, "required": ["type", "operation"], "additionalProperties": false } ] }, "commitId": { "type": "string" }, "commitOrdinal": { "type": "integer", "minimum": 0 }, "type": { "type": "string", "enum": ["telemetry.appended"] }, "topic": { "type": "string", "enum": ["telemetry"] }, "payload": { "type": "object", "properties": { "objectTypeId": { "type": "string" }, "objectId": { "type": "string" }, "propertyId": { "type": "string" }, "value": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "unit": { "type": "string" }, "at": { "type": "string" } }, "required": [ "objectTypeId", "objectId", "propertyId", "value", "at" ], "additionalProperties": false } }, "required": [ "id", "cursor", "schemaVersion", "projectId", "occurredAt", "partitionKey", "origin", "executor", "commitId", "commitOrdinal", "type", "topic", "payload" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "cursor": { "type": "string" }, "schemaVersion": { "type": "number", "enum": [1] }, "projectId": { "type": "string" }, "occurredAt": { "type": "string" }, "partitionKey": { "type": "string" }, "origin": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["action"] }, "actionId": { "type": "string" }, "runId": { "type": "string" } }, "required": ["kind", "actionId", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["telemetry"] }, "source": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" }, "batchOrdinal": { "type": "number" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId", "batchOrdinal" ], "additionalProperties": false } ] } }, "required": ["kind", "source"], "additionalProperties": false } ] }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false, "description": "Principal on whose behalf the write ran; absent for automatic or anonymous work." }, "executor": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["request"] }, "requestId": { "type": "string" } }, "required": ["type", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["primitive"] }, "kind": { "type": "string", "enum": [ "action", "pipeline", "projection", "rule", "sync", "webhook", "workflow" ] }, "id": { "type": "string" }, "runId": { "type": "string" } }, "required": ["type", "kind", "id", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["agent"] }, "runId": { "type": "string" } }, "required": ["type", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["kernel"] }, "operation": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.recover"] }, "recoveryId": { "type": "string" } }, "required": ["type", "recoveryId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.indexVectors"] }, "indexingId": { "type": "string" } }, "required": ["type", "indexingId"], "additionalProperties": false } ] } }, "required": ["type", "operation"], "additionalProperties": false } ] }, "commitId": { "type": "string" }, "commitOrdinal": { "type": "integer", "minimum": 0 }, "type": { "type": "string", "enum": ["link.created"] }, "topic": { "type": "string", "enum": ["links"] }, "payload": { "type": "object", "properties": { "sourceTypeId": { "type": "string" }, "sourceId": { "type": "string" }, "linkId": { "type": "string" }, "targetTypeId": { "type": "string" }, "targetId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "propertyChanges": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "object", "properties": { "operation": { "type": "string", "enum": ["created"] }, "after": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["operation", "after"], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "enum": ["updated"] }, "before": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "after": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["operation", "before", "after"], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "enum": ["cleared"] }, "before": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "after": { "nullable": true, "enum": [null] } }, "required": ["operation", "before", "after"], "additionalProperties": false } ] } } }, "required": [ "sourceTypeId", "sourceId", "linkId", "targetTypeId", "targetId", "propertyChanges" ], "additionalProperties": false } }, "required": [ "id", "cursor", "schemaVersion", "projectId", "occurredAt", "partitionKey", "origin", "executor", "commitId", "commitOrdinal", "type", "topic", "payload" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "cursor": { "type": "string" }, "schemaVersion": { "type": "number", "enum": [1] }, "projectId": { "type": "string" }, "occurredAt": { "type": "string" }, "partitionKey": { "type": "string" }, "origin": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["action"] }, "actionId": { "type": "string" }, "runId": { "type": "string" } }, "required": ["kind", "actionId", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["telemetry"] }, "source": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" }, "batchOrdinal": { "type": "number" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId", "batchOrdinal" ], "additionalProperties": false } ] } }, "required": ["kind", "source"], "additionalProperties": false } ] }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false, "description": "Principal on whose behalf the write ran; absent for automatic or anonymous work." }, "executor": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["request"] }, "requestId": { "type": "string" } }, "required": ["type", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["primitive"] }, "kind": { "type": "string", "enum": [ "action", "pipeline", "projection", "rule", "sync", "webhook", "workflow" ] }, "id": { "type": "string" }, "runId": { "type": "string" } }, "required": ["type", "kind", "id", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["agent"] }, "runId": { "type": "string" } }, "required": ["type", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["kernel"] }, "operation": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.recover"] }, "recoveryId": { "type": "string" } }, "required": ["type", "recoveryId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.indexVectors"] }, "indexingId": { "type": "string" } }, "required": ["type", "indexingId"], "additionalProperties": false } ] } }, "required": ["type", "operation"], "additionalProperties": false } ] }, "commitId": { "type": "string" }, "commitOrdinal": { "type": "integer", "minimum": 0 }, "type": { "type": "string", "enum": ["link.updated"] }, "topic": { "type": "string", "enum": ["links"] }, "payload": { "type": "object", "properties": { "sourceTypeId": { "type": "string" }, "sourceId": { "type": "string" }, "linkId": { "type": "string" }, "targetTypeId": { "type": "string" }, "targetId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "propertyChanges": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "object", "properties": { "operation": { "type": "string", "enum": ["created"] }, "after": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["operation", "after"], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "enum": ["updated"] }, "before": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "after": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["operation", "before", "after"], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "enum": ["cleared"] }, "before": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "after": { "nullable": true, "enum": [null] } }, "required": ["operation", "before", "after"], "additionalProperties": false } ] } } }, "required": [ "sourceTypeId", "sourceId", "linkId", "targetTypeId", "targetId", "propertyChanges" ], "additionalProperties": false } }, "required": [ "id", "cursor", "schemaVersion", "projectId", "occurredAt", "partitionKey", "origin", "executor", "commitId", "commitOrdinal", "type", "topic", "payload" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "cursor": { "type": "string" }, "schemaVersion": { "type": "number", "enum": [1] }, "projectId": { "type": "string" }, "occurredAt": { "type": "string" }, "partitionKey": { "type": "string" }, "origin": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["action"] }, "actionId": { "type": "string" }, "runId": { "type": "string" } }, "required": ["kind", "actionId", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["telemetry"] }, "source": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" }, "batchOrdinal": { "type": "number" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId", "batchOrdinal" ], "additionalProperties": false } ] } }, "required": ["kind", "source"], "additionalProperties": false } ] }, "requestedBy": { "type": "object", "properties": { "type": { "type": "string", "enum": ["user", "serviceAccount"] }, "id": { "type": "string" } }, "required": ["type", "id"], "additionalProperties": false, "description": "Principal on whose behalf the write ran; absent for automatic or anonymous work." }, "executor": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["request"] }, "requestId": { "type": "string" } }, "required": ["type", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["primitive"] }, "kind": { "type": "string", "enum": [ "action", "pipeline", "projection", "rule", "sync", "webhook", "workflow" ] }, "id": { "type": "string" }, "runId": { "type": "string" } }, "required": ["type", "kind", "id", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["agent"] }, "runId": { "type": "string" } }, "required": ["type", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["kernel"] }, "operation": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.recover"] }, "recoveryId": { "type": "string" } }, "required": ["type", "recoveryId"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["ontology.indexVectors"] }, "indexingId": { "type": "string" } }, "required": ["type", "indexingId"], "additionalProperties": false } ] } }, "required": ["type", "operation"], "additionalProperties": false } ] }, "commitId": { "type": "string" }, "commitOrdinal": { "type": "integer", "minimum": 0 }, "type": { "type": "string", "enum": ["link.deleted"] }, "topic": { "type": "string", "enum": ["links"] }, "payload": { "type": "object", "properties": { "sourceTypeId": { "type": "string" }, "sourceId": { "type": "string" }, "linkId": { "type": "string" }, "targetTypeId": { "type": "string" }, "targetId": { "type": "string" }, "propertyChanges": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "object", "properties": { "operation": { "type": "string", "enum": ["created"] }, "after": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["operation", "after"], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "enum": ["updated"] }, "before": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "after": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "required": ["operation", "before", "after"], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "enum": ["cleared"] }, "before": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "after": { "nullable": true, "enum": [null] } }, "required": ["operation", "before", "after"], "additionalProperties": false } ] } } }, "required": [ "sourceTypeId", "sourceId", "linkId", "targetTypeId", "targetId", "propertyChanges" ], "additionalProperties": false } }, "required": [ "id", "cursor", "schemaVersion", "projectId", "occurredAt", "partitionKey", "origin", "executor", "commitId", "commitOrdinal", "type", "topic", "payload" ], "additionalProperties": false } ] }, { "type": "object", "properties": { "id": { "type": "string" }, "cursor": { "type": "string" }, "schemaVersion": { "type": "number", "enum": [1] }, "projectId": { "type": "string" }, "occurredAt": { "type": "string" }, "partitionKey": { "type": "string" }, "correlationId": { "type": "string" }, "causationId": { "type": "string" }, "idempotencyKey": { "type": "string" }, "origin": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["action"] }, "actionId": { "type": "string" }, "runId": { "type": "string" } }, "required": ["kind", "actionId", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["telemetry"] }, "source": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["runtime"] }, "requestId": { "type": "string" } }, "required": ["kind", "requestId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["projection"] }, "projectionId": { "type": "string" }, "projectionRunId": { "type": "string" }, "datasetId": { "type": "string" }, "datasetVersionId": { "type": "string" }, "batchOrdinal": { "type": "number" } }, "required": [ "kind", "projectionId", "projectionRunId", "datasetId", "datasetVersionId", "batchOrdinal" ], "additionalProperties": false } ] } }, "required": ["kind", "source"], "additionalProperties": false } ] }, "metadata": { "type": "object", "additionalProperties": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] } }, "type": { "type": "string", "enum": [ "action.requested", "action.completed", "action.failed", "schedule.triggered", "sync.run.started", "sync.run.finished", "pipeline.run.started", "pipeline.run.step.started", "pipeline.run.step.finished", "pipeline.run.finished", "workflow.run.queued", "workflow.run.started", "workflow.run.node.started", "workflow.run.waiting", "workflow.run.node.waiting", "workflow.run.node.finished", "workflow.run.finished", "workflow.intervention.requested", "workflow.intervention.submitted", "workflow.intervention.cancelled", "workflow.intervention.expired", "dataset.version.committed", "rule.triggered", "rule.resolved" ] }, "topic": { "type": "string", "enum": [ "objects", "telemetry", "links", "actions", "schedules", "syncs", "pipelines", "workflows", "datasets", "rules" ] }, "payload": { "type": "object", "additionalProperties": {} } }, "required": [ "id", "cursor", "schemaVersion", "projectId", "occurredAt", "partitionKey", "type", "topic", "payload" ], "additionalProperties": false } ] } } }, "required": ["count", "events"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/logs": { "get": { "summary": "Read run logs", "tags": ["Logs"], "operationId": "listLogs", "security": [ { "sixbAccessToken": [] }, { "sixbSession": [] } ], "parameters": [ { "name": "kind", "in": "query", "required": false, "schema": { "type": "string", "enum": ["action", "agent", "pipeline", "projection", "sync", "webhook", "workflow"] } }, { "name": "runId", "in": "query", "required": false, "schema": { "type": "string", "pattern": "\\S" } }, { "name": "level", "in": "query", "required": false, "schema": { "type": "string", "enum": ["debug", "info", "warn", "error"] } }, { "name": "direction", "in": "query", "required": false, "schema": { "type": "string", "enum": ["forward", "backward"] } }, { "name": "afterCursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "beforeCursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": true, "minimum": 0, "maximum": 1000 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "count": { "type": "number" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "level": { "type": "string", "enum": ["debug", "info", "warn", "error"] }, "message": { "type": "string" }, "fields": { "type": "object", "additionalProperties": {} }, "at": { "type": "string" }, "context": { "type": "object", "properties": { "run": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "action", "agent", "pipeline", "projection", "sync", "webhook", "workflow" ] }, "id": { "type": "string" } }, "required": ["kind", "id"], "additionalProperties": false }, "stepId": { "type": "string" }, "phase": { "type": "string" }, "attempt": { "type": "number" } }, "required": ["run"], "additionalProperties": false }, "cursor": { "type": "string" } }, "required": ["level", "message", "at", "context", "cursor"], "additionalProperties": false } }, "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": ["count", "lines", "hasMore"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/projections": { "get": { "summary": "List all projection definitions", "tags": ["Projections"], "operationId": "listProjections", "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "objectProjections": { "type": "array", "items": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["ObjectProjectionDefinition"] }, "id": { "type": "string" }, "objectTypeId": { "type": "string" }, "datasetId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "type": "string" } }, "links": { "type": "object", "additionalProperties": { "type": "object", "properties": { "linkId": { "type": "string" }, "sourcePropertyId": { "type": "string" }, "sourceField": { "type": "string" }, "targetObjectTypeId": { "type": "string" } }, "required": ["linkId", "targetObjectTypeId"], "additionalProperties": false } }, "conflictResolution": { "anyOf": [ { "type": "object", "properties": { "strategy": { "type": "string", "enum": ["editsWin"] } }, "required": ["strategy"], "additionalProperties": false }, { "type": "object", "properties": { "strategy": { "type": "string", "enum": ["mostRecent"] }, "sourceTimestamp": { "type": "string" } }, "required": ["strategy", "sourceTimestamp"], "additionalProperties": false } ] }, "latestRun": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["object"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["link"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "sourceObjectTypeId": { "type": "string" }, "targetObjectTypeId": { "type": "string" } }, "required": ["sourceObjectTypeId", "targetObjectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["telemetry"] }, "protocol": { "type": "string", "enum": ["telemetry"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false } ], "nullable": true } }, "required": [ "_tag", "id", "objectTypeId", "datasetId", "properties", "links", "conflictResolution", "latestRun" ], "additionalProperties": false } }, "linkProjections": { "type": "array", "items": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["LinkProjectionDefinition"] }, "id": { "type": "string" }, "linkId": { "type": "string" }, "sourceObjectTypeId": { "type": "string" }, "targetObjectTypeId": { "type": "string" }, "datasetId": { "type": "string" }, "sourceField": { "type": "string" }, "targetField": { "type": "string" }, "latestRun": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["object"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["link"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "sourceObjectTypeId": { "type": "string" }, "targetObjectTypeId": { "type": "string" } }, "required": ["sourceObjectTypeId", "targetObjectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["telemetry"] }, "protocol": { "type": "string", "enum": ["telemetry"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false } ], "nullable": true } }, "required": [ "_tag", "id", "linkId", "sourceObjectTypeId", "targetObjectTypeId", "datasetId", "sourceField", "targetField", "latestRun" ], "additionalProperties": false } }, "telemetryProjections": { "type": "array", "items": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["TelemetryProjectionDefinition"] }, "id": { "type": "string" }, "objectTypeId": { "type": "string" }, "datasetId": { "type": "string" }, "objectIdField": { "type": "string" }, "atField": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "type": "object", "properties": { "valueField": { "type": "string" }, "unitField": { "type": "string" } }, "required": ["valueField"], "additionalProperties": false } }, "latestRun": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["object"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["link"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "sourceObjectTypeId": { "type": "string" }, "targetObjectTypeId": { "type": "string" } }, "required": ["sourceObjectTypeId", "targetObjectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["telemetry"] }, "protocol": { "type": "string", "enum": ["telemetry"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false } ], "nullable": true } }, "required": [ "_tag", "id", "objectTypeId", "datasetId", "objectIdField", "atField", "properties", "latestRun" ], "additionalProperties": false } } }, "required": ["objectProjections", "linkProjections", "telemetryProjections"], "additionalProperties": false } } } } } } }, "/api/projections/{projectionId}": { "get": { "summary": "Get a projection definition by id", "tags": ["Projections"], "operationId": "getProjection", "parameters": [ { "name": "projectionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["ObjectProjectionDefinition"] }, "id": { "type": "string" }, "objectTypeId": { "type": "string" }, "datasetId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "type": "string" } }, "links": { "type": "object", "additionalProperties": { "type": "object", "properties": { "linkId": { "type": "string" }, "sourcePropertyId": { "type": "string" }, "sourceField": { "type": "string" }, "targetObjectTypeId": { "type": "string" } }, "required": ["linkId", "targetObjectTypeId"], "additionalProperties": false } }, "conflictResolution": { "anyOf": [ { "type": "object", "properties": { "strategy": { "type": "string", "enum": ["editsWin"] } }, "required": ["strategy"], "additionalProperties": false }, { "type": "object", "properties": { "strategy": { "type": "string", "enum": ["mostRecent"] }, "sourceTimestamp": { "type": "string" } }, "required": ["strategy", "sourceTimestamp"], "additionalProperties": false } ] }, "latestRun": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["object"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["link"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "sourceObjectTypeId": { "type": "string" }, "targetObjectTypeId": { "type": "string" } }, "required": ["sourceObjectTypeId", "targetObjectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["telemetry"] }, "protocol": { "type": "string", "enum": ["telemetry"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false } ], "nullable": true } }, "required": [ "_tag", "id", "objectTypeId", "datasetId", "properties", "links", "conflictResolution", "latestRun" ], "additionalProperties": false }, { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["LinkProjectionDefinition"] }, "id": { "type": "string" }, "linkId": { "type": "string" }, "sourceObjectTypeId": { "type": "string" }, "targetObjectTypeId": { "type": "string" }, "datasetId": { "type": "string" }, "sourceField": { "type": "string" }, "targetField": { "type": "string" }, "latestRun": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["object"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["link"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "sourceObjectTypeId": { "type": "string" }, "targetObjectTypeId": { "type": "string" } }, "required": ["sourceObjectTypeId", "targetObjectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["telemetry"] }, "protocol": { "type": "string", "enum": ["telemetry"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false } ], "nullable": true } }, "required": [ "_tag", "id", "linkId", "sourceObjectTypeId", "targetObjectTypeId", "datasetId", "sourceField", "targetField", "latestRun" ], "additionalProperties": false }, { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["TelemetryProjectionDefinition"] }, "id": { "type": "string" }, "objectTypeId": { "type": "string" }, "datasetId": { "type": "string" }, "objectIdField": { "type": "string" }, "atField": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "type": "object", "properties": { "valueField": { "type": "string" }, "unitField": { "type": "string" } }, "required": ["valueField"], "additionalProperties": false } }, "latestRun": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["object"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["link"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "sourceObjectTypeId": { "type": "string" }, "targetObjectTypeId": { "type": "string" } }, "required": ["sourceObjectTypeId", "targetObjectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["telemetry"] }, "protocol": { "type": "string", "enum": ["telemetry"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false } ], "nullable": true } }, "required": [ "_tag", "id", "objectTypeId", "datasetId", "objectIdField", "atField", "properties", "latestRun" ], "additionalProperties": false } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/projection-runs": { "get": { "summary": "List projection run history", "tags": ["Projection Runs"], "operationId": "listProjectionRuns", "parameters": [ { "name": "projectionId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "projectionKind", "in": "query", "required": false, "schema": { "type": "string", "enum": ["object", "link", "telemetry"] } }, { "name": "datasetId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "datasetVersionId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["queued", "running", "succeeded", "failed", "cancelled", "superseded"] } }, { "name": "startedAfter", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "startedBefore", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "runs": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["object"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["link"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "sourceObjectTypeId": { "type": "string" }, "targetObjectTypeId": { "type": "string" } }, "required": ["sourceObjectTypeId", "targetObjectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["telemetry"] }, "protocol": { "type": "string", "enum": ["telemetry"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false } ] } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["runs", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/projection-runs/{runId}": { "get": { "summary": "Get a projection run by id", "tags": ["Projection Runs"], "operationId": "getProjectionRun", "parameters": [ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["object"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["link"] }, "protocol": { "type": "string", "enum": ["replacement"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "sourceObjectTypeId": { "type": "string" }, "targetObjectTypeId": { "type": "string" } }, "required": ["sourceObjectTypeId", "targetObjectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "superseded" ] }, "attempt": { "type": "number" }, "progress": { "type": "object", "properties": { "sourceRowsRead": { "type": "number" }, "sourceRowsSkipped": { "type": "number" }, "sourceChangesRead": { "type": "number" } }, "required": ["sourceRowsRead", "sourceRowsSkipped"], "additionalProperties": false }, "queuedAt": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "runtime.cancelled", "queue.enqueue_failed", "projection.execution_failed", "storage.unavailable" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false }, "identity": { "type": "object", "properties": { "projectionId": { "type": "string" }, "datasetVersion": { "type": "object", "properties": { "datasetId": { "type": "string" }, "versionId": { "type": "string" }, "createdAt": { "type": "string" } }, "required": ["datasetId", "versionId", "createdAt"], "additionalProperties": false }, "ontologyRevision": { "type": "string" }, "projectionRevision": { "type": "string" }, "ownershipHash": { "type": "string" }, "projectionKind": { "type": "string", "enum": ["telemetry"] }, "protocol": { "type": "string", "enum": ["telemetry"] } }, "required": [ "projectionId", "datasetVersion", "ontologyRevision", "projectionRevision", "ownershipHash", "projectionKind", "protocol" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "objectTypeId": { "type": "string" } }, "required": ["objectTypeId"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "status", "attempt", "progress", "queuedAt", "identity", "target" ], "additionalProperties": false } ] } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/api/webhook-runs": { "get": { "summary": "List webhook run history", "tags": ["Webhooks"], "operationId": "listWebhookRuns", "parameters": [ { "name": "connectorId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "webhookId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["running", "succeeded", "failed"] } }, { "name": "idempotencyKey", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "startedAfter", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "startedBefore", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "properties": { "runs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "executionId": { "type": "string" }, "connectorId": { "type": "string" }, "webhookId": { "type": "string" }, "status": { "type": "string", "enum": ["running", "succeeded", "failed"] }, "method": { "type": "string" }, "route": { "type": "string" }, "startedAt": { "type": "string" }, "finishedAt": { "type": "string" }, "requestBodyBytes": { "type": "number" }, "responseStatus": { "type": "number" }, "idempotencyKey": { "type": "string" }, "error": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "internal.unexpected", "webhook.delivery_failed", "webhook.delivery_rejected" ] }, "message": { "type": "string", "maxLength": 4096 }, "retryable": { "type": "boolean" }, "at": { "type": "string", "format": "date-time" }, "details": { "description": "Any JSON-compatible value.", "nullable": true, "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": {} }, { "type": "object", "additionalProperties": true } ] }, "httpStatus": { "type": "integer", "minimum": 100, "maximum": 599 }, "redacted": { "type": "boolean", "enum": [true] }, "truncated": { "type": "boolean", "enum": [true] } }, "required": ["code", "message", "retryable", "at"], "additionalProperties": false } }, "required": [ "id", "projectId", "executionId", "connectorId", "webhookId", "status", "method", "route", "startedAt", "requestBodyBytes" ], "additionalProperties": false } }, "hasMore": { "type": "boolean" }, "total": { "type": "number" } }, "required": ["runs", "hasMore", "total"], "additionalProperties": false } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } }, "501": { "description": "Response for status 501", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"], "additionalProperties": false } } } } } } }, "/ws/events": { "ws": { "operationId": "wsWsEvents" } }, "/ws/logs": { "ws": { "operationId": "wsWsLogs" } }, "/ws/agents": { "ws": { "operationId": "wsWsAgents" } } } }