{ "openapi": "3.1.0", "info": { "contact": { "email": "support@cloudquery.io", "name": "CloudQuery Support Team", "url": "https://cloudquery.io" }, "description": "Welcome to the CloudQuery Platform API documentation! This API can be used to interact with the CloudQuery platform. As a user, the API allows you to search the CloudQuery asset inventory, run SQL queries against the data warehouse, save and load searches, and much more. As an administrator, it allows you to manage your teams, syncs, and other objects.\n### Authentication\nThe API is secured using bearer tokens. To get started, you can generate an API key for your Platform deployment from your platform dashboard. For a step-by-step guide, see: https://www.cloudquery.io/docs/cli/managing-cloudquery/deployments/generate-api-key.\nThe base URL for the API depends on where your CloudQuery Platform is hosted. If running locally, this is usually http://localhost:3000/api. In a production deployment it should be an HTTPS URL. For purposes of illustration, we will assume the platform instance is available at https://cloudquery.mycompany.com. In this case, the base API endpoint will be https://cloudquery.mycompany.com/api.\n### Example Request\nTo test your connection to the API, we can use the `/plugins` endpoint. For example:\n`curl -v -H \"Authorization: Bearer $CLOUDQUERY_API_KEY\" \\ https://cloudquery.mycompany.com/api/plugins`\n", "license": { "name": "MIT", "url": "https://spdx.org/licenses/MIT" }, "termsOfService": "https://www.cloudquery.io/terms", "title": "CloudQuery Platform OpenAPI Spec", "version": "1.0.0" }, "security": [ { "bearerAuth": [] }, { "cookieAuth": [] } ], "tags": [ { "name": "admin" }, { "name": "alerts" }, { "name": "analytics" }, { "name": "apps" }, { "name": "audit-logs" }, { "name": "chat" }, { "name": "custom-columns" }, { "name": "filters" }, { "name": "healthcheck" }, { "name": "notifications" }, { "name": "plugins" }, { "name": "policies" }, { "name": "queries" }, { "name": "insights" }, { "name": "reports" }, { "name": "syncs" }, { "name": "tables" }, { "name": "teams" }, { "name": "users" }, { "name": "onboardings" }, { "name": "rbac" } ], "paths": { "/": { "get": { "description": "Index endpoint, returns 200", "operationId": "PlatformIndex", "responses": { "200": { "description": "Response", "headers": { "Link": { "description": "RFC 8631 compliant link relation information", "schema": { "type": "string", "example": "; rel=\"service-doc\"" } } } }, "400": { "content": { "application/json": { "schema": { "allOf": [ { "additionalProperties": false, "description": "Basic Error", "required": [ "message", "status" ], "properties": { "message": { "type": "string" }, "status": { "type": "integer" } }, "title": "Basic Error", "type": "object" }, { "properties": { "errors": { "items": { "type": "string" }, "type": "array" }, "field_errors": { "additionalProperties": { "type": "string" }, "type": "object" } }, "type": "object" } ] } } }, "description": "Bad request" } }, "security": [], "tags": [ "healthcheck" ] } }, "/audit-logs": { "get": { "description": "List audit log events with pagination and filtering", "operationId": "PlatformListAuditLogs", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "name": "user_id", "in": "query", "description": "Filter by user ID", "schema": { "type": "string", "format": "uuid" } }, { "name": "event_type", "in": "query", "description": "Filter by event type", "schema": { "type": "string" } }, { "name": "entity_display_name", "in": "query", "description": "Filter by entity display name", "schema": { "type": "string" } }, { "name": "user_ip_address", "in": "query", "description": "Filter by user IP address", "schema": { "type": "string" } }, { "name": "start_time", "in": "query", "description": "Filter by start time (inclusive)", "schema": { "type": "string", "format": "date-time" } }, { "name": "end_time", "in": "query", "description": "Filter by end time (inclusive)", "schema": { "type": "string", "format": "date-time" } }, { "name": "search", "in": "query", "description": "Search across user name, event type, entity display name, and user IP address", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformAuditLogEvent" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "audit-logs" ] } }, "/audit-logs/{id}": { "get": { "description": "Get a specific audit log event by ID", "operationId": "PlatformGetAuditLog", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAuditLogEvent" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "audit-logs" ] } }, "/healthcheck": { "get": { "description": "Health check endpoint, returns 200", "operationId": "PlatformHealthCheck", "responses": { "200": { "description": "Response" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "500": { "$ref": "#/components/responses/PlatformInternalError" }, "503": { "$ref": "#/components/responses/PlatformServiceUnavailable" } }, "security": [], "tags": [ "healthcheck" ] } }, "/openapi.json": { "get": { "summary": "Get OpenAPI JSON", "description": "Returns the OpenAPI definition in JSON format.", "operationId": "PlatformGetOpenAPIJSON", "responses": { "200": { "description": "OpenAPI specification in JSON format", "content": { "application/json": { "schema": { "type": "object", "description": "The OpenAPI document for this API in JSON format" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" } }, "security": [] } }, "/platform-info": { "get": { "description": "Information about the platform", "operationId": "PlatformGetPlatformInfo", "responses": { "200": { "content": { "application/json": { "schema": { "required": [ "public_ips", "version", "tenant_id", "aws_account_id" ], "properties": { "aws_account_id": { "type": "string", "description": "AWS Account ID for the platform", "x-go-name": "AWSAccountID" }, "public_ips": { "type": "array", "description": "List of public IPs for the platform", "items": { "type": "string" }, "x-go-name": "PublicIPs" }, "version": { "type": "string", "description": "Version of the platform" }, "tenant_id": { "type": "string", "format": "uuid", "description": "The tenant ID of the current user", "x-go-name": "TenantID" } } } } }, "description": "Response" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "platform" ] } }, "/platform-versions": { "get": { "description": "List platform versions", "operationId": "PlatformListPlatformVersions", "parameters": [ { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" } ], "responses": { "200": { "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformVersion" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } }, "description": "Response" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "platform" ] } }, "/plugins": { "get": { "description": "List all plugins", "operationId": "PlatformListPlugins", "parameters": [ { "$ref": "#/components/parameters/platform_plugin_sort_by" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_plugin_include_release_stages" }, { "$ref": "#/components/parameters/platform_plugin_exclude_release_stages" } ], "responses": { "200": { "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "$ref": "#/components/schemas/PlatformListPlugins" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } }, "description": "Response" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "security": [], "tags": [ "plugins" ] } }, "/plugins/{team_name}/{plugin_kind}/{plugin_name}": { "get": { "description": "Get details about a given plugin.", "operationId": "PlatformGetPlugin", "parameters": [ { "$ref": "#/components/parameters/platform_team_name" }, { "$ref": "#/components/parameters/platform_plugin_kind" }, { "$ref": "#/components/parameters/platform_plugin_name" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformListPlugin" } } }, "description": "Response" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "security": [], "tags": [ "plugins" ] } }, "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions": { "get": { "description": "List all versions for a given plugin", "operationId": "PlatformListPluginVersions", "parameters": [ { "$ref": "#/components/parameters/platform_team_name" }, { "$ref": "#/components/parameters/platform_plugin_kind" }, { "$ref": "#/components/parameters/platform_plugin_name" }, { "$ref": "#/components/parameters/platform_version_sort_by" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_include_drafts" }, { "$ref": "#/components/parameters/platform_include_fips" }, { "$ref": "#/components/parameters/platform_include_prereleases" }, { "$ref": "#/components/parameters/platform_version_filter" } ], "responses": { "200": { "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformPluginVersionList" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } }, "description": "Response" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "security": [], "tags": [ "plugins" ] } }, "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}": { "get": { "description": "Get details about a given plugin version.", "operationId": "PlatformGetPluginVersion", "parameters": [ { "$ref": "#/components/parameters/platform_team_name" }, { "$ref": "#/components/parameters/platform_plugin_kind" }, { "$ref": "#/components/parameters/platform_plugin_name" }, { "$ref": "#/components/parameters/platform_version_name" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPluginVersionDetails" } } }, "description": "Response" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "security": [], "tags": [ "plugins" ] } }, "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}": { "get": { "description": "Download an asset for a given plugin version and target", "operationId": "PlatformDownloadPluginAsset", "parameters": [ { "in": "header", "name": "Accept", "required": false, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/platform_team_name" }, { "$ref": "#/components/parameters/platform_plugin_kind" }, { "$ref": "#/components/parameters/platform_plugin_name" }, { "$ref": "#/components/parameters/platform_version_name" }, { "$ref": "#/components/parameters/platform_target_name" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPluginAsset" } } } }, "302": { "description": "Response", "headers": { "Location": { "schema": { "type": "string" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "429": { "$ref": "#/components/responses/PlatformTooManyRequests" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "security": [], "tags": [ "plugins" ] } }, "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/tables": { "get": { "description": "List tables for a given plugin version. This only applies to source plugins.", "operationId": "PlatformListPluginVersionTables", "parameters": [ { "$ref": "#/components/parameters/platform_team_name" }, { "$ref": "#/components/parameters/platform_plugin_kind" }, { "$ref": "#/components/parameters/platform_plugin_name" }, { "$ref": "#/components/parameters/platform_version_name" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" } ], "responses": { "200": { "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformPluginTable" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } }, "description": "Response" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "security": [], "tags": [ "plugins" ] } }, "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/tables/{table_name}": { "get": { "description": "Get schema for a given table and plugin version. This only applies to source plugins.", "operationId": "PlatformGetPluginVersionTable", "parameters": [ { "$ref": "#/components/parameters/platform_team_name" }, { "$ref": "#/components/parameters/platform_plugin_kind" }, { "$ref": "#/components/parameters/platform_plugin_name" }, { "$ref": "#/components/parameters/platform_version_name" }, { "in": "path", "name": "table_name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPluginTableDetails" } } }, "description": "Response" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "security": [], "tags": [ "plugins" ] } }, "/alerts": { "get": { "description": "List all alerts", "operationId": "PlatformListAllAlerts", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_alert_states" }, { "$ref": "#/components/parameters/platform_enabled" }, { "$ref": "#/components/parameters/platform_query_tags" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformAlertDetail" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] } }, "/alerts/test": { "post": { "description": "Test an unsaved alert", "operationId": "PlatformTestUnsavedAlert", "parameters": [ { "in": "query", "name": "query_id", "required": false, "description": "ID of the query to fill in the alert", "schema": { "$ref": "#/components/schemas/PlatformQueryID" }, "x-go-name": "QueryID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAlertCreate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "type": "object", "required": [ "results" ], "properties": { "results": { "type": "array", "description": "Notification results for the test alert", "items": { "$ref": "#/components/schemas/PlatformAlertTestResponse" } } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] } }, "/policies": { "get": { "description": "List all policies for a team", "operationId": "PlatformListPolicies", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_policy_status" }, { "in": "query", "name": "severities", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicySeverity" } }, "style": "form", "explode": true, "description": "Filter by severities (policy matches any)" }, { "in": "query", "name": "domain", "required": false, "schema": { "$ref": "#/components/schemas/PlatformPolicyDomain" }, "description": "Filter by domain" }, { "in": "query", "name": "policy_group_ids", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicyGroupID" } }, "style": "form", "explode": true, "description": "Filter by policy groups (policy matches any)" }, { "in": "query", "name": "search", "required": false, "schema": { "type": "string" }, "description": "Search in policy name and description" }, { "in": "query", "name": "sort_by", "required": false, "schema": { "type": "string", "enum": [ "name", "domain", "severity", "violation_count", "last_run_at", "created_at" ], "default": "created_at" }, "description": "Field to sort by" }, { "in": "query", "name": "sort_dir", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc" }, "description": "Sort direction" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformPolicy" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] }, "post": { "description": "Create a new policy", "operationId": "PlatformCreatePolicy", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPolicyCreate" } } } }, "responses": { "201": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPolicy" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] } }, "/policies/{policy_id}": { "get": { "description": "Get a policy by ID", "operationId": "PlatformGetPolicy", "parameters": [ { "$ref": "#/components/parameters/platform_policy_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPolicy" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] }, "put": { "description": "Update a policy", "operationId": "PlatformUpdatePolicy", "parameters": [ { "$ref": "#/components/parameters/platform_policy_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPolicyUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPolicy" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] }, "delete": { "description": "Delete a policy", "operationId": "PlatformDeletePolicy", "parameters": [ { "$ref": "#/components/parameters/platform_policy_id" } ], "responses": { "204": { "description": "Success" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] } }, "/policies/{policy_id}/toggle": { "post": { "description": "Toggle a policy's status (active/paused)", "operationId": "PlatformTogglePolicy", "parameters": [ { "$ref": "#/components/parameters/platform_policy_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPolicy" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] } }, "/policies/{policy_id}/violations": { "get": { "description": "Get violations for a policy", "operationId": "PlatformGetPolicyViolations", "parameters": [ { "$ref": "#/components/parameters/platform_policy_id" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" }, { "name": "search", "in": "query", "description": "Text search term to filter violations by resource_type_label, name, account_name, cloud, or region", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformPolicyViolation" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] } }, "/policies/{policy_id}/violations-history": { "get": { "description": "Get violation history for a policy", "operationId": "PlatformGetPolicyViolationsHistory", "parameters": [ { "$ref": "#/components/parameters/platform_policy_id" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "in": "query", "name": "start_time", "required": false, "schema": { "type": "string", "format": "date-time" } }, { "in": "query", "name": "end_time", "required": false, "schema": { "type": "string", "format": "date-time" } } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformPolicyEvaluationLog" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] } }, "/policies/metrics": { "get": { "description": "Get policy metrics summary", "operationId": "PlatformGetPolicyMetrics", "parameters": [ { "in": "query", "name": "severities", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicySeverity" } }, "style": "form", "explode": true, "description": "Filter by severities (policy matches any)" }, { "in": "query", "name": "domain", "required": false, "schema": { "$ref": "#/components/schemas/PlatformPolicyDomain" }, "description": "Filter by domain" }, { "in": "query", "name": "policy_group_ids", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicyGroupID" } }, "style": "form", "explode": true, "description": "Filter by policy groups (policy matches any)" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPolicyMetrics" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] } }, "/policies/violations-by-domain": { "get": { "description": "Get violations grouped by domain", "operationId": "PlatformGetViolationsByDomain", "parameters": [ { "in": "query", "name": "severities", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicySeverity" } }, "style": "form", "explode": true, "description": "Filter by severities (policy matches any)" }, { "in": "query", "name": "domain", "required": false, "schema": { "$ref": "#/components/schemas/PlatformPolicyDomain" }, "description": "Filter by domain" }, { "in": "query", "name": "policy_group_ids", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicyGroupID" } }, "style": "form", "explode": true, "description": "Filter by policy groups (policy matches any)" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformViolationsByDomain" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] } }, "/policies/violations-history": { "get": { "description": "Get violations history over time", "operationId": "PlatformGetViolationsHistory", "parameters": [ { "in": "query", "name": "start_date", "required": false, "schema": { "type": "string", "format": "date" }, "description": "Start date for the query range (YYYY-MM-DD)" }, { "in": "query", "name": "end_date", "required": false, "schema": { "type": "string", "format": "date" }, "description": "End date for the query range (YYYY-MM-DD)" }, { "in": "query", "name": "severities", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicySeverity" } }, "style": "form", "explode": true, "description": "Filter by severities (policy matches any)" }, { "in": "query", "name": "domain", "required": false, "schema": { "$ref": "#/components/schemas/PlatformPolicyDomain" }, "description": "Filter by domain" }, { "in": "query", "name": "policy_group_ids", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicyGroupID" } }, "style": "form", "explode": true, "description": "Filter by policy groups (policy matches any)" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformViolationsHistory" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] } }, "/policy-groups": { "get": { "description": "List all policy groups", "operationId": "PlatformListPolicyGroups", "parameters": [ { "in": "query", "name": "search", "required": false, "schema": { "type": "string" }, "description": "Search in policy group name and description" }, { "in": "query", "name": "severities", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicySeverity" } }, "style": "form", "explode": true, "description": "Filter to policy groups that contain at least one policy with any of these severities" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicyGroupWithCounts" } } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] }, "post": { "description": "Create a new policy group", "operationId": "PlatformCreatePolicyGroup", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPolicyGroupCreate" } } } }, "responses": { "201": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPolicyGroup" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] } }, "/policy-groups/{policy_group_id}": { "get": { "description": "List policies in a policy group", "operationId": "PlatformListPoliciesInGroup", "parameters": [ { "$ref": "#/components/parameters/platform_policy_group_id" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "in": "query", "name": "sort_by", "required": false, "schema": { "type": "string", "enum": [ "name", "policy_count" ], "default": "name" }, "description": "Field to sort by" }, { "in": "query", "name": "sort_dir", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "asc" }, "description": "Sort direction" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformPolicy" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] }, "put": { "description": "Update a policy group", "operationId": "PlatformUpdatePolicyGroup", "parameters": [ { "$ref": "#/components/parameters/platform_policy_group_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPolicyGroupUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPolicyGroup" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] }, "delete": { "description": "Delete a policy group", "operationId": "PlatformDeletePolicyGroup", "parameters": [ { "$ref": "#/components/parameters/platform_policy_group_id" } ], "responses": { "204": { "description": "Success" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "policies" ] } }, "/apikeys": { "get": { "description": "List all API Keys", "operationId": "PlatformListAPIKeys", "tags": [ "api-keys" ], "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata", "allowed_roles" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformAPIKey" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" }, "allowed_roles": { "description": "List of allowed roles when creating a new API key", "type": "array", "items": { "$ref": "#/components/schemas/PlatformRole" } } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "post": { "description": "Create new API Key.", "operationId": "PlatformCreateAPIKey", "tags": [ "api-keys" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "expires_at", "name" ], "properties": { "name": { "$ref": "#/components/schemas/PlatformAPIKeyName" }, "expires_at": { "type": "string", "format": "date-time" }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRoleID" } } } } } } }, "responses": { "201": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAPIKey" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/apikeys/{apikey_id}": { "delete": { "description": "Delete API Key. This will remove any future access by this API Key.", "operationId": "PlatformDeleteAPIKey", "tags": [ "api-keys" ], "parameters": [ { "$ref": "#/components/parameters/platform_apikey_id" } ], "responses": { "204": { "description": "Deleted" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/apps/upsert-by-name": { "post": { "description": "Idempotently upsert a list of apps by name within the caller's tenant. For each name, returns its existing app id (if the name already exists) or a freshly-generated one (if newly created). Duplicate names in the request are deduplicated server-side. Intended primarily for service-to-service use from accessory writers that materialize app memberships.", "operationId": "PlatformUpsertAppsByName", "tags": [ "apps" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "names" ], "properties": { "names": { "type": "array", "description": "List of app names to upsert. Each name must be non-empty.", "items": { "type": "string", "minLength": 1 }, "minItems": 1 } } } } } }, "responses": { "200": { "description": "Apps upserted; existing rows returned alongside any newly created.", "content": { "application/json": { "schema": { "type": "object", "required": [ "apps" ], "properties": { "apps": { "type": "array", "items": { "type": "object", "required": [ "name", "id" ], "properties": { "name": { "type": "string" }, "id": { "type": "string", "format": "uuid" } } } } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/agent-chat": { "post": { "operationId": "PlatformAgentChat", "summary": "Send a message to the AI agent orchestrator", "description": "Sends a user message to the multi-agent orchestrator for processing. The orchestrator plans and executes actions across domain-specific agents (exploration, summary, remediation, policy, integration) and returns a summarized response.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAgentChatRequest" } } } }, "responses": { "200": { "description": "Agent response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAgentChatResponse" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "429": { "$ref": "#/components/responses/PlatformTooManyRequests" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "chat" ] } }, "/agent-chat/{session_id}": { "get": { "operationId": "PlatformGetAgentChatSession", "summary": "Get the persisted history of an agent conversation session", "description": "Returns the conversation turns persisted on the backend for the given session_id, in ascending order. Used by the frontend to recover the response when the original POST /agent-chat call was cancelled (e.g. an HTTP timeout) before the agent service finished producing its answer. The agent service keeps running in the background and persists the turn even after the original caller disconnects, so a subsequent GET surfaces that result. Unknown session ids return 200 with an empty `turns` list rather than 404, so callers can poll uniformly while the response is still in flight. A 404 response is returned only when the AI assistant feature is disabled for the tenant (matching POST /agent-chat); it never indicates an unknown session.", "parameters": [ { "in": "path", "name": "session_id", "required": true, "description": "The conversation session identifier.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Session history", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAgentChatSessionHistory" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "chat" ] } }, "/agent/custom-contexts": { "get": { "description": "List custom contexts for the current tenant", "operationId": "PlatformListAgentCustomContexts", "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformAgentCustomContext" } } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "chat" ] }, "post": { "description": "Create a new custom context for the agent", "operationId": "PlatformCreateAgentCustomContext", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAgentCustomContextCreate" } } } }, "responses": { "201": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAgentCustomContext" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "409": { "$ref": "#/components/responses/PlatformConflict" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "chat" ] } }, "/agent/custom-contexts/{agent_custom_context_id}": { "get": { "description": "Get a custom context by ID", "operationId": "PlatformGetAgentCustomContext", "parameters": [ { "$ref": "#/components/parameters/platform_agent_custom_context_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAgentCustomContext" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "chat" ] }, "put": { "description": "Update a custom context", "operationId": "PlatformUpdateAgentCustomContext", "parameters": [ { "$ref": "#/components/parameters/platform_agent_custom_context_id" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAgentCustomContextUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAgentCustomContext" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "409": { "$ref": "#/components/responses/PlatformConflict" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "chat" ] }, "delete": { "description": "Delete a custom context", "operationId": "PlatformDeleteAgentCustomContext", "parameters": [ { "$ref": "#/components/parameters/platform_agent_custom_context_id" } ], "responses": { "204": { "description": "Success" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "chat" ] } }, "/agent/custom-contexts/{agent_custom_context_id}/toggle-auto-include": { "patch": { "description": "Toggle a custom context's auto_include flag", "operationId": "PlatformToggleAgentCustomContextAutoInclude", "parameters": [ { "$ref": "#/components/parameters/platform_agent_custom_context_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAgentCustomContext" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "chat" ] } }, "/conversations": { "post": { "operationId": "PlatformCreateConversation", "summary": "Start a new chat conversation", "description": "Create a new AI chat conversation", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformConversationCreate" } } } }, "responses": { "201": { "description": "Conversation created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformConversation" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "429": { "$ref": "#/components/responses/PlatformTooManyRequests" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "chat" ] } }, "/conversations/{conversation_id}": { "get": { "operationId": "PlatformGetConversation", "summary": "Retrieve a chat conversation", "description": "Get details of an existing AI chat conversation. Useful for polling for updates.", "parameters": [ { "$ref": "#/components/parameters/platform_conversation_id" } ], "responses": { "200": { "description": "Conversation retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformConversation" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "chat" ] }, "post": { "operationId": "PlatformSendMessage", "summary": "Add a message to an existing conversation", "description": "Send a new message to an existing AI chat conversation", "parameters": [ { "$ref": "#/components/parameters/platform_conversation_id" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformConversationSendMessage" } } } }, "responses": { "201": { "description": "Message sent successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformConversationMessage" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "chat" ] } }, "/custom-columns": { "get": { "description": "List all custom columns", "operationId": "PlatformListAllCustomColumns", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_custom_columns_sort_bys" }, { "$ref": "#/components/parameters/platform_custom_columns_sort_dirs" }, { "name": "search_term", "in": "query", "schema": { "type": "string" }, "description": "Filter columns by name, label, or description." } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformCustomColumn" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "custom-columns" ] }, "post": { "description": "Save a custom column", "operationId": "PlatformSaveCustomColumn", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCustomColumnCreateOrUpdate" } } } }, "responses": { "201": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCustomColumn" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "custom-columns" ] } }, "/custom-columns/{custom_column_id}": { "get": { "description": "Get a custom column", "operationId": "PlatformGetCustomColumn", "parameters": [ { "$ref": "#/components/parameters/platform_custom_column_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCustomColumn" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "custom-columns" ] }, "patch": { "description": "Update a custom column", "operationId": "PlatformUpdateCustomColumn", "parameters": [ { "$ref": "#/components/parameters/platform_custom_column_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCustomColumnCreateOrUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCustomColumn" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "custom-columns" ] }, "delete": { "description": "Delete a custom column", "operationId": "PlatformDeleteCustomColumn", "parameters": [ { "$ref": "#/components/parameters/platform_custom_column_id" } ], "responses": { "204": { "description": "Success" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "custom-columns" ] } }, "/filters": { "get": { "description": "List Filters", "operationId": "PlatformListFilters", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_filter_tags" }, { "$ref": "#/components/parameters/platform_filter_name_filter" }, { "$ref": "#/components/parameters/platform_filter_expression_filter" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformFilter" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "filters" ] } }, "/filters/tags": { "get": { "description": "List Filter Tags", "operationId": "PlatformListFilterTags", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformFilterTag" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "filters" ] } }, "/filters/{filter_id}": { "get": { "description": "Get a table filter by ID", "operationId": "PlatformGetFilterByID", "parameters": [ { "$ref": "#/components/parameters/platform_filter_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFilter" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "filters" ] }, "patch": { "description": "Update a table filter", "operationId": "PlatformUpdateFilter", "parameters": [ { "$ref": "#/components/parameters/platform_filter_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFilterUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFilter" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "filters" ] }, "delete": { "description": "Delete a table filter", "operationId": "PlatformDeleteFilter", "parameters": [ { "$ref": "#/components/parameters/platform_filter_id" } ], "responses": { "204": { "description": "Deleted" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "filters" ] } }, "/notifications": { "get": { "description": "List all notifications for triggered, enabled, policy-bound alerts", "operationId": "PlatformListNotifications", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "in": "query", "name": "severities", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicySeverity" } }, "style": "form", "explode": true, "description": "Filter by policy severities (policy matches any)" }, { "in": "query", "name": "policy_group_ids", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicyGroupID" } }, "style": "form", "explode": true, "description": "Filter by policy groups (policy matches any)" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformNotificationDetail" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "notifications" ] } }, "/notifications/destinations": { "get": { "description": "List all notification destinations", "operationId": "PlatformListAllNotificationDestinations", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformNotificationDestinationListItem" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] }, "post": { "description": "Create notification destination", "operationId": "PlatformCreateNotificationDestination", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformNotificationDestinationCreate" } } } }, "responses": { "201": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformNotificationDestination" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] } }, "/notifications/destinations/test": { "post": { "description": "Test an unsaved notification destination", "operationId": "PlatformTestUnsavedNotificationDestination", "parameters": [ { "name": "notification_destination_id", "in": "query", "required": false, "description": "Optional ID of an existing notification destination. When provided, secret headers with empty values are resolved from the existing destination's stored encrypted values. This supports the editing flow where the frontend receives masked (empty) secret header values.", "schema": { "type": "string", "format": "uuid" }, "x-go-name": "NotificationDestinationID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformNotificationDestinationData" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformNotificationDestinationTestResponse" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] } }, "/notifications/destination/{notification_destination_id}": { "get": { "description": "Get notification destination", "operationId": "PlatformGetNotificationDestination", "parameters": [ { "$ref": "#/components/parameters/platform_notification_destination_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformNotificationDestination" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] }, "patch": { "description": "Update a notification destination", "operationId": "PlatformUpdateNotificationDestination", "parameters": [ { "$ref": "#/components/parameters/platform_notification_destination_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformNotificationDestinationUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformNotificationDestination" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] }, "delete": { "description": "Delete a notification destination", "operationId": "PlatformDeleteNotificationDestination", "parameters": [ { "$ref": "#/components/parameters/platform_notification_destination_id" } ], "responses": { "204": { "description": "No Content" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] } }, "/notifications/destination/{notification_destination_id}/alerts": { "get": { "description": "Get notification destination alerts", "operationId": "PlatformGetNotificationDestinationAlerts", "parameters": [ { "$ref": "#/components/parameters/platform_notification_destination_id" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformAlertDetail" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] } }, "/notifications/destination/{notification_destination_id}/test": { "post": { "description": "Test a notification destination", "operationId": "PlatformTestNotificationDestination", "parameters": [ { "$ref": "#/components/parameters/platform_notification_destination_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformNotificationDestinationTestResponse" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "429": { "$ref": "#/components/responses/PlatformTooManyRequests" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] } }, "/slack": { "post": { "description": "Create Slack connection", "operationId": "PlatformCreateSlackConnection", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSlackConnectionCreate" } } } }, "responses": { "201": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSlackConnection" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] } }, "/slack/{id}/channels": { "get": { "description": "List Slack channels for a connection", "operationId": "PlatformListSlackChannels", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "Slack connection ID" }, { "name": "name", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Filter channels by name (case-insensitive partial match)" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformSlackChannel" } } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] } }, "/onboardings/aws/oidc": { "post": { "operationId": "PlatformCreateAWSOnboarding", "description": "Create an interactive onboarding for AWS", "tags": [ "onboardings" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "single_account" ], "properties": { "single_account": { "type": "boolean", "description": "Specifies the type of onboarding to create: either a single account onboarding or an organization onboarding\n" } } } } } }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSCreateResponse" } } }, "description": "Created" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/oidc/{onboarding_id}": { "get": { "operationId": "PlatformGetAWSOnboarding", "description": "Query an interactive onboarding for AWS", "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "tags": [ "onboardings" ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWS" } } }, "description": "OK" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/oidc/{onboarding_id}/notify": { "post": { "operationId": "PlatformNotifyOnboarding", "description": "Update onboarding state", "tags": [ "onboardings" ], "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSNotification" } } } }, "responses": { "202": { "description": "Accepted" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/oidc/{onboarding_id}/accounts": { "get": { "operationId": "PlatformGetAWSAccountsInRoot", "description": "Query AWS accounts under organization root", "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "tags": [ "onboardings" ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSAccounts" } } }, "description": "OK" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/oidc/{onboarding_id}/accounts/{aws_orgunit_id}": { "get": { "operationId": "PlatformGetAWSAccountsInParent", "description": "Query AWS accounts under a specifc Organizational Unit", "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" }, { "$ref": "#/components/parameters/platform_aws_orgunit_id" } ], "tags": [ "onboardings" ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSAccounts" } } }, "description": "OK" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/oidc/{onboarding_id}/accounts/provision": { "post": { "operationId": "PlatformProvisionOnboardingConfiguration", "description": "Provision onboarding configuration into the cloud account", "tags": [ "onboardings" ], "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSProvision" } } } }, "responses": { "202": { "description": "Accepted" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/cur": { "post": { "operationId": "PlatformCreateAWSCUROnboarding", "description": "Create an interactive onboarding for AWS CUR", "tags": [ "onboardings" ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSCURCreateResponse" } } }, "description": "Created" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/cur/{onboarding_id}": { "get": { "operationId": "PlatformGetAWSCUROnboarding", "description": "Query an interactive onboarding for AWS CUR", "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "tags": [ "onboardings" ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSCUR" } } }, "description": "OK" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/cur/{onboarding_id}/notify": { "post": { "operationId": "PlatformNotifyAWSCUROnboarding", "description": "Update AWS CUR onboarding state", "tags": [ "onboardings" ], "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSCURNotification" } } } }, "responses": { "202": { "description": "Accepted" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/cur/{onboarding_id}/verify": { "post": { "operationId": "PlatformVerifyAWSCUROnboarding", "description": "Trigger verification of the AWS CUR onboarding", "tags": [ "onboardings" ], "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "responses": { "202": { "description": "Accepted" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/unified": { "post": { "operationId": "PlatformCreateAWSUnifiedOnboarding", "description": "Create a unified composable onboarding for AWS", "tags": [ "onboardings" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedCreateRequest" } } } }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedCreateResponse" } } }, "description": "Created" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/unified/{onboarding_id}": { "get": { "operationId": "PlatformGetAWSUnifiedOnboarding", "description": "Query a unified AWS onboarding", "tags": [ "onboardings" ], "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnified" } } }, "description": "OK" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/unified/{onboarding_id}/notify": { "post": { "operationId": "PlatformNotifyAWSUnifiedOnboarding", "description": "Update unified AWS onboarding state via CloudFormation callback", "tags": [ "onboardings" ], "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedNotification" } } } }, "responses": { "202": { "description": "Accepted" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/unified/{onboarding_id}/accounts": { "get": { "operationId": "PlatformGetAWSUnifiedAccountsInRoot", "description": "Query AWS accounts under the organization root (requires asset_inventory feature)", "tags": [ "onboardings" ], "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSAccounts" } } }, "description": "OK" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/unified/{onboarding_id}/accounts/{aws_orgunit_id}": { "get": { "operationId": "PlatformGetAWSUnifiedAccountsInParent", "description": "Query AWS accounts under a specific Organizational Unit", "tags": [ "onboardings" ], "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" }, { "name": "aws_orgunit_id", "in": "path", "required": true, "description": "Organizational Unit ID", "schema": { "type": "string", "x-go-name": "OrganizationalUnitID" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSAccounts" } } }, "description": "OK" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/unified/{onboarding_id}/accounts/provision": { "post": { "operationId": "PlatformProvisionUnifiedOnboardingConfiguration", "description": "Provision sync roles into selected AWS accounts (requires asset_inventory feature)", "tags": [ "onboardings" ], "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSProvision" } } } }, "responses": { "202": { "description": "Provisioning started" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/unified/{onboarding_id}/verify-cur": { "post": { "operationId": "PlatformVerifyAWSUnifiedCUR", "description": "Verify CUR S3 access for the unified onboarding (requires cost_and_usage feature)", "tags": [ "onboardings" ], "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "responses": { "202": { "description": "Verification started" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/unified/{onboarding_id}/test-connections": { "post": { "operationId": "PlatformCreateAWSUnifiedTestConnections", "description": "Create test connections for all enabled features in one call", "tags": [ "onboardings" ], "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedTestConnectionsRequest" } } } }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedTestConnectionsResponse" } } }, "description": "Created" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/onboardings/aws/unified/{onboarding_id}/integrations": { "post": { "operationId": "PlatformCreateAWSUnifiedIntegrations", "description": "Create integrations for all enabled features using completed test connections", "tags": [ "onboardings" ], "parameters": [ { "$ref": "#/components/parameters/platform_onboarding_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedIntegrationsRequest" } } } }, "responses": { "201": { "description": "Integrations created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedIntegrationsResponse" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/aws/unified/test-connections": { "post": { "operationId": "PlatformCreateAWSUnifiedTestConnectionsStandalone", "description": "Create test connections for AWS unified features without an onboarding. Frontend is expected to provide a per-feature plugin spec (with ${ENV_VAR} placeholders for sensitive values like external_id) plus an env list containing the corresponding values.", "tags": [ "onboardings" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAWSUnifiedTestConnectionsRequest" } } } }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedTestConnectionsResponse" } } }, "description": "Created" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/aws/unified/integrations": { "post": { "operationId": "PlatformCreateAWSUnifiedIntegrationsStandalone", "description": "Create AWS unified integrations from previously created standalone test connections (no onboarding). Like the onboarding-bound counterpart, this endpoint may create multiple syncs from a single request: asset_inventory creates a main sync plus a CloudTrail companion sync, additional_metadata creates a metadata sync, and cost_and_usage creates a CUR sync.", "tags": [ "onboardings" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformAWSUnifiedIntegrationsRequest" } } } }, "responses": { "201": { "description": "Integrations created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedIntegrationsResponse" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/v2/sync-integration-groups": { "get": { "operationId": "PlatformListSyncIntegrationGroups", "description": "List integrations grouped by onboarding ID", "tags": [ "sync-integrations" ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncIntegrationGroup" } } } } } }, "description": "OK" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/queries": { "get": { "description": "List all queries", "operationId": "PlatformListAllQueries", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_query_tags" }, { "$ref": "#/components/parameters/platform_query_name_filter" }, { "$ref": "#/components/parameters/platform_query_filter" }, { "$ref": "#/components/parameters/platform_alert_configured" }, { "$ref": "#/components/parameters/platform_alert_message_filter" }, { "$ref": "#/components/parameters/platform_alert_enabled" }, { "$ref": "#/components/parameters/platform_query_column_filter" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformQuery" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries" ] } }, "/queries/check-syntax": { "post": { "description": "Validate the syntax of a ClickHouse SQL query without executing it. Returns 200 if the syntax is valid, or 400 with an error message if not.\n", "operationId": "PlatformCheckQuerySyntax", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "query" ], "properties": { "query": { "type": "string", "description": "The SQL query to validate", "example": "SELECT account_id, instance_id FROM aws_ec2_instance WHERE instance_type = 't2.micro'" } } } } } }, "responses": { "200": { "description": "Query syntax is valid" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries" ] } }, "/queries/columns": { "post": { "description": "Return the list of output column names a SELECT query would produce, without executing it. Columns from `SELECT *` are resolved against the referenced table schemas. Returns 400 if the query cannot be parsed or is not a SELECT.\n", "operationId": "PlatformGetQueryColumns", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "query" ], "properties": { "query": { "type": "string", "description": "The SQL query to inspect", "example": "SELECT _cq_platform_id, account_id, instance_id FROM aws_ec2_instance WHERE instance_type = 't2.micro'" } } } } } }, "responses": { "200": { "description": "Column names the query would produce", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformQueryColumns" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries" ] } }, "/queries/execute": { "post": { "description": "Run an ad-hoc SQL query against any table.\nFurther filtering can optionally be applied on top of the raw SQL results using the optional parameters. Filtering can be useful in situations where a saved query needs to be further filtered, grouped or paginated, such as in dashboards or reports.\n", "operationId": "PlatformExecuteAdHocQuery", "parameters": [ { "$ref": "#/components/parameters/platform_table_selects" }, { "$ref": "#/components/parameters/platform_table_filter_mode" }, { "$ref": "#/components/parameters/platform_table_filters" }, { "$ref": "#/components/parameters/platform_table_filter_ids" }, { "$ref": "#/components/parameters/platform_table_sort_bys" }, { "$ref": "#/components/parameters/platform_table_sort_dirs" }, { "$ref": "#/components/parameters/platform_table_group_bys" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "query" ], "properties": { "query": { "type": "string", "example": "SELECT account_id, instance_id, instance_type, region, name, tags FROM aws_ec2_instance WHERE instance_type = 't2.micro'" } } } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "data", "metadata" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformTableData" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries" ] } }, "/queries/save": { "post": { "description": "Save a query to execute later", "operationId": "PlatformSaveQuery", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformQueryCreate" } } } }, "responses": { "201": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformQueryDetail" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries" ] } }, "/queries/tags": { "get": { "description": "List Query Tags", "operationId": "PlatformListQueryTags", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformQueryTag" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries" ] } }, "/queries/{query_id}": { "get": { "description": "Get a saved query", "operationId": "PlatformGetSavedQuery", "parameters": [ { "$ref": "#/components/parameters/platform_query_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformQueryDetail" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries" ] }, "patch": { "description": "Update a saved query", "operationId": "PlatformUpdateQuery", "parameters": [ { "$ref": "#/components/parameters/platform_query_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformQueryUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformQueryDetail" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries" ] }, "delete": { "description": "Delete a saved query", "operationId": "PlatformDeleteSavedQuery", "parameters": [ { "$ref": "#/components/parameters/platform_query_id" } ], "responses": { "204": { "description": "Success" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries" ] } }, "/queries/{query_id}/alert": { "delete": { "description": "Delete an alert associated with a saved query", "operationId": "PlatformDeleteAlert", "parameters": [ { "$ref": "#/components/parameters/platform_query_id" } ], "responses": { "204": { "description": "Success" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "alerts" ] } }, "/queries/{query_id}/execute": { "post": { "description": "Execute a saved query", "operationId": "PlatformExecuteSavedQuery", "parameters": [ { "$ref": "#/components/parameters/platform_query_id" }, { "$ref": "#/components/parameters/platform_table_selects" }, { "$ref": "#/components/parameters/platform_table_filter_mode" }, { "$ref": "#/components/parameters/platform_table_filters" }, { "$ref": "#/components/parameters/platform_table_filter_ids" }, { "$ref": "#/components/parameters/platform_table_sort_bys" }, { "$ref": "#/components/parameters/platform_table_sort_dirs" }, { "$ref": "#/components/parameters/platform_table_group_bys" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "data", "metadata" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformTableData" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries" ] } }, "/queries/{query_id}/filters": { "get": { "description": "List Query Filters", "operationId": "PlatformQueryListFilters", "parameters": [ { "$ref": "#/components/parameters/platform_query_id" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_filter_tags" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformFilter" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries", "filters" ] }, "post": { "description": "Save Query Filter", "operationId": "PlatformQuerySaveFilter", "parameters": [ { "$ref": "#/components/parameters/platform_query_id" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFilterCreate" } } } }, "responses": { "200": { "description": "Filter already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFilter" } } } }, "201": { "description": "Filter created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFilter" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries", "filters" ] } }, "/queries/{query_id}/filters/tags": { "get": { "description": "List Filter Tags For A Saved Query", "operationId": "PlatformQueryListFilterTags", "parameters": [ { "$ref": "#/components/parameters/platform_query_id" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformFilterTag" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries", "filters" ] } }, "/insights": { "get": { "description": "List insights with optional filtering", "operationId": "PlatformListPlatformInsights", "parameters": [ { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" }, { "name": "search", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Search in title, evidence (description), mitigation, or related fields" }, { "name": "severities", "in": "query", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformInsightSeverity" } }, "style": "form", "explode": true, "description": "Filter by severities (any match)" }, { "name": "cloud", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Filter by cloud" }, { "name": "account", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by account (repeat for multiple values, OR)" }, { "name": "region", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Filter by region" }, { "name": "insight_category", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by insight category (repeat for multiple values, OR)" }, { "name": "source_category", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by source category (repeat for multiple values, OR)" }, { "name": "source", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by source (repeat for multiple values, OR)" }, { "name": "resource_types", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by resource types" }, { "name": "tags", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by tags (any match)" }, { "name": "sort_by", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "title", "severity", "insight_category", "source_category", "account", "source", "resource_types", "resources_count", "accounts_count", "created_at", "detected_at" ], "default": "detected_at" }, "description": "Field to sort by" }, { "name": "sort_dir", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc" }, "description": "Sort direction" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformInsight" } }, "metadata": { "$ref": "#/components/schemas/PlatformInsightsListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "insights" ] } }, "/insights/columns/{column_name}/distinct-values": { "get": { "description": "Get the candidate values for the next filter dimension (`column_name`), given the current active filters. The supplied filter parameters represent where the user currently is in the filter matrix; only values for `column_name` that would yield at least one insight when added to that current position are returned. Values that would produce zero results are omitted, preventing the user from navigating to an empty state.\nThe filter parameter corresponding to `column_name` is always ignored when computing candidates — asking \"which severities exist where severity=X\" is self-referential and nonsensical. For example, if `column_name=severity` then any `severities` filter in the request is not applied; if `column_name=source` then any `source` filter is not applied; and so on. This ensures the full set of viable values for that dimension is always returned given the other active filters.\nWhen `owner_tag` is specified (e.g., \"team\", \"department\"), this endpoint returns distinct values for that specific ownership tag key, ignoring the `column_name` parameter. The corresponding tags filter for this owner key is ignored to prevent self-referential queries.\nWhen querying for `column_name=tag` without `owner_tag`, ownership tags configured in platform settings are automatically excluded from results.", "operationId": "PlatformGetPlatformInsightColumnDistinctValues", "parameters": [ { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_insight_column_name" }, { "name": "owner_tag", "in": "query", "required": false, "schema": { "type": "string" }, "description": "When specified, returns distinct values for this ownership tag key (e.g., \"team\", \"department\"). The column_name parameter is ignored when owner_tag is provided." }, { "name": "search", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Search in title, evidence (description), mitigation, or related fields" }, { "name": "severities", "in": "query", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformInsightSeverity" } }, "style": "form", "explode": true, "description": "Filter by severities (any match)" }, { "name": "cloud", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Filter by cloud" }, { "name": "account", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by account (repeat for multiple values, OR)" }, { "name": "region", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Filter by region" }, { "name": "insight_category", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by insight category (repeat for multiple values, OR)" }, { "name": "source_category", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by source category (repeat for multiple values, OR)" }, { "name": "source", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by source (repeat for multiple values, OR)" }, { "name": "resource_types", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by resource types" }, { "name": "tags", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by tags (any match)" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "values" ], "properties": { "values": { "type": "array", "items": { "type": "string" } } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "insights" ] } }, "/insights/saved-filters": { "get": { "description": "List saved insight filters", "operationId": "PlatformListInsightFilters", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "name": "search_term", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Search in filter name or description" }, { "name": "insight_category", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by insight category" }, { "name": "severities", "in": "query", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformInsightSeverity" } }, "style": "form", "explode": true, "description": "Filter by severities (any match)" }, { "name": "resource_types", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by resource types" }, { "name": "source", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by source" }, { "name": "source_category", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by source category" }, { "name": "tags", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by tags (any match)" }, { "name": "group_by", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by group by fields" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformInsightFilter" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "insights" ] }, "post": { "description": "Create a new saved insight filter", "operationId": "PlatformCreateInsightFilter", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformInsightFilterCreate" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformInsightFilter" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "insights" ] } }, "/insights/saved-filters/{insight_filter_id}": { "get": { "description": "Get a saved insight filter by ID", "operationId": "PlatformGetInsightFilterByID", "parameters": [ { "$ref": "#/components/parameters/platform_insight_filter_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformInsightFilter" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "insights" ] }, "patch": { "description": "Update a saved insight filter", "operationId": "PlatformUpdateInsightFilter", "parameters": [ { "$ref": "#/components/parameters/platform_insight_filter_id" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformInsightFilterUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformInsightFilter" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "insights" ] }, "delete": { "description": "Delete a saved insight filter", "operationId": "PlatformDeleteInsightFilter", "parameters": [ { "$ref": "#/components/parameters/platform_insight_filter_id" } ], "responses": { "204": { "description": "Deleted" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "insights" ] } }, "/insights/{insight_id}": { "get": { "description": "Get insight by ID", "operationId": "PlatformGetPlatformInsight", "parameters": [ { "$ref": "#/components/parameters/platform_insight_id" }, { "name": "search", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Search in asset name, account, region, etc." }, { "name": "accounts", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by account IDs" }, { "name": "clouds", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by cloud providers (e.g. aws, azure, gcp, github, backstage, digitalocean, wiz)" }, { "name": "regions", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by regions" }, { "name": "resource_type", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by resource type" }, { "name": "instance_type", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by instance type (from additional_properties.instance_type, e.g. EC2 instance class)" }, { "name": "tags", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by tags (key:value strings; all pairs must match)" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformInsight" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "insights" ] } }, "/insights/{insight_id}/assets": { "get": { "description": "List assets affected by an insight", "operationId": "PlatformGetPlatformInsightAssets", "parameters": [ { "$ref": "#/components/parameters/platform_insight_id" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" }, { "name": "search", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Search in asset name, account, region, etc." }, { "name": "accounts", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by account IDs" }, { "name": "clouds", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by cloud providers (e.g. aws, azure, gcp, github, backstage, digitalocean, wiz)" }, { "name": "regions", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by regions" }, { "name": "resource_type", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by resource type" }, { "name": "instance_type", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by instance type (from additional_properties.instance_type, e.g. EC2 instance class)" }, { "name": "tags", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by tags (key:value strings; all pairs must match)" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicyViolation" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "insights" ] } }, "/insights/assets/columns/{column_name}/distinct-values": { "get": { "description": "Get candidate values for the next filter dimension (`column_name`) for assets listed under an insight, given the current active filters. The supplied filter parameters represent where the user is in the filter matrix; only values for `column_name` that would yield at least one matching asset row when added to that position are returned.\nThe filter parameter corresponding to `column_name` is always ignored when computing candidates (no self-filtering).\nWhen querying for `column_name=tag`, ownership tag keys configured in platform settings are excluded from results, matching the insights list filter behavior.\n`instance-type` values are read from `additional_properties.instance_type` on each row.", "operationId": "PlatformGetPlatformInsightAssetColumnDistinctValues", "parameters": [ { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_insight_asset_column_name" }, { "name": "insight_id", "in": "query", "required": true, "schema": { "$ref": "#/components/schemas/PlatformInsightID" }, "description": "Insight whose affected assets are being filtered." }, { "name": "search", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Search in title, description, or mitigation (same as asset list)." }, { "name": "accounts", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by account IDs" }, { "name": "clouds", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by cloud providers" }, { "name": "regions", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by regions" }, { "name": "resource_type", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by resource type" }, { "name": "instance_type", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by instance type (from additional_properties.instance_type)" }, { "name": "tags", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "style": "form", "explode": true, "description": "Filter by tags (any match)" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "values" ], "properties": { "values": { "type": "array", "items": { "type": "string" } } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "insights" ] } }, "/insights/assets/{asset_id}": { "get": { "description": "List insights for a specific asset (by _cq_platform_id)", "operationId": "PlatformGetPlatformAssetInsights", "parameters": [ { "$ref": "#/components/parameters/platform_asset_id" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" }, { "name": "search", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Search in asset name, account, region, etc." }, { "name": "sort_by", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "title", "severity", "insight_category", "source_category", "account", "source", "resource_types", "resources_count", "accounts_count", "created_at", "detected_at" ], "default": "detected_at" }, "description": "Field to sort by" }, { "name": "sort_dir", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc" }, "description": "Sort direction" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformInsight" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "insights" ] } }, "/reports": { "get": { "operationId": "PlatformListReports", "description": "List reports", "tags": [ "reports" ], "parameters": [ { "name": "search_term", "in": "query", "schema": { "type": "string" }, "description": "Filter reports by title or description." }, { "name": "visibility", "in": "query", "schema": { "type": "string", "enum": [ "private", "public" ] } }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_report_sort_bys" }, { "$ref": "#/components/parameters/platform_report_sort_dirs" } ], "responses": { "200": { "description": "List of reports.", "content": { "application/json": { "schema": { "type": "object", "required": [ "reports", "metadata" ], "properties": { "reports": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformReport" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" } } }, "post": { "description": "Create Report", "operationId": "PlatformCreateReport", "tags": [ "reports" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformReportCreate" } } } }, "responses": { "201": { "description": "Created report.", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformReport" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "403": { "$ref": "#/components/responses/PlatformForbidden" } } } }, "/reports/{report_id}": { "get": { "description": "Get Report", "operationId": "PlatformGetReport", "tags": [ "reports" ], "parameters": [ { "name": "report_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "ID of the report." } ], "responses": { "200": { "description": "Retrieved report.", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformReport" } } } } } }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" } } }, "put": { "description": "Update Report", "operationId": "PlatformUpdateReport", "tags": [ "reports" ], "parameters": [ { "name": "report_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "ID of the report." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformReportUpdate" } } } }, "responses": { "200": { "description": "Updated report.", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformReport" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" } } }, "delete": { "description": "Delete Report", "operationId": "PlatformDeleteReport", "tags": [ "reports" ], "parameters": [ { "name": "report_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "ID of the report." } ], "responses": { "204": { "description": "Report deleted." }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" } } } }, "/reports/templates": { "get": { "operationId": "PlatformListReportTemplates", "description": "List report templates", "tags": [ "reports" ], "parameters": [ { "name": "search_term", "in": "query", "schema": { "type": "string" }, "description": "Filter report templates by name." }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_report_templates_sort_bys" }, { "$ref": "#/components/parameters/platform_report_templates_sort_dirs" } ], "responses": { "200": { "description": "List of report templates.", "content": { "application/json": { "schema": { "type": "object", "required": [ "templates", "metadata" ], "properties": { "templates": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformReportTemplate" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" } } }, "post": { "description": "Create Report Template", "operationId": "PlatformCreateReportTemplate", "tags": [ "reports" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformReportTemplateCreateOrUpdate" } } } }, "responses": { "201": { "description": "Created report template.", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformReportTemplate" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "403": { "$ref": "#/components/responses/PlatformForbidden" } } } }, "/reports/templates/{template_id}": { "get": { "description": "Get Report Template", "operationId": "PlatformGetReportTemplate", "tags": [ "reports" ], "parameters": [ { "name": "template_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "ID of the report template." } ], "responses": { "200": { "description": "Retrieved report template.", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformReportTemplate" } } } } } }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" } } }, "put": { "description": "Update Report Template", "operationId": "PlatformUpdateReportTemplate", "tags": [ "reports" ], "parameters": [ { "name": "template_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "ID of the report template." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformReportTemplateCreateOrUpdate" } } } }, "responses": { "200": { "description": "Updated report template.", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformReportTemplate" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" } } }, "delete": { "description": "Delete Report Template", "operationId": "PlatformDeleteReportTemplate", "tags": [ "reports" ], "parameters": [ { "name": "template_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "ID of the report template." } ], "responses": { "204": { "description": "Report template deleted." }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" } } } }, "/sync-destination-test-connections": { "post": { "description": "Create a test destination connection.", "operationId": "PlatformCreateSyncDestinationTestConnection", "tags": [ "syncs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestinationTestConnectionCreate" } } } }, "responses": { "201": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestinationTestConnection" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "429": { "$ref": "#/components/responses/PlatformTooManyRequests" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-destination-test-connections/{sync_destination_test_connection_id}": { "get": { "description": "Get a sync destination test connection.", "operationId": "PlatformGetSyncDestinationTestConnection", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_destination_test_connection_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestinationTestConnection" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "patch": { "description": "Update a sync destination test connection.", "operationId": "PlatformUpdateSyncTestConnectionForSyncDestination", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_destination_test_connection_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "status" ], "properties": { "status": { "$ref": "#/components/schemas/PlatformSyncTestConnectionStatus" }, "failure_reason": { "type": "string", "description": "Reason for failure", "example": "password authentication failed for user \"exampleuser\"" }, "failure_code": { "example": "INVALID_CREDENTIALS", "type": "string", "description": "Code for failure" } } } } } }, "responses": { "200": { "description": "Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestinationTestConnection" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-destination-test-connections/{sync_destination_test_connection_id}/logs/query": { "get": { "description": "Get logs for a sync destination test connection.", "operationId": "PlatformGetSyncDestinationTestConnectionLogsQuery", "tags": [ "syncs" ], "parameters": [ { "in": "header", "name": "Accept", "required": false, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/platform_sync_destination_test_connection_id" }, { "$ref": "#/components/parameters/platform_table_filters" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_download_file" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "data", "metadata" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformTableData" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } }, "text/plain": { "schema": { "type": "string", "description": "Download file." } } } }, "204": { "description": "No logs available for a test connection that has not started." }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-destination-test-connections/{sync_destination_test_connection_id}/logs/live": { "get": { "description": "Get live logs for a sync destination test connection.", "operationId": "PlatformGetSyncDestinationTestConnectionLogsLive", "tags": [ "syncs" ], "parameters": [ { "in": "header", "name": "Accept", "required": false, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/platform_sync_destination_test_connection_id" } ], "responses": { "200": { "description": "Response", "content": { "text/plain": { "schema": { "type": "string", "description": "Chunked response logs for a test connection that is in progress." } } } }, "204": { "description": "No logs available for a test connection that has not started." }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-destination-test-connections/{sync_destination_test_connection_id}/promote": { "post": { "description": "Promote a sync destination test connection to a sync destination.", "operationId": "PlatformPromoteSyncDestinationTestConnection", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_destination_test_connection_id" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPromoteSyncDestinationTestConnection" } } } }, "responses": { "200": { "description": "Successful response indicating that an existing sync destination was replaced.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestination" } } } }, "201": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestination" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-destinations": { "get": { "description": "List all sync destination definitions.", "operationId": "PlatformListSyncDestinations", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_sync_name_filter" }, { "$ref": "#/components/parameters/platform_sync_generic_sort_bys" }, { "$ref": "#/components/parameters/platform_sync_sort_dirs" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformSyncDestination" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-destinations/{sync_destination_name}": { "get": { "description": "Get a single sync destination definition.", "operationId": "PlatformGetSyncDestination", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_destination_name" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestination" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "patch": { "description": "Update a Sync Destination definition.", "operationId": "PlatformUpdateSyncDestination", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_destination_name" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestinationUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestination" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "delete": { "description": "Delete a Sync Destination definition. Any syncs relying on this destination must be deleted first.", "operationId": "PlatformDeleteSyncDestination", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_destination_name" } ], "responses": { "204": { "description": "Deleted" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-destinations/{sync_destination_name}/syncs": { "get": { "description": "List all Syncs for a given sync destination.", "operationId": "PlatformListSyncDestinationSyncs", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_destination_name" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_sync_sort_bys" }, { "$ref": "#/components/parameters/platform_sync_sort_dirs" }, { "$ref": "#/components/parameters/platform_sync_name_filter" }, { "$ref": "#/components/parameters/platform_migration_filter" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformListSync" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-destinations/{sync_destination_name}/test-connections/{sync_test_connection_id}": { "get": { "description": "Get test connection details for sync destination.", "operationId": "PlatformGetTestConnectionForSyncDestination", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_destination_name" }, { "$ref": "#/components/parameters/platform_sync_test_connection_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncTestConnection" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-source-test-connections": { "post": { "description": "Create a test source connection.", "operationId": "PlatformCreateSyncSourceTestConnection", "tags": [ "syncs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncSourceTestConnectionCreate" } } } }, "responses": { "201": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncSourceTestConnection" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "429": { "$ref": "#/components/responses/PlatformTooManyRequests" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-source-test-connections/{sync_source_test_connection_id}": { "get": { "description": "Get a sync source test connection.", "operationId": "PlatformGetSyncSourceTestConnection", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_source_test_connection_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncSourceTestConnection" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "patch": { "description": "Update a sync source test connection.", "operationId": "PlatformUpdateSyncTestConnectionForSyncSource", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_source_test_connection_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "status" ], "properties": { "status": { "$ref": "#/components/schemas/PlatformSyncTestConnectionStatus" }, "failure_reason": { "type": "string", "description": "Reason for failure", "example": "password authentication failed for user \"exampleuser\"" }, "failure_code": { "example": "INVALID_CREDENTIALS", "type": "string", "description": "Code for failure" } } } } } }, "responses": { "200": { "description": "Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncSourceTestConnection" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-source-test-connections/{sync_source_test_connection_id}/logs/query": { "get": { "description": "Get logs for a sync source test connection.", "operationId": "PlatformGetSyncSourceTestConnectionLogsQuery", "tags": [ "syncs" ], "parameters": [ { "in": "header", "name": "Accept", "required": false, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/platform_sync_source_test_connection_id" }, { "$ref": "#/components/parameters/platform_table_filters" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_download_file" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "data", "metadata" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformTableData" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } }, "text/plain": { "schema": { "type": "string", "description": "Download file." } } } }, "204": { "description": "No logs available for a test connection that has not started." }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-source-test-connections/{sync_source_test_connection_id}/logs/live": { "get": { "description": "Get live logs for a sync source test connection.", "operationId": "PlatformGetSyncSourceTestConnectionLogsLive", "tags": [ "syncs" ], "parameters": [ { "in": "header", "name": "Accept", "required": false, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/platform_sync_source_test_connection_id" } ], "responses": { "200": { "description": "Response", "content": { "text/plain": { "schema": { "type": "string", "description": "Chunked response logs for a test connection that is in progress." } } } }, "204": { "description": "No logs available for a test connection that has not started." }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-source-test-connections/{sync_source_test_connection_id}/promote": { "post": { "description": "Promote a sync source test connection to a sync source.", "operationId": "PlatformPromoteSyncSourceTestConnection", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_source_test_connection_id" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPromoteSyncSourceTestConnection" } } } }, "responses": { "200": { "description": "Successful response indicating that an existing sync source was replaced.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncSource" } } } }, "201": { "description": "Successful response indicating that a new sync source was created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncSource" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/v2/sync-integration-test-connections": { "post": { "description": "Create an integration test connection.", "operationId": "PlatformCreateV2SyncIntegrationTestConnection", "tags": [ "syncs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncIntegrationTestConnectionCreateV2" } } } }, "responses": { "201": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncIntegrationTestConnectionV2" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "429": { "$ref": "#/components/responses/PlatformTooManyRequests" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/v2/sync-integrations": { "get": { "description": "List sync integrations", "operationId": "PlatformListV2SyncIntegrations", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_sync_sort_bys" }, { "$ref": "#/components/parameters/platform_sync_sort_dirs" }, { "$ref": "#/components/parameters/platform_sync_name_filter" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformSyncIntegrationExpandedV2" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "post": { "description": "Create a new integration associated with a completed test connection", "operationId": "PlatformCreateV2SyncIntegration", "tags": [ "syncs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncIntegrationCreateV2" } } } }, "responses": { "201": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncIntegrationV2" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/v2/sync-integrations/{sync_name}": { "get": { "description": "Get a sync integration by name", "operationId": "PlatformGetV2SyncIntegration", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_name" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncIntegrationExpandedV2" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "patch": { "description": "Update attributes of an integration", "operationId": "PlatformUpdateV2SyncIntegration", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_name" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncIntegrationUpdateV2" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncIntegrationV2" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "delete": { "description": "Delete an integration", "operationId": "PlatformDeleteV2SyncIntegration", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_name" }, { "name": "delete_data", "description": "If true, also delete data associated with this integration from the relevant destinations.", "in": "query", "required": false, "schema": { "type": "boolean", "default": false } } ], "responses": { "204": { "description": "Success" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "405": { "$ref": "#/components/responses/PlatformMethodNotAllowed" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-sources": { "get": { "description": "List all sync source definitions.", "operationId": "PlatformListSyncSources", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_sync_name_filter" }, { "$ref": "#/components/parameters/platform_sync_generic_sort_bys" }, { "$ref": "#/components/parameters/platform_sync_sort_dirs" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformSyncSource" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-sources/{sync_source_name}": { "get": { "description": "Get a single sync source definition.", "operationId": "PlatformGetSyncSource", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_source_name" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncSource" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "patch": { "description": "Update a Sync Source definition.", "operationId": "PlatformUpdateSyncSource", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_source_name" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncSourceUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncSource" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "delete": { "description": "Delete a Sync Source definition. Any syncs relying on this source must be deleted first.", "operationId": "PlatformDeleteSyncSource", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_source_name" } ], "responses": { "204": { "description": "Deleted" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-sources/{sync_source_name}/syncs": { "get": { "description": "List all Syncs for a given sync source.", "operationId": "PlatformListSyncSourceSyncs", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_source_name" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_sync_sort_bys" }, { "$ref": "#/components/parameters/platform_sync_sort_dirs" }, { "$ref": "#/components/parameters/platform_sync_name_filter" }, { "$ref": "#/components/parameters/platform_migration_filter" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformListSync" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-sources/{sync_source_name}/test-connections/{sync_test_connection_id}": { "get": { "description": "Get test connection details for sync source.", "operationId": "PlatformGetTestConnectionForSyncSource", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_source_name" }, { "$ref": "#/components/parameters/platform_sync_test_connection_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncTestConnection" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-transformers": { "get": { "description": "List all sync transformer definitions.", "operationId": "PlatformListSyncTransformers", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_sync_name_filter" }, { "$ref": "#/components/parameters/platform_sync_generic_sort_bys" }, { "$ref": "#/components/parameters/platform_sync_sort_dirs" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformSyncTransformer" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-transformers/{sync_transformer_name}": { "get": { "description": "Get a single sync transformer definition.", "operationId": "PlatformGetSyncTransformer", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_transformer_name" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncTransformer" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "patch": { "description": "Update a Sync Transformer definition.", "operationId": "PlatformUpdateSyncTransformer", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_transformer_name" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncTransformerUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncTransformer" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "delete": { "description": "Delete a Sync Transformer definition. Any syncs relying on this transformer must be deleted first.", "operationId": "PlatformDeleteSyncTransformer", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_transformer_name" } ], "responses": { "204": { "description": "Deleted" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-transformers/{sync_transformer_name}/syncs": { "get": { "description": "List all Syncs for a given sync transformer.", "operationId": "PlatformListSyncTransformerSyncs", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_transformer_name" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformSync" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-transformers/{sync_transformer_name}/sync-destinations": { "get": { "description": "List all Sync Destinations for a given sync transformer.", "operationId": "PlatformListSyncTransformerSyncDestinations", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_transformer_name" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformSyncDestination" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/sync-upgrades": { "get": { "description": "List all version upgrades for syncs", "operationId": "PlatformListSyncUpgrades", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_sync_upgrades_sort_bys" }, { "$ref": "#/components/parameters/platform_sync_sort_dirs" }, { "$ref": "#/components/parameters/platform_sync_upgrades_path_filter" }, { "$ref": "#/components/parameters/platform_sync_upgrades_kind_filter" }, { "$ref": "#/components/parameters/platform_sync_upgrades_platform_version_filter" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformSyncUpgrade" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/syncs": { "get": { "description": "List all Syncs.", "operationId": "PlatformListSyncs", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_sync_sort_bys" }, { "$ref": "#/components/parameters/platform_sync_sort_dirs" }, { "$ref": "#/components/parameters/platform_sync_name_filter" }, { "$ref": "#/components/parameters/platform_migration_filter" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformListSync" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "post": { "description": "Create new Sync definition. Sync runs can be scheduled automatically, or triggered manually after sync is created.", "operationId": "PlatformCreateSync", "tags": [ "syncs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncCreate" } } } }, "responses": { "201": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSync" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/syncs/{sync_name}": { "get": { "description": "Get a Sync", "operationId": "PlatformGetSync", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_name" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSync" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "patch": { "description": "Update a Sync", "operationId": "PlatformUpdateSync", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_name" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncUpdate" } } } }, "responses": { "200": { "description": "Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSync" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "delete": { "description": "Delete Sync. This will delete Sync configuration and all associated sync runs, but will not delete the associated source and destination(s). These will need to be deleted separately.", "operationId": "PlatformDeleteSync", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_name" } ], "responses": { "204": { "description": "Deleted" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/syncs/{sync_name}/runs": { "get": { "description": "List all Sync Runs.", "operationId": "PlatformListSyncRuns", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_name" }, { "$ref": "#/components/parameters/platform_migration_filter" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformSyncRun" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "post": { "description": "Create new SyncRun. This will trigger a manual job run.", "operationId": "PlatformCreateSyncRun", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_name" } ], "responses": { "201": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncRun" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/syncs/{sync_name}/runs/{sync_run_id}": { "get": { "description": "Get a Sync Run.", "operationId": "PlatformGetSyncRun", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_name" }, { "$ref": "#/components/parameters/platform_sync_run_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncRunDetails" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "patch": { "description": "Update a SyncRun", "operationId": "PlatformUpdateSyncRun", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_name" }, { "$ref": "#/components/parameters/platform_sync_run_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/PlatformSyncRunStatus" }, "status_reason": { "$ref": "#/components/schemas/PlatformSyncRunStatusReason" } } } } } }, "responses": { "200": { "description": "Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncRun" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/syncs/{sync_name}/runs/{sync_run_id}/logs/query": { "get": { "description": "Get logs for a sync run.", "operationId": "PlatformGetSyncRunLogsQuery", "tags": [ "syncs" ], "parameters": [ { "in": "header", "name": "Accept", "required": false, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/platform_sync_name" }, { "$ref": "#/components/parameters/platform_sync_run_id" }, { "$ref": "#/components/parameters/platform_table_filters" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_download_file" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "data", "metadata" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformTableData" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } }, "text/plain": { "schema": { "type": "string", "description": "Download file." } } } }, "204": { "description": "No logs available for a test connection that has not started." }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/syncs/{sync_name}/runs/{sync_run_id}/logs/live": { "get": { "description": "Get live logs for a sync run.", "operationId": "PlatformGetSyncRunLogsLive", "tags": [ "syncs" ], "parameters": [ { "in": "header", "name": "Accept", "required": false, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/platform_sync_name" }, { "$ref": "#/components/parameters/platform_sync_run_id" }, { "in": "query", "name": "table", "required": false, "schema": { "type": "string", "description": "Table name to filter logs by. Use a single dash (\"-\") as input to exclude all table-specific log lines." } } ], "responses": { "200": { "description": "Response", "content": { "text/plain": { "schema": { "type": "string", "description": "Chunked response logs for a sync run that is in progress." } } } }, "204": { "description": "No logs available for a sync run that has not started." }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/syncs/{sync_name}/runs/{sync_run_id}/stats": { "get": { "description": "Get statistics on a Sync Run", "operationId": "PlatformGetSyncRunStats", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_name" }, { "$ref": "#/components/parameters/platform_sync_run_id" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncRunStats" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/syncs/{sync_name}/runs/{sync_run_id}/tables": { "get": { "description": "Get table details on a Sync Run", "operationId": "PlatformGetSyncRunTables", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_name" }, { "$ref": "#/components/parameters/platform_sync_run_id" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_sync_run_table_sort_bys" }, { "$ref": "#/components/parameters/platform_table_sort_dirs" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformSyncRunTableStat" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/tables": { "get": { "description": "List Tables", "operationId": "PlatformListTables", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformTableListItem" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "tables" ] } }, "/tables/data": { "get": { "description": "Get all sources and their associated tables. Returns data in the format needed for the delete action.", "operationId": "PlatformGetTablesData", "tags": [ "tables" ], "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "type": "object", "required": [ "sources", "metadata" ], "properties": { "sources": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformTableDataListItem" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } }, "example": { "sources": [ { "source_name": "aws-integration", "display_name": "AWS Integration", "tables": [ { "name": "aws_ec2_instances", "deletion_pending": false }, { "name": "aws_s3_buckets", "deletion_pending": true } ], "plugin": "cloudquery/aws" }, { "source_name": "gcp-integration", "display_name": "GCP Integration", "tables": [ { "name": "gcp_compute_instances", "deletion_pending": false } ], "plugin": "cloudquery/gcp" } ], "metadata": { "page_size": 10, "last_page": 1, "total_count": 2 } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "post": { "description": "Perform an action on table data across multiple sources. Supported actions: delete (drops partitions for specified tenant/source/table combinations).", "operationId": "PlatformTablesDataAction", "tags": [ "tables" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformTableDataAction" } } } }, "responses": { "204": { "description": "Success - action completed" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/tables/{table_name}/data": { "get": { "description": "List Table Rows", "operationId": "PlatformTableListRows", "parameters": [ { "$ref": "#/components/parameters/platform_table_name" }, { "$ref": "#/components/parameters/platform_table_selects" }, { "$ref": "#/components/parameters/platform_table_filter_mode" }, { "$ref": "#/components/parameters/platform_table_filters" }, { "$ref": "#/components/parameters/platform_table_filter_ids" }, { "$ref": "#/components/parameters/platform_table_sort_bys" }, { "$ref": "#/components/parameters/platform_table_sort_dirs" }, { "$ref": "#/components/parameters/platform_table_group_bys" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "data", "metadata" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformTableData" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "tables" ] } }, "/tables/{table_name}/data/{table_row_id}": { "get": { "description": "Get Table row", "operationId": "PlatformTableRowById", "parameters": [ { "$ref": "#/components/parameters/platform_table_name" }, { "$ref": "#/components/parameters/platform_table_row_id" }, { "$ref": "#/components/parameters/platform_table_filter_mode" }, { "$ref": "#/components/parameters/platform_table_filters" }, { "$ref": "#/components/parameters/platform_table_filter_ids" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "data", "matches" ], "properties": { "data": { "$ref": "#/components/schemas/PlatformTableRow" }, "matches": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformTableRowFieldMatch" } } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "tables" ] } }, "/tables/{table_name}/schema": { "get": { "description": "Get Table Schema", "operationId": "PlatformTableSchema", "parameters": [ { "$ref": "#/components/parameters/platform_table_name" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "schema", "default_columns", "display_columns" ], "properties": { "schema": { "$ref": "#/components/schemas/PlatformTableSchema" }, "default_columns": { "type": "array", "items": { "type": "string", "description": "Column name" } }, "display_columns": { "type": "array", "description": "Resolved per-table column layout for the UI's column picker.\nPrimary slots come first in canonical order (Cloud / Account\n/ Name / Region / Tags), each pointing at the physical\ncolumn the slot resolves to for this table. Details columns\nfollow in schema order.", "items": { "$ref": "#/components/schemas/PlatformTableDisplayColumn" } } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "tables" ] } }, "/tables/relations": { "get": { "description": "Get resource relations for all configured tables.", "operationId": "PlatformGetTablesRelations", "responses": { "200": { "description": "Resource relations keyed by source table name.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRelationDef" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "tables" ] } }, "/tables/{table_name}/related-resources": { "post": { "description": "Execute the curated relation queries defined for the given source\ntable against a specific row, returning the related resources grouped\nby relation title. The relation templates live in\n`api/relations/configs/*.yaml` and use `{{field_name}}` placeholders\nthat are substituted from the request's `platform_id`-resolved row or\nexplicit `fields` map before each relation query is executed against\nClickHouse.\n", "operationId": "PlatformGetTablesRelatedResources", "parameters": [ { "name": "table_name", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Source table name (e.g. `aws_ec2_instances`)." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformRelatedResourcesRequest" } } } }, "responses": { "200": { "description": "Related resources grouped by relation.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformRelatedResourcesResponse" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "tables" ] } }, "/tables/schemas": { "get": { "description": "Get Table Schemas", "operationId": "PlatformBatchTableSchemas", "parameters": [ { "name": "tables", "in": "query", "description": "A list of table names to retrieve schemas for", "required": true, "schema": { "type": "array", "items": { "type": "string", "minLength": 1 }, "example": [ "aws_ec2_instances", "aws_s3_buckets" ] } } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformBatchTableSchemaItem" } } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "tables" ] } }, "/tables/{table_name}/columns": { "get": { "description": "Get Table Columns", "operationId": "PlatformTableListColumns", "parameters": [ { "$ref": "#/components/parameters/platform_table_name" }, { "$ref": "#/components/parameters/platform_table_filter_mode" }, { "$ref": "#/components/parameters/platform_table_column_name_filter" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformTableColumnListItem" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "tables" ] } }, "/tables/{table_name}/columns/{column_name}/values": { "get": { "description": "Get Table Column Values", "operationId": "PlatformTableColumnListValues", "parameters": [ { "$ref": "#/components/parameters/platform_table_name" }, { "$ref": "#/components/parameters/platform_column_name" }, { "$ref": "#/components/parameters/platform_table_filter_mode" }, { "$ref": "#/components/parameters/platform_table_column_value_filter" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformTableColumnValueListItem" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "tables" ] } }, "/tables/{table_name}/columns/{column_name}/grouped": { "get": { "description": "Group rows of a table by the distinct non-empty values of a column and return one item per group with an exact row count. Used by the asset inventory's Group-by selector. Always runs in column-filter mode because exact per-row counts cannot be produced from the search index.\n", "operationId": "PlatformTableColumnListGrouped", "parameters": [ { "$ref": "#/components/parameters/platform_table_name" }, { "$ref": "#/components/parameters/platform_column_name" }, { "$ref": "#/components/parameters/platform_table_filters" }, { "$ref": "#/components/parameters/platform_table_filter_ids" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_per_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformTableColumnGroupedItem" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "tables" ] } }, "/tables/{table_name}/filters": { "get": { "description": "List Table Filters", "operationId": "PlatformTableListFilters", "parameters": [ { "$ref": "#/components/parameters/platform_table_name" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_filter_tags" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformFilter" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "tables", "filters" ] }, "post": { "description": "Save Table Filter", "operationId": "PlatformTableSaveFilter", "parameters": [ { "$ref": "#/components/parameters/platform_table_name" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFilterCreate" } } } }, "responses": { "200": { "description": "Filter already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFilter" } } } }, "201": { "description": "Filter created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFilter" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "tables", "filters" ] } }, "/tables/{table_name}/filters/tags": { "get": { "description": "List Filter Tags For A Table", "operationId": "PlatformTableListFilterTags", "parameters": [ { "$ref": "#/components/parameters/platform_table_name" }, { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformFilterTag" } }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "queries", "filters" ] } }, "/usage-summary": { "get": { "description": "Get a summary of usage for the specified time range.", "operationId": "PlatformGetTeamUsageSummary", "parameters": [ { "in": "query", "name": "metrics", "required": false, "schema": { "type": "array", "description": "A list of metrics to include in the response. Each metric must be one of the predefined valid values. If not provided, only `paid-rows` will be included.", "items": { "type": "string", "enum": [ "paid_rows", "cloud_vcpu_seconds", "cloud_vram_byte_seconds", "network_egress_bytes" ] }, "default": [ "paid_rows" ] } }, { "in": "query", "name": "start", "required": false, "schema": { "type": "string", "format": "date-time", "description": "A valid ISO-8601-formatted date and time, indicating the inclusive start of the query time range. Defaults to 30 days ago." } }, { "in": "query", "name": "end", "required": false, "schema": { "type": "string", "format": "date-time", "description": "A valid ISO-8601-formatted date and time, indicating the exclusive end of the query time range. Defaults to the current time." } }, { "in": "query", "name": "aggregation_period", "description": "An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month.", "required": false, "schema": { "type": "string", "default": "day", "enum": [ "day", "month" ] } } ], "responses": { "200": { "description": "A summary of usage for the specified time range.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformUsageSummary" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "usage" ] } }, "/usage-summary/{group_by}": { "get": { "description": "Get a grouped summary of usage for the specified time range.", "operationId": "PlatformGetGroupedTeamUsageSummary", "parameters": [ { "in": "path", "name": "group_by", "required": true, "schema": { "type": "string", "enum": [ "price_category", "plugin", "sync_id" ], "description": "Group by usage summary. `plugin` and `price_category` groupings are only available for `paid-rows`." } }, { "in": "query", "name": "metrics", "required": false, "schema": { "type": "array", "description": "A list of metrics to include in the response. Each metric must be one of the predefined valid values. If not provided, only `paid-rows` will be included.", "items": { "type": "string", "enum": [ "paid_rows", "cloud_vcpu_seconds", "cloud_vram_byte_seconds", "network_egress_bytes" ] }, "default": [ "paid_rows" ] } }, { "in": "query", "name": "start", "required": false, "schema": { "type": "string", "format": "date-time", "description": "A valid ISO-8601-formatted date and time, indicating the inclusive start of the query time range. Defaults to 30 days ago." } }, { "in": "query", "name": "end", "required": false, "schema": { "type": "string", "format": "date-time", "description": "A valid ISO-8601-formatted date and time, indicating the exclusive end of the query time range. Defaults to the current time." } }, { "in": "query", "name": "aggregation_period", "description": "An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month.", "required": false, "schema": { "type": "string", "default": "day", "enum": [ "day", "month" ] } } ], "responses": { "200": { "description": "A summary of usage for the specified time range.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformUsageSummary" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "usage" ] } }, "/users": { "get": { "description": "List all users", "operationId": "PlatformListUsers", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "name": "user_search", "description": "Search by user name or email", "in": "query", "schema": { "type": "string" } }, { "name": "role_id", "description": "Search by user role ID", "in": "query", "schema": { "$ref": "#/components/schemas/PlatformRoleID" } } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformUser" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users" ] }, "post": { "description": "Add new user", "operationId": "PlatformAddUser", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "email", "name", "roles" ], "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" }, "roles": { "description": "Roles for the user", "type": "array", "minItems": 0, "items": { "$ref": "#/components/schemas/PlatformRoleID" } } } } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformUser" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "405": { "$ref": "#/components/responses/PlatformMethodNotAllowed" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users", "admin" ] } }, "/users/{user_id}": { "get": { "description": "Get user details", "operationId": "PlatformGetUser", "parameters": [ { "$ref": "#/components/parameters/platform_user_id" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformUser" } } }, "description": "Response" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users", "admin" ] }, "patch": { "description": "Update user", "operationId": "PlatformUpdateUser", "parameters": [ { "$ref": "#/components/parameters/platform_user_id" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" }, "enabled": { "type": "boolean" }, "roles": { "description": "Roles for the user", "type": "array", "minItems": 0, "items": { "$ref": "#/components/schemas/PlatformRoleID" } } } } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformUser" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users", "admin" ] }, "delete": { "description": "Delete user", "operationId": "PlatformDeleteUser", "parameters": [ { "$ref": "#/components/parameters/platform_user_id" } ], "responses": { "204": { "description": "Response" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users", "admin" ] } }, "/users/{user_id}/totp": { "delete": { "description": "Disable/Reset MFA for a specific user", "operationId": "PlatformDeleteUserTOTP", "parameters": [ { "$ref": "#/components/parameters/platform_user_id" } ], "responses": { "204": { "description": "Success" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "405": { "$ref": "#/components/responses/PlatformMethodNotAllowed" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users" ] } }, "/auth/saml": { "get": { "description": "Get SAML integration information", "operationId": "PlatformGetSAML", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSAMLConfig" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "admin" ] }, "patch": { "description": "Update SAML integration information", "operationId": "PlatformUpdateSAML", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSAMLConfigUpdate" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSAMLConfig" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "admin" ] } }, "/auth/saml/rollover": { "put": { "description": "Create new SAML rollover certificate", "operationId": "PlatformCreateSAMLRolloverCertificate", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSAMLConfig" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "409": { "$ref": "#/components/responses/PlatformConflict" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "admin" ] }, "delete": { "description": "Delete current SAML rollover certificate", "operationId": "PlatformDeleteSAMLRolloverCertificate", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "fingerprint" ], "properties": { "fingerprint": { "type": "string", "description": "The fingerprint of the rollover certificate to delete", "example": "SHA256:AB:CD:EF:12:34:56:78:90:AB:CD:EF:12:34:56:78:90" } } } } } }, "responses": { "204": { "description": "Success" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "admin" ] } }, "/auth/saml/rollover/promote": { "put": { "description": "Promote SAML rollover certificate", "operationId": "PlatformPromoteSAMLRolloverCertificate", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "fingerprint" ], "properties": { "fingerprint": { "type": "string", "description": "The fingerprint of the rollover certificate to promote", "example": "SHA256:AB:CD:EF:12:34:56:78:90:AB:CD:EF:12:34:56:78:90" } } } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSAMLConfig" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "admin" ] } }, "/settings": { "get": { "description": "Show current platform settings", "operationId": "PlatformGetSettings", "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSettings" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "admin" ] }, "patch": { "description": "Update platform settings", "operationId": "PlatformUpdateSettings", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSettingsUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSettings" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "admin" ] } }, "/settings/data": { "get": { "description": "Show current platform data settings", "operationId": "PlatformGetDataSettings", "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformDataSettings" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "admin" ] }, "patch": { "description": "Update platform data settings", "operationId": "PlatformUpdateDataSettings", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformDataSettingsUpdate" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformDataSettings" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "admin" ] } }, "/user": { "get": { "description": "Get the current authenticated user from the OAuth token\n", "operationId": "PlatformGetCurrentUser", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PlatformUser" }, { "type": "object", "properties": { "event_identifiers": { "type": "object", "additionalProperties": true }, "group_identifier": { "type": "string" }, "registered_team_name": { "type": "string", "description": "The name of the team that the platform is registered with" }, "registered_team_internal": { "type": "boolean", "description": "Whether the team is internal or not" }, "can_set_password": { "type": "boolean", "description": "True only when the user has no password set and is eligible to set one (local provider, enabled). Frontends can use this after a magic-link login to optionally prompt for an initial password. False when a password is already set, for SSO-managed accounts, and for disabled users. Expired-password reset is handled separately via the `password_expired` token claim and is not affected by this field." } } } ] } } }, "description": "Response" }, "401": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PlatformBasicError" }, { "properties": { "password_reset_required": { "type": "boolean", "description": "Whether the user needs to reset their password" } } } ] } } }, "description": "Unauthorized" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users" ] }, "patch": { "description": "Update attributes for the current authenticated user from the OAuth token", "operationId": "PlatformUpdateCurrentUser", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "$ref": "#/components/schemas/PlatformUserName" }, "tracking_opt_in": { "type": "boolean", "description": "Whether to opt in or out of anonymous user tracking" } } } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformUser" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "405": { "$ref": "#/components/responses/PlatformMethodNotAllowed" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users" ] } }, "/user/authenticate": { "post": { "description": "Authenticate a user with password", "operationId": "PlatformAuthenticateUser", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "email", "password" ], "properties": { "email": { "type": "string" }, "password": { "type": "string" } } } } } }, "responses": { "200": { "description": "Authentication is successful", "content": { "application/json": { "schema": { "required": [ "id_token" ], "properties": { "id_token": { "type": "string", "x-go-name": "IDToken" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "405": { "$ref": "#/components/responses/PlatformMethodNotAllowed" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "429": { "$ref": "#/components/responses/PlatformTooManyRequests" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users" ], "security": [] } }, "/user/authenticated-status": { "get": { "description": "Return the authentication state of the current request along with the MFA\nand SAML configuration the frontend needs to render the login UI. Missing\nor invalid credentials still produce a 200 response rather than 401/205,\nso clients can probe auth state without handling unauthorized responses.\nServer-side failures (e.g. database unavailable) may still surface as 5xx.\n", "operationId": "PlatformCheckUserAuthStatus", "parameters": [], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "authenticated", "mfa_required" ], "properties": { "authenticated": { "type": "boolean", "description": "Whether the request can access protected resources right now. False when the user is not logged in, or when MFA is required (by tenant policy or because the user has MFA configured) and the session has not yet completed MFA verification." }, "mfa_required": { "type": "boolean", "description": "Whether the tenant policy requires users to configure MFA. This reflects the org-level setting only and is independent of whether the calling user has MFA configured.", "x-go-name": "MFARequired" }, "mfa_configured": { "type": "boolean", "description": "Whether the authenticated user has MFA configured. Omitted when not authenticated or when the session was authenticated with an API key.", "x-go-name": "MFAConfigured" }, "saml_login_url": { "type": "string", "description": "Login URL for SAML authentication. Present only when SAML is enabled for the tenant.", "x-go-name": "SAMLLoginURL" } } } } } }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "security": [], "tags": [ "users" ] } }, "/user/change-password": { "post": { "description": "Change user password", "operationId": "PlatformChangeUserPassword", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "email", "old_password", "new_password" ], "properties": { "email": { "type": "string" }, "old_password": { "type": "string" }, "new_password": { "type": "string" } } } } } }, "responses": { "204": { "description": "Successful", "headers": { "Set-Cookie": { "description": "Reset session cookie", "schema": { "type": "string", "example": "__session=; HttpOnly; Secure; SameSite=None; Path=/; Max-Age=3600" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "405": { "$ref": "#/components/responses/PlatformMethodNotAllowed" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users" ] } }, "/user/totp/verify": { "post": { "description": "Verify a one time password for MFA", "operationId": "PlatformUserTOTPVerify", "parameters": [ { "name": "__cqp_sess", "in": "cookie", "style": "form", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "otp" ], "properties": { "otp": { "type": "string", "x-go-name": "OTP" } } } } } }, "responses": { "204": { "description": "Multifactor authentication is complete.", "headers": { "Set-Cookie": { "description": "Session cookie", "schema": { "type": "string", "example": "__session=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9Cg...; HttpOnly; Secure; SameSite=None; Path=/; Max-Age=3600" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "405": { "$ref": "#/components/responses/PlatformMethodNotAllowed" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "429": { "$ref": "#/components/responses/PlatformTooManyRequests" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users" ] } }, "/user/totp": { "post": { "description": "Set up MFA for the current user", "operationId": "PlatformUserTOTPSetup", "parameters": [], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "secret", "url" ], "properties": { "url": { "type": "string" }, "secret": { "type": "string" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "405": { "$ref": "#/components/responses/PlatformMethodNotAllowed" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users" ] }, "delete": { "description": "Disable MFA for the current user", "operationId": "PlatformUserTOTPDelete", "parameters": [], "responses": { "204": { "description": "Success" }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "405": { "$ref": "#/components/responses/PlatformMethodNotAllowed" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users" ] } }, "/user/login": { "post": { "description": "Start a session using ID token", "operationId": "PlatformLoginUser", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "id_token" ], "properties": { "id_token": { "type": "string", "x-go-name": "IDToken" } } } } } }, "responses": { "204": { "description": "Authentication is complete.", "headers": { "Set-Cookie": { "description": "Session cookie", "schema": { "type": "string", "example": "__session=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9Cg...; HttpOnly; Secure; SameSite=None; Path=/; Max-Age=3600" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "405": { "$ref": "#/components/responses/PlatformMethodNotAllowed" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users" ], "security": [] }, "delete": { "description": "Logout a session", "operationId": "PlatformLogoutUser", "responses": { "204": { "description": "Logout is complete.", "headers": { "Set-Cookie": { "description": "Empty session cookie", "schema": { "type": "string", "example": "__session=; HttpOnly; Secure; SameSite=None; Path=/; Max-Age=3600" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "405": { "$ref": "#/components/responses/PlatformMethodNotAllowed" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users" ] } }, "/user/magic-login": { "post": { "description": "Exchange a one-shot magic-link token (minted by CloudQuery cloud) for a platform ID token. The handler validates the token by calling cloud's consume endpoint and, on success, looks up the local user by email and mints an ID token. The frontend then exchanges the ID token for a session cookie via the existing `POST /user/login` endpoint.\n", "operationId": "PlatformMagicLoginUser", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "token" ], "properties": { "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "Magic-link accepted; returns a platform ID token.", "content": { "application/json": { "schema": { "required": [ "id_token" ], "properties": { "id_token": { "type": "string", "x-go-name": "IDToken" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "405": { "$ref": "#/components/responses/PlatformMethodNotAllowed" }, "429": { "$ref": "#/components/responses/PlatformTooManyRequests" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "users" ], "security": [] } }, "/v2/sync-destination-test-connections": { "post": { "description": "Create a test destination connection.", "operationId": "PlatformCreateV2SyncDestinationTestConnection", "tags": [ "syncs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCreateSyncDestinationTestConnectionV2" } } } }, "responses": { "201": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestinationTestConnectionV2" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "429": { "$ref": "#/components/responses/PlatformTooManyRequests" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/v2/sync-destinations": { "post": { "description": "Create sync destination based on test connection.", "operationId": "PlatformCreateV2SyncDestination", "tags": [ "syncs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCreateSyncDestinationV2" } } } }, "responses": { "200": { "description": "Successful response indicating that an existing sync destination was replaced.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestinationV2" } } } }, "201": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestinationV2" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "get": { "description": "List all sync destination definitions.", "operationId": "PlatformGetV2SyncDestinations", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_sync_name_filter" }, { "$ref": "#/components/parameters/platform_sync_generic_sort_bys" }, { "$ref": "#/components/parameters/platform_sync_sort_dirs" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformSyncDestinationV2" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/v2/sync-destinations/{sync_destination_name}": { "get": { "description": "Get a single sync destination definition.", "operationId": "PlatformGetV2SyncDestination", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_destination_name" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestinationV2" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "patch": { "description": "Update a Sync Destination definition.", "operationId": "PlatformPatchV2SyncDestination", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_destination_name" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestinationUpdateV2" } } } }, "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformSyncDestination" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } }, "delete": { "description": "Delete a Sync Destination definition. Any syncs relying on this destination must be deleted first.", "operationId": "PlatformDeleteV2SyncDestination", "tags": [ "syncs" ], "parameters": [ { "$ref": "#/components/parameters/platform_sync_destination_name" } ], "responses": { "204": { "description": "Deleted" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } } } }, "/rbac/permissions": { "get": { "description": "List all permissions", "operationId": "PlatformListAllRBACPermissions", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_rbac_permissions_sort_bys" }, { "$ref": "#/components/parameters/platform_rbac_permissions_sort_dirs" }, { "name": "search_term", "in": "query", "schema": { "type": "string" }, "description": "Filter permissions by name or description." } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformRBACPermission" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "rbac" ] }, "post": { "description": "Create a permission", "operationId": "PlatformCreateRBACPermission", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformRBACPermissionCreate" } } } }, "responses": { "201": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformRBACPermission" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "rbac" ] } }, "/rbac/permissions/{permission_id}": { "get": { "description": "Get a permission", "operationId": "PlatformGetRBACPermission", "parameters": [ { "$ref": "#/components/parameters/platform_rbac_permission_id" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformRBACPermission" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "rbac" ] }, "patch": { "description": "Update a permission", "operationId": "PlatformUpdateRBACPermission", "parameters": [ { "$ref": "#/components/parameters/platform_rbac_permission_id" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformRBACPermissionUpdate" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformRBACPermission" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "rbac" ] }, "delete": { "description": "Delete a permission", "operationId": "PlatformDeleteRBACPermission", "parameters": [ { "$ref": "#/components/parameters/platform_rbac_permission_id" } ], "responses": { "204": { "description": "Success" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "rbac" ] } }, "/rbac/roles": { "get": { "description": "List all roles", "operationId": "PlatformListAllRBACRoles", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" }, { "$ref": "#/components/parameters/platform_rbac_roles_sort_bys" }, { "$ref": "#/components/parameters/platform_rbac_roles_sort_dirs" }, { "name": "search_term", "in": "query", "schema": { "type": "string" }, "description": "Filter roles by name or description." }, { "name": "type", "in": "query", "schema": { "type": "string" }, "description": "Filter roles by type." } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformRole" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "rbac" ] }, "post": { "description": "Create a role", "operationId": "PlatformCreateRBACRole", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformRBACRoleCreate" } } } }, "responses": { "201": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformRole" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "rbac" ] } }, "/rbac/roles/{role_id}": { "get": { "description": "Get a role", "operationId": "PlatformGetRBACRole", "parameters": [ { "$ref": "#/components/parameters/platform_rbac_role_id" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformRole" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "rbac" ] }, "patch": { "description": "Update a role (custom roles only)", "operationId": "PlatformUpdateRBACRole", "parameters": [ { "$ref": "#/components/parameters/platform_rbac_role_id" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformRBACRoleUpdate" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformRole" } } } }, "400": { "$ref": "#/components/responses/PlatformBadRequest" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "rbac" ] }, "delete": { "description": "Delete a role", "operationId": "PlatformDeleteRBACRole", "parameters": [ { "$ref": "#/components/parameters/platform_rbac_role_id" } ], "responses": { "204": { "description": "Success" }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "422": { "$ref": "#/components/responses/PlatformUnprocessableEntity" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "rbac" ] } }, "/teams": { "get": { "description": "List all teams", "operationId": "PlatformListTeams", "parameters": [ { "$ref": "#/components/parameters/platform_per_page" }, { "$ref": "#/components/parameters/platform_page" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "required": [ "items", "metadata" ], "properties": { "items": { "items": { "$ref": "#/components/schemas/PlatformTeam" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/PlatformListMetadata" } } } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "403": { "$ref": "#/components/responses/PlatformForbidden" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "teams" ] } }, "/teams/{team_name}/plugins/{plugin_team}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}": { "get": { "description": "Download an asset for a given plugin version as the current team.", "operationId": "PlatformDownloadPluginAssetByTeam", "parameters": [ { "in": "header", "name": "Accept", "required": false, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/platform_team_name" }, { "$ref": "#/components/parameters/platform_plugin_team" }, { "$ref": "#/components/parameters/platform_plugin_kind" }, { "$ref": "#/components/parameters/platform_plugin_name" }, { "$ref": "#/components/parameters/platform_version_name" }, { "$ref": "#/components/parameters/platform_target_name" } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPluginAsset" } } } }, "302": { "description": "Response", "headers": { "Location": { "schema": { "type": "string" } } } }, "401": { "$ref": "#/components/responses/PlatformRequiresAuthentication" }, "404": { "$ref": "#/components/responses/PlatformNotFound" }, "429": { "$ref": "#/components/responses/PlatformTooManyRequests" }, "500": { "$ref": "#/components/responses/PlatformInternalError" } }, "tags": [ "plugins" ] } } }, "components": { "securitySchemes": { "bearerAuth": { "scheme": "bearer", "type": "http" }, "basicAuth": { "scheme": "basic", "type": "http" }, "cookieAuth": { "scheme": "cookie", "type": "http" } }, "parameters": { "platform_per_page": { "description": "The number of results per page (max 1000).", "in": "query", "name": "per_page", "required": false, "schema": { "default": 100, "maximum": 1000, "minimum": 1, "type": "integer", "format": "int64" } }, "platform_page": { "description": "Page number of the results to fetch", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "minimum": 1, "type": "integer", "format": "int64" } }, "platform_plugin_sort_by": { "description": "The field to sort by", "in": "query", "name": "sort_by", "required": false, "schema": { "enum": [ "created_at", "updated_at", "name", "downloads" ], "type": "string" } }, "platform_plugin_include_release_stages": { "description": "Include these release stages in the response", "in": "query", "name": "include_release_stages", "required": false, "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPluginReleaseStage" } } }, "platform_plugin_exclude_release_stages": { "description": "Exclude these release stages from the response", "in": "query", "name": "exclude_release_stages", "required": false, "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "default": [ "deprecated" ], "items": { "$ref": "#/components/schemas/PlatformPluginReleaseStage" } } }, "platform_team_name": { "in": "path", "name": "team_name", "required": true, "schema": { "$ref": "#/components/schemas/PlatformTeamName" } }, "platform_plugin_kind": { "in": "path", "name": "plugin_kind", "required": true, "schema": { "$ref": "#/components/schemas/PlatformPluginKind" } }, "platform_plugin_name": { "in": "path", "name": "plugin_name", "required": true, "schema": { "$ref": "#/components/schemas/PlatformPluginName" } }, "platform_version_sort_by": { "description": "The field to sort by", "in": "query", "name": "sort_by", "required": false, "schema": { "enum": [ "created_at" ], "type": "string" } }, "platform_include_drafts": { "description": "Whether to include draft versions", "in": "query", "name": "include_drafts", "required": false, "schema": { "type": "boolean" } }, "platform_include_fips": { "description": "Whether to include fips versions", "in": "query", "name": "include_fips", "required": false, "schema": { "type": "boolean" } }, "platform_include_prereleases": { "description": "Whether to include prerelease versions", "in": "query", "name": "include_prereleases", "required": false, "schema": { "type": "boolean" } }, "platform_version_filter": { "in": "query", "name": "version_filter", "required": false, "schema": { "$ref": "#/components/schemas/PlatformVersionFilter" } }, "platform_version_name": { "in": "path", "name": "version_name", "required": true, "schema": { "$ref": "#/components/schemas/PlatformVersionName" } }, "platform_target_name": { "in": "path", "name": "target_name", "required": true, "schema": { "type": "string" } }, "platform_alert_states": { "name": "state", "in": "query", "description": "Alert states", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformAlertState" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "AlertStates" }, "platform_enabled": { "name": "enabled", "in": "query", "description": "Enabled", "schema": { "type": "boolean" } }, "platform_query_tags": { "name": "tag", "in": "query", "description": "Query tags", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformQueryTag" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "QueryTags" }, "platform_policy_status": { "in": "query", "name": "status", "required": false, "schema": { "$ref": "#/components/schemas/PlatformPolicyStatus" }, "x-go-name": "PolicyStatus" }, "platform_policy_id": { "in": "path", "name": "policy_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformPolicyID" }, "x-go-name": "PolicyID" }, "platform_policy_group_id": { "in": "path", "name": "policy_group_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformPolicyGroupID" }, "x-go-name": "PolicyGroupID" }, "platform_apikey_id": { "name": "apikey_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/PlatformAPIKeyID" }, "x-go-name": "APIKeyID" }, "platform_agent_custom_context_id": { "in": "path", "name": "agent_custom_context_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformAgentCustomContextID" }, "x-go-name": "AgentCustomContextID" }, "platform_conversation_id": { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "ID of the chat conversation", "x-go-name": "ConversationID" }, "platform_custom_columns_sort_bys": { "name": "sort_by", "in": "query", "description": "Sort by options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformCustomColumnSortBy" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "CustomColumnSortBys" }, "platform_custom_columns_sort_dirs": { "name": "sort_dir", "in": "query", "description": "Custom column sort direction options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformCustomColumnSortDirection" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "CustomColumnSortDirections" }, "platform_custom_column_id": { "in": "path", "name": "custom_column_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformCustomColumnID" }, "x-go-name": "CustomColumnID" }, "platform_filter_tags": { "name": "tag", "in": "query", "description": "Filter tags", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformFilterTag" } }, "x-go-name": "FilterTags" }, "platform_filter_name_filter": { "name": "name_filter", "in": "query", "required": false, "schema": { "description": "Filter by filter name", "type": "string" } }, "platform_filter_expression_filter": { "name": "expression_filter", "in": "query", "required": false, "schema": { "description": "Filter by filter expression", "type": "string" } }, "platform_filter_id": { "in": "path", "name": "filter_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformFilterID" }, "x-go-name": "FilterID" }, "platform_notification_destination_id": { "in": "path", "name": "notification_destination_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformNotificationDestinationID" } }, "platform_onboarding_id": { "name": "onboarding_id", "in": "path", "required": true, "x-go-name": "OnboardingID", "schema": { "$ref": "#/components/schemas/PlatformOnboardingID" } }, "platform_aws_orgunit_id": { "name": "aws_orgunit_id", "in": "path", "required": true, "x-go-name": "OrganizationalUnitID", "schema": { "$ref": "#/components/schemas/PlatformOrganizationalUnitID" } }, "platform_query_name_filter": { "name": "name_filter", "in": "query", "required": false, "schema": { "description": "Filter by query name.", "type": "string" } }, "platform_query_filter": { "name": "query_filter", "in": "query", "required": false, "schema": { "description": "Filter by query", "type": "string" } }, "platform_alert_configured": { "name": "alert_configured", "in": "query", "description": "Alert configured", "schema": { "type": "boolean" } }, "platform_alert_message_filter": { "name": "alert_message_filter", "in": "query", "required": false, "schema": { "description": "Filter by alert message.", "type": "string" } }, "platform_alert_enabled": { "name": "alert_enabled", "in": "query", "description": "Alert enabled", "schema": { "type": "boolean" } }, "platform_query_column_filter": { "name": "column_filter", "in": "query", "description": "Filter queries that return all specified columns", "required": false, "explode": true, "schema": { "type": "array", "items": { "type": "string" } } }, "platform_table_selects": { "name": "select", "in": "query", "description": "Table selects. This filters the columns that are returned in the result set. If empty, all default columns + internal _cq_* columns are returned. To select all columns, use the `*` wildcard.", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformTableSelect" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "Selects" }, "platform_table_filter_mode": { "name": "filter_mode", "in": "query", "description": "Table filter mode.\n\nSmart mode switches between column and search mode based on the filtered table and\n\nSearch mode allows searching deeply nested data but is not available on all tables as it requires a separate indexing step.\nSearch mode is only available on resource tables or queries derived from resource tables results that contain _cq_id and _cq_source_id.\nSearch mode may also be used against cloud_assets but it will only return results from resource tables.\n\nColumn mode searches purely using the columns in the table.\nIt will work on all table results but it is not optimized for arbitrary substring searches and so may be slow on larger tables.\n", "schema": { "type": "string", "enum": [ "smart", "search", "column" ], "default": "smart" } }, "platform_table_filters": { "name": "filter", "in": "query", "description": "Table filters. This filters the rows that are returned in the result set.", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformFilterExpression" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "Filters" }, "platform_table_filter_ids": { "name": "filter_id", "in": "query", "description": "Table filter IDs. These should be valid Saved Filter IDs. These filters\nwill be applied to the query results before returning them.\n", "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformFilterID" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "FilterIDs" }, "platform_table_sort_bys": { "name": "sort_by", "in": "query", "description": "Table sort by options. This sorts the rows that are returned in the result set.", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformTableSortBy" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "SortBys" }, "platform_table_sort_dirs": { "name": "sort_dir", "in": "query", "description": "Table sort direction options. This sorts the rows that are returned in the result set.", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformTableSortDirection" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "SortDirections" }, "platform_table_group_bys": { "name": "group_by", "in": "query", "description": "Table group by options. This groups the rows that are returned in the result set by the given columns.", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformTableGroupBy" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "GroupBys" }, "platform_query_id": { "in": "path", "name": "query_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformQueryID" }, "x-go-name": "QueryID" }, "platform_insight_column_name": { "in": "path", "name": "column_name", "required": true, "description": "Column for distinct values. Can be a standard column (severity, insight-category, source-category, source, resource-type, account, tag) or an arbitrary owner tag key when is_owner=true.", "schema": { "type": "string" }, "x-go-name": "InsightColumnName" }, "platform_insight_filter_id": { "in": "path", "name": "insight_filter_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformInsightFilterID" }, "x-go-name": "InsightFilterID" }, "platform_insight_id": { "in": "path", "name": "insight_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformInsightID" }, "x-go-name": "InsightID" }, "platform_insight_asset_column_name": { "in": "path", "name": "column_name", "required": true, "description": "Filter dimension for distinct asset values. Allowed values: cloud, region, account, resource-type, instance-type, tag.", "schema": { "type": "string", "enum": [ "cloud", "region", "account", "resource-type", "instance-type", "tag" ] }, "x-go-name": "InsightAssetColumnName" }, "platform_asset_id": { "in": "path", "name": "asset_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformTableRowID" }, "x-go-name": "AssetID" }, "platform_report_sort_bys": { "name": "sort_by", "in": "query", "description": "Sort by options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformReportSortBy" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "ReportSortBys" }, "platform_report_sort_dirs": { "name": "sort_dir", "in": "query", "description": "Report sort direction options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformReportSortDirection" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "ReportSortDirections" }, "platform_report_templates_sort_bys": { "name": "sort_by", "in": "query", "description": "Sort by options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformReportTemplateSortBy" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "ReportTemplateSortBys" }, "platform_report_templates_sort_dirs": { "name": "sort_dir", "in": "query", "description": "Report template sort direction options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformReportTemplateSortDirection" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "ReportTemplateSortDirections" }, "platform_sync_destination_test_connection_id": { "name": "sync_destination_test_connection_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/PlatformSyncDestinationTestConnectionID" }, "x-go-name": "SyncDestinationTestConnectionID" }, "platform_download_file": { "description": "Whether to generate a downloadable file for the response.", "in": "query", "name": "download", "required": false, "schema": { "type": "boolean" } }, "platform_sync_name_filter": { "name": "filter", "in": "query", "required": false, "schema": { "description": "Filter by name or display name", "type": "string", "pattern": "^[a-zA-Z\\p{L}\\p{N}_ \\-']*$", "x-pattern-message": "can contain only letters, numbers, spaces, hyphens, underscores, and apostrophes" } }, "platform_sync_generic_sort_bys": { "name": "sort_by", "in": "query", "description": "Sort by options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncGenericSortBy" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "SyncGenericSortBys" }, "platform_sync_sort_dirs": { "name": "sort_dir", "in": "query", "description": "Sync sort direction options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncSortDirection" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "SyncSortDirections" }, "platform_sync_destination_name": { "name": "sync_destination_name", "in": "path", "required": true, "schema": { "description": "Unique name of the sync destination", "type": "string", "pattern": "^[a-zA-Z0-9_-]+$", "x-go-name": "SyncDestinationName", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" } }, "platform_sync_sort_bys": { "name": "sort_by", "in": "query", "description": "Sort by options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncSortBy" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "SyncSortBys" }, "platform_migration_filter": { "name": "migration_filter", "in": "query", "required": false, "schema": { "description": "Filter by migration", "type": "boolean" } }, "platform_sync_test_connection_id": { "name": "sync_test_connection_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/PlatformSyncTestConnectionID" } }, "platform_sync_source_test_connection_id": { "name": "sync_source_test_connection_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/PlatformSyncSourceTestConnectionID" }, "x-go-name": "SyncSourceTestConnectionID" }, "platform_sync_name": { "name": "sync_name", "in": "path", "required": true, "schema": { "description": "Unique name of the sync", "type": "string", "pattern": "^[a-zA-Z0-9_-]+$", "x-go-name": "SyncName", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" } }, "platform_sync_source_name": { "name": "sync_source_name", "in": "path", "required": true, "schema": { "description": "Unique name of the sync source", "type": "string", "pattern": "^[a-zA-Z0-9_-]+$", "x-go-name": "SyncSourceName", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" } }, "platform_sync_transformer_name": { "name": "sync_transformer_name", "in": "path", "required": true, "schema": { "description": "Unique name of the sync transformer", "type": "string", "pattern": "^[a-zA-Z0-9_-]+$", "x-go-name": "SyncTransformerName", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" } }, "platform_sync_upgrades_sort_bys": { "name": "sort_by", "in": "query", "description": "Sort by options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "kind", "path", "prev_version", "new_version", "created_at" ] } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "SyncUpgradesSortBys" }, "platform_sync_upgrades_path_filter": { "name": "path", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/aws", "description": "Filter by plugin path" } }, "platform_sync_upgrades_kind_filter": { "name": "kind", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/PlatformPluginKind", "description": "Filter by plugin kind" } }, "platform_sync_upgrades_platform_version_filter": { "name": "platform_version", "in": "query", "required": false, "schema": { "type": "string", "example": "v1.1.0", "description": "Filter by platform version" } }, "platform_sync_run_id": { "name": "sync_run_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/PlatformSyncRunID" } }, "platform_sync_run_table_sort_bys": { "name": "sort_by", "in": "query", "description": "Sync run table sort by options. This sorts the rows that are returned in the result set.", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncRunTableSortBy" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "SyncRunTableSortBys" }, "platform_table_name": { "in": "path", "name": "table_name", "required": true, "schema": { "$ref": "#/components/schemas/PlatformTableName" } }, "platform_table_row_id": { "in": "path", "name": "table_row_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformTableRowID" } }, "platform_table_column_name_filter": { "name": "filter", "in": "query", "required": false, "schema": { "description": "Filter by column name", "type": "string" } }, "platform_column_name": { "in": "path", "name": "column_name", "required": true, "schema": { "description": "The name of a table column.", "type": "string" } }, "platform_table_column_value_filter": { "name": "filter", "in": "query", "required": false, "schema": { "description": "Filter by column value.", "type": "string" } }, "platform_user_id": { "name": "user_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/PlatformUserID" }, "x-go-name": "UserID" }, "platform_rbac_permissions_sort_bys": { "name": "sort_by", "in": "query", "description": "Sort by options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRBACPermissionSortBy" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "RBACPermissionSortBys" }, "platform_rbac_permissions_sort_dirs": { "name": "sort_dir", "in": "query", "description": "Sort direction options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRBACPermissionSortDirection" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "RBACPermissionSortDirections" }, "platform_rbac_permission_id": { "in": "path", "name": "permission_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformRBACPermissionID" }, "x-go-name": "RBACPermissionID" }, "platform_rbac_roles_sort_bys": { "name": "sort_by", "in": "query", "description": "Sort by options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRBACRoleSortBy" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "RBACRoleSortBys" }, "platform_rbac_roles_sort_dirs": { "name": "sort_dir", "in": "query", "description": "Sort direction options", "allowEmptyValue": true, "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRBACRoleSortDirection" } }, "x-go-type-skip-optional-pointer": true, "x-go-name": "RBACRoleSortDirections" }, "platform_rbac_role_id": { "in": "path", "name": "role_id", "required": true, "schema": { "$ref": "#/components/schemas/PlatformRoleID" }, "x-go-name": "RoleID" }, "platform_plugin_team": { "in": "path", "name": "plugin_team", "required": true, "schema": { "$ref": "#/components/schemas/PlatformTeamName" } } }, "schemas": { "PlatformUserName": { "description": "The unique name for the user.", "minLength": 1, "maxLength": 255, "pattern": "^[a-zA-Z\\p{L}][a-zA-Z\\p{L} \\-']*$", "x-pattern-message": "can contain only letters, spaces, hyphens, and apostrophes, starting with a letter", "type": "string", "example": "Sarah O'Connor" }, "PlatformUserProvider": { "title": "LocalUserProvider", "type": "string", "enum": [ "local", "saml" ], "default": "local" }, "PlatformRBACPermissionID": { "description": "The unique ID for the data permission.", "type": "string", "format": "uuid", "x-go-name": "RBACPermissionID" }, "PlatformUserID": { "description": "ID of the User", "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "x-go-name": "UserID" }, "PlatformCreatedBy": { "type": "object", "required": [ "id", "name", "email" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformUserID" }, "name": { "$ref": "#/components/schemas/PlatformUserName" }, "email": { "type": "string" } } }, "PlatformRBACPermission": { "type": "object", "required": [ "id", "name", "description", "query", "created_by", "created_at", "updated_at", "number_of_affected_roles", "number_of_affected_users" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformRBACPermissionID" }, "name": { "type": "string" }, "description": { "type": "string" }, "query": { "type": "string" }, "created_by": { "$ref": "#/components/schemas/PlatformCreatedBy" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "updated_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "number_of_affected_roles": { "type": "integer" }, "number_of_affected_users": { "type": "integer" } } }, "PlatformRoleType": { "type": "string", "enum": [ "admin:write", "admin:read", "general:read", "general:write", "ci", "schema-only", "custom" ], "x-enum-varnames": [ "AdminWrite", "AdminRead", "GeneralRead", "GeneralWrite", "CI", "SchemaOnly", "Custom" ] }, "PlatformRole": { "type": "object", "description": "Role", "required": [ "id", "name", "description", "permissions", "created_by", "created_at", "updated_at", "type" ], "properties": { "id": { "description": "The unique ID for the role.", "type": "string", "format": "uuid", "x-go-name": "ID" }, "name": { "type": "string" }, "description": { "type": "string" }, "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRBACPermission" } }, "created_by": { "$ref": "#/components/schemas/PlatformCreatedBy" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "updated_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "type": { "$ref": "#/components/schemas/PlatformRoleType" } } }, "PlatformUser": { "additionalProperties": false, "description": "User", "properties": { "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "id": { "description": "ID of the User", "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "x-go-name": "ID" }, "email": { "type": "string", "example": "user@example.com" }, "name": { "$ref": "#/components/schemas/PlatformUserName" }, "updated_at": { "example": "2017-07-14T16:53:42Z", "type": "string", "format": "date-time" }, "profile_image_url": { "type": "string", "description": "Profile image URL of user", "x-go-name": "ProfileImageURL" }, "last_login_at": { "type": "string", "format": "date-time" }, "provider": { "$ref": "#/components/schemas/PlatformUserProvider" }, "tracking_opted_in": { "type": "boolean", "description": "Whether anonymous user tracking was opted into" }, "mfa_configured": { "type": "boolean", "description": "Whether the user has MFA configured", "x-go-name": "MFAConfigured" }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRole" } }, "enabled": { "type": "boolean", "description": "Whether the user is enabled" } }, "required": [ "id", "email", "enabled", "provider", "mfa_configured", "roles" ], "title": "User", "type": "object" }, "PlatformAuditLogEvent": { "type": "object", "required": [ "id", "user", "event_type", "created_at", "user_ip_address" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique identifier of the audit log event" }, "user": { "$ref": "#/components/schemas/PlatformUser", "description": "The user who performed the action" }, "user_ip_address": { "type": "string", "description": "The IP address of the user who performed the action" }, "event_type": { "type": "string", "description": "The type of event that was logged" }, "entity_display_name": { "type": "string", "description": "The display name of the entity that was affected", "nullable": true }, "event_details": { "type": "object", "description": "Additional details about the event", "additionalProperties": true }, "is_success": { "type": "boolean", "description": "Whether the event was successful" }, "created_at": { "type": "string", "format": "date-time", "description": "The timestamp when the event was created" } } }, "PlatformListMetadata": { "required": [ "page_size" ], "properties": { "total_count": { "type": "integer" }, "last_page": { "type": "integer" }, "page_size": { "type": "integer" }, "time_ms": { "type": "integer" } } }, "PlatformBasicError": { "additionalProperties": false, "description": "Basic Error", "required": [ "message", "status" ], "properties": { "message": { "type": "string" }, "status": { "type": "integer" } }, "title": "Basic Error", "type": "object" }, "PlatformFieldError": { "allOf": [ { "$ref": "#/components/schemas/PlatformBasicError" }, { "properties": { "errors": { "items": { "type": "string" }, "type": "array" }, "field_errors": { "additionalProperties": { "type": "string" }, "type": "object" } }, "type": "object" } ] }, "PlatformVersion": { "type": "object", "required": [ "name", "created_at" ], "properties": { "name": { "type": "string", "description": "Name of the version" }, "created_at": { "type": "string", "format": "date-time", "description": "Time when the version was first installed" } } }, "PlatformPluginReleaseStage": { "description": "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", "type": "string", "enum": [ "coming-soon", "preview", "ga", "deprecated" ] }, "PlatformTeamName": { "description": "The unique name for the team.", "maxLength": 255, "pattern": "^[a-z](-?[a-z0-9]+)+$", "type": "string", "example": "cloudquery", "x-pattern-message": "can contain only lowercase alphanumerical characters and dashes, starting with a letter" }, "PlatformPluginName": { "description": "The unique name for the plugin.", "maxLength": 255, "pattern": "^[a-z](-?[a-z0-9]+)+$", "type": "string", "example": "aws-source", "x-pattern-message": "can contain only lowercase alphanumerical characters and dashes, starting with a letter" }, "PlatformPluginKind": { "description": "The kind of plugin, ie. source or destination.", "type": "string", "example": "source", "enum": [ "source", "destination", "transformer" ] }, "PlatformPluginCategory": { "description": "Supported categories for plugins", "type": "string", "enum": [ "cloud-infrastructure", "databases", "sales-marketing", "engineering-analytics", "marketing-analytics", "shipment-tracking", "product-analytics", "cloud-finops", "project-management", "fleet-management", "security", "data-warehouses", "human-resources", "finance", "customer-support", "other" ] }, "PlatformPluginPriceCategory": { "description": "Supported price categories for billing", "type": "string", "enum": [ "api", "database", "free" ] }, "PlatformPluginTier": { "description": "This field is deprecated, refer to `price_category` instead.\nThis field is only kept for backward compatibility and may be removed in a future release.\nSupported tiers for plugins.\n - free: Free tier, with no paid tables.\n - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access.\n - open-core: This option is deprecated, values will either be free or paid.\n", "type": "string", "deprecated": true, "enum": [ "free", "paid", "open-core" ] }, "PlatformPlugin": { "additionalProperties": false, "description": "CloudQuery Plugin", "properties": { "team_name": { "$ref": "#/components/schemas/PlatformTeamName" }, "name": { "$ref": "#/components/schemas/PlatformPluginName" }, "kind": { "$ref": "#/components/schemas/PlatformPluginKind" }, "category": { "$ref": "#/components/schemas/PlatformPluginCategory" }, "price_category": { "$ref": "#/components/schemas/PlatformPluginPriceCategory" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "updated_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "homepage": { "type": "string", "example": "https://cloudquery.io" }, "logo": { "type": "string", "example": "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e" }, "display_name": { "description": "The plugin's display name", "type": "string", "minLength": 1, "maxLength": 50, "example": "AWS Source Plugin" }, "official": { "description": "True if the plugin is maintained by CloudQuery, false otherwise", "type": "boolean" }, "release_stage": { "$ref": "#/components/schemas/PlatformPluginReleaseStage" }, "repository": { "type": "string", "example": "https://github.com/cloudquery/cloudquery" }, "short_description": { "type": "string", "minLength": 1, "maxLength": 512, "example": "Sync data from AWS to any destination" }, "tier": { "$ref": "#/components/schemas/PlatformPluginTier" }, "public": { "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", "type": "boolean" }, "usd_per_row": { "deprecated": true, "type": "string", "pattern": "^\\d+(?:\\.\\d{1,10})?$", "description": "Deprecated. Refer to `price_category` instead.", "example": "0.0001", "x-go-name": "USDPerRow", "x-pattern-message": "must be a valid decimal number with up to 10 decimal places." }, "free_rows_per_month": { "deprecated": true, "type": "integer", "format": "int64", "description": "Deprecated. Refer to `price_category` instead.", "example": 1000 } }, "required": [ "team_name", "name", "kind", "category", "release_stage", "created_at", "updated_at", "logo", "display_name", "official", "short_description", "tier", "usd_per_row", "free_rows_per_month" ], "title": "CloudQuery Plugin", "type": "object" }, "PlatformVersionName": { "type": "string", "description": "The version in semantic version format.", "pattern": "^v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", "x-pattern-message": "should be in semantic version format" }, "PlatformListPlugin": { "allOf": [ { "$ref": "#/components/schemas/PlatformPlugin" }, { "type": "object", "properties": { "latest_version": { "$ref": "#/components/schemas/PlatformVersionName" } } } ] }, "PlatformListPlugins": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformListPlugin" }, "example": [ { "name": "aws", "kind": "source", "team_name": "cloudquery", "display_name": "AWS Source Plugin", "category": "cloud-infrastructure", "created_at": "2017-07-14T16:53:42Z", "updated_at": "2017-07-14T16:53:42Z", "homepage": "https://cloudquery.io", "logo": "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", "official": true, "short_description": "Sync data from AWS to any destination", "repository": "https://github.com/cloudquery/cloudquery", "tier": "paid", "usd_per_row": "0.00123", "free_rows_per_month": 10000, "release_stage": "preview" } ] }, "PlatformVersionFilter": { "type": "string", "description": "A version filter in semantic version format with prefix ranges.", "pattern": "^[^~]?v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", "x-pattern-message": "should be in semantic version format with prefix ranges" }, "PlatformPluginProtocols": { "description": "The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins).", "type": "array", "items": { "type": "integer", "enum": [ 3 ] } }, "PlatformPluginPackageType": { "description": "The package type of the plugin assets", "type": "string", "enum": [ "native", "docker" ] }, "PlatformPluginVersionBase": { "additionalProperties": false, "description": "CloudQuery Plugin Version", "required": [ "created_at", "name", "message", "draft", "retracted", "protocols", "supported_targets", "checksums", "package_type" ], "properties": { "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "The date and time the plugin version was created." }, "published_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "The date and time the plugin version was set to non-draft (published)." }, "name": { "$ref": "#/components/schemas/PlatformVersionName" }, "message": { "type": "string", "description": "Description of what's new or changed in this version (supports markdown)", "example": "- Added support for AWS S3 - Added support for AWS EC2" }, "draft": { "type": "boolean", "description": "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version." }, "retracted": { "type": "boolean", "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." }, "protocols": { "$ref": "#/components/schemas/PlatformPluginProtocols" }, "supported_targets": { "type": "array", "description": "The targets supported by this plugin version, formatted as _", "example": [ "linux_arm64", "darwin_amd64", "windows_amd64" ], "items": { "type": "string" } }, "checksums": { "type": "array", "items": { "type": "string" }, "description": "The checksums of the plugin assets" }, "package_type": { "$ref": "#/components/schemas/PlatformPluginPackageType" } }, "title": "CloudQuery Plugin Version", "type": "object" }, "PlatformPluginVersionList": { "allOf": [ { "$ref": "#/components/schemas/PlatformPluginVersionBase" } ] }, "PlatformPluginSpecJSONSchema": { "description": "The specification of the plugin. This is a JSON schema that describes the configuration of the plugin.", "type": "string" }, "PlatformPluginVersion": { "allOf": [ { "$ref": "#/components/schemas/PlatformPluginVersionBase" }, { "type": "object", "properties": { "spec_json_schema": { "$ref": "#/components/schemas/PlatformPluginSpecJSONSchema" } } } ] }, "PlatformPluginVersionDetails": { "allOf": [ { "$ref": "#/components/schemas/PlatformPluginVersion" }, { "type": "object", "required": [ "example_config" ], "properties": { "example_config": { "type": "string", "description": "Example configuration for the plugin. This can be used in generated quickstart guides, for example. Markdown format." }, "ui_base_url": { "type": "string", "description": "Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users.", "x-go-name": "UIBaseURL" }, "ui_base_url_v2": { "type": "string", "description": "Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users.", "x-go-name": "UIBaseURLv2" } } } ] }, "PlatformPluginAsset": { "additionalProperties": false, "description": "CloudQuery Plugin Asset", "required": [ "checksum", "location" ], "properties": { "checksum": { "type": "string", "description": "The checksum of the plugin asset" }, "location": { "type": "string", "format": "uri", "description": "The location to download the plugin asset from" } }, "title": "CloudQuery Plugin Asset", "type": "object" }, "PlatformPluginTableName": { "description": "Name of the table", "maxLength": 255, "pattern": "^[a-z](_?[a-z0-9]+)+$", "type": "string", "example": "aws_ec2_instances", "x-pattern-message": "can contain only lowercase alphanumerical characters and underscores, starting with a letter" }, "PlatformPluginTable": { "additionalProperties": false, "description": "CloudQuery Plugin Table", "required": [ "description", "is_incremental", "name", "relations", "title" ], "properties": { "description": { "description": "Description of the table", "type": "string", "example": "AWS S3 Buckets" }, "is_incremental": { "description": "Whether the table is incremental", "type": "boolean" }, "name": { "$ref": "#/components/schemas/PlatformPluginTableName" }, "parent": { "description": "Name of the parent table, if any", "type": "string", "example": "nil" }, "relations": { "description": "Names of the tables that depend on this table", "items": { "type": "string" }, "type": "array", "example": [ "aws_s3_bucket_cors_rules" ] }, "title": { "description": "Title of the table", "type": "string", "example": "AWS S3 Buckets" }, "is_paid": { "description": "Whether the table is paid", "type": "boolean" } }, "title": "CloudQuery Plugin Table", "type": "object" }, "PlatformPluginTableColumn": { "additionalProperties": false, "description": "CloudQuery Plugin Column", "required": [ "description", "incremental_key", "name", "not_null", "primary_key", "type", "unique" ], "properties": { "description": { "description": "Description of the column", "type": "string" }, "incremental_key": { "description": "Whether the column is used as an incremental key", "type": "boolean" }, "name": { "description": "Name of the column", "type": "string" }, "not_null": { "description": "Whether the column is nullable", "type": "boolean" }, "primary_key": { "description": "Whether the column is part of the primary key", "type": "boolean" }, "type": { "description": "Arrow Type of the column", "type": "string" }, "type_schema": { "description": "For columns of type JSON, the schema of the JSON object", "type": "string" }, "unique": { "description": "Whether the column has a unique constraint", "type": "boolean" } }, "title": "CloudQuery Plugin Table Column", "type": "object" }, "PlatformPluginTableDetails": { "additionalProperties": false, "required": [ "columns", "description", "is_incremental", "name", "relations", "title", "permissions_needed" ], "properties": { "columns": { "description": "List of columns", "items": { "$ref": "#/components/schemas/PlatformPluginTableColumn" }, "type": "array" }, "description": { "description": "Description of the table", "type": "string" }, "is_incremental": { "description": "Whether the table is incremental", "type": "boolean" }, "name": { "description": "Name of the table", "type": "string" }, "parent": { "description": "Name of the parent table, if any", "type": "string" }, "relations": { "description": "Names of the tables that depend on this table", "items": { "type": "string" }, "type": "array" }, "title": { "description": "Title of the table", "type": "string" }, "is_paid": { "description": "Whether the table is paid", "type": "boolean" }, "permissions_needed": { "description": "List of permissions needed to access this table, if any", "items": { "type": "string" }, "type": "array", "example": [ "storage.buckets.list" ] } }, "type": "object" }, "PlatformAlertState": { "type": "string", "enum": [ "unknown", "pending", "inactive", "triggered" ] }, "PlatformQueryTag": { "description": "A saved query tag.", "type": "string" }, "PlatformAlertSeverity": { "type": "string", "enum": [ "low", "medium", "high", "critical" ] }, "PlatformNotificationDestinationID": { "description": "The unique ID for the notification destination.", "type": "string", "format": "uuid", "x-go-name": "NotificationDestinationID" }, "PlatformNotificationDestinationListItem": { "title": "Notification Destination List Item", "type": "object", "description": "Notification Destination List Item", "additionalProperties": false, "required": [ "id", "name", "enabled", "type", "url", "created_at", "updated_at" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformNotificationDestinationID" }, "name": { "type": "string", "example": "Send to Slack" }, "enabled": { "type": "boolean" }, "type": { "type": "string", "enum": [ "webhook", "slack" ], "description": "Type of notification destination" }, "url": { "type": "string", "example": "https://hooks.slack.com/services/EXAMPLE_T/EXAMPLE_B/EXAMPLE_SECRET_REDACTED", "x-go-name": "URL" }, "slack_channels": { "type": "array", "items": { "type": "string" }, "description": "List of Slack channel names (only for slack type)", "x-go-name": "SlackChannels" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "updated_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" } } }, "PlatformAlertDetail": { "title": "Alert Detail", "type": "object", "description": "An alert instance that can be triggered by a query including notification destinations for the alert", "additionalProperties": false, "required": [ "id", "query_id", "enabled", "message", "severity", "state", "total_violations", "created_at", "updated_at", "notification_destinations" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier for the alert", "x-go-name": "ID" }, "query_id": { "type": "string", "format": "uuid", "description": "Reference to the associated query", "x-go-name": "QueryID" }, "enabled": { "type": "boolean", "description": "Indicates if the alert is enabled" }, "message": { "type": "string", "description": "Alert message content" }, "severity": { "$ref": "#/components/schemas/PlatformAlertSeverity" }, "state": { "$ref": "#/components/schemas/PlatformAlertState" }, "total_violations": { "type": "integer", "format": "int64", "description": "Number of violations that triggered the alert" }, "last_evaluated_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was last evaluated" }, "triggered_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was triggered" }, "created_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was created" }, "updated_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was last updated" }, "notification_destinations": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformNotificationDestinationListItem" }, "description": "List of notification destinations this alert is configured to send to", "x-go-type-skip-optional-pointer": true, "allowEmptyValue": true, "explode": true } } }, "PlatformQueryID": { "description": "The unique ID for the query.", "type": "string", "format": "uuid", "x-go-name": "QueryID" }, "PlatformAlertCreate": { "title": "Alert Create", "type": "object", "description": "Create an alert", "additionalProperties": false, "required": [ "message", "severity", "enabled" ], "properties": { "message": { "type": "string", "example": "All resources need to be tagged" }, "severity": { "$ref": "#/components/schemas/PlatformAlertSeverity" }, "enabled": { "type": "boolean", "description": "Indicates if the alert is enabled" }, "notification_destinations": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformNotificationDestinationID" }, "description": "List of notification destinations to send alerts to", "x-go-type-skip-optional-pointer": true, "allowEmptyValue": true, "explode": true } } }, "PlatformNotificationDestinationTestResponse": { "title": "Notification Destination Test Response", "type": "object", "description": "Notification Destination Test Response", "additionalProperties": false, "required": [ "is_success", "http_status", "http_status_code", "http_body", "http_headers" ], "properties": { "is_success": { "type": "boolean", "description": "Indicates if the test was successful" }, "http_status_code": { "type": "integer", "description": "HTTP status code returned by the notification destination", "x-go-name": "HTTPStatusCode" }, "http_status": { "type": "string", "description": "HTTP status message returned by the notification destination", "x-go-name": "HTTPStatus" }, "http_body": { "type": "string", "description": "Body of the HTTP response from the notification destination", "x-go-name": "HTTPBody" }, "http_headers": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Headers returned by the notification destination", "x-go-name": "HTTPHeaders" } } }, "PlatformAlertTestResponse": { "title": "Alert Test Response", "type": "object", "description": "Alert Test Response", "additionalProperties": false, "required": [ "destination_id", "response" ], "properties": { "destination_id": { "type": "string", "description": "The ID of the notification destination.", "x-go-name": "DestinationID" }, "error": { "type": "string", "description": "An error message if the test failed, otherwise null." }, "response": { "$ref": "#/components/schemas/PlatformNotificationDestinationTestResponse" } } }, "PlatformPolicyStatus": { "description": "Policy status", "type": "string", "enum": [ "paused", "active" ], "x-go-name": "PolicyStatus" }, "PlatformPolicySeverity": { "description": "Policy severity", "type": "string", "enum": [ "low", "medium", "high", "critical" ], "x-go-name": "PolicySeverity" }, "PlatformPolicyDomain": { "description": "Policy domain", "type": "string", "enum": [ "finops", "security", "compliance", "governance", "operations" ], "x-go-name": "PolicyDomain" }, "PlatformPolicyGroupID": { "title": "Policy Group ID", "type": "string", "format": "uuid", "x-go-name": "PolicyGroupID" }, "PlatformPolicyID": { "description": "The unique ID for the policy.", "type": "string", "format": "uuid", "x-go-name": "PolicyID" }, "PlatformPolicyGroup": { "title": "Policy Group", "type": "object", "description": "Policy Group", "additionalProperties": false, "required": [ "id", "name", "description", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string", "example": "Security Policies" }, "description": { "type": "string", "example": "Group containing all security-related policies" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "updated_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" } } }, "PlatformPolicy": { "title": "Policy", "type": "object", "description": "Policy", "additionalProperties": false, "required": [ "id", "name", "domain", "severity", "description", "status", "team_name", "query_id", "query", "created_by", "created_at", "updated_at" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformPolicyID" }, "name": { "type": "string", "example": "Unencrypted S3 buckets" }, "domain": { "$ref": "#/components/schemas/PlatformPolicyDomain" }, "severity": { "$ref": "#/components/schemas/PlatformPolicySeverity" }, "description": { "type": "string", "example": "Policy to detect unencrypted S3 buckets" }, "status": { "$ref": "#/components/schemas/PlatformPolicyStatus" }, "team_name": { "type": "string", "example": "my-team" }, "query_id": { "$ref": "#/components/schemas/PlatformQueryID" }, "query": { "type": "string", "description": "The SQL query string for the policy", "example": "SELECT * FROM aws_s3_buckets WHERE server_side_encryption_configuration IS NULL" }, "created_by": { "type": "string", "format": "uuid", "x-go-name": "CreatedByUserID" }, "updated_by": { "type": "string", "format": "uuid", "nullable": true, "x-go-name": "UpdatedByUserID" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "updated_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "violation_count": { "type": "integer", "nullable": true, "description": "Number of violations from the last evaluation", "example": 5 }, "run_at": { "type": "string", "format": "date-time", "nullable": true, "description": "Timestamp of the last evaluation run", "example": "2017-07-14T16:53:42Z" }, "notification_destinations": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformNotificationDestinationListItem" }, "description": "List of notification destinations configured for the policy's alert", "example": [] }, "policy_groups": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformPolicyGroup" }, "description": "List of policy groups this policy belongs to", "example": [] } } }, "PlatformPolicyCreate": { "title": "Policy Create", "type": "object", "description": "Create a policy (implicitly creates a query and an enabled alert)", "additionalProperties": false, "required": [ "name", "domain", "severity", "query" ], "properties": { "name": { "type": "string", "example": "Unencrypted S3 buckets" }, "domain": { "$ref": "#/components/schemas/PlatformPolicyDomain" }, "severity": { "$ref": "#/components/schemas/PlatformPolicySeverity" }, "description": { "type": "string", "default": "", "example": "Policy to detect unencrypted S3 buckets" }, "query": { "type": "string", "example": "SELECT account_id, bucket_name, region FROM aws_s3_buckets WHERE encryption_status IS NULL" }, "notification_destination_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "nullable": true, "description": "Notification destination IDs to send alerts to" }, "policy_group_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "nullable": true, "description": "Policy group IDs to add this policy to" } } }, "PlatformPolicyUpdate": { "title": "Policy Update", "type": "object", "description": "Update a policy", "additionalProperties": false, "properties": { "name": { "type": "string" }, "domain": { "$ref": "#/components/schemas/PlatformPolicyDomain" }, "severity": { "$ref": "#/components/schemas/PlatformPolicySeverity" }, "description": { "type": "string" }, "query": { "type": "string", "example": "SELECT account_id, bucket_name, region FROM aws_s3_buckets WHERE encryption_status IS NULL" }, "notification_destination_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "nullable": true, "description": "Notification destination IDs to send alerts to" }, "policy_group_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "nullable": true, "description": "Policy group IDs to set for this policy" } } }, "PlatformPolicyViolation": { "title": "Policy Violation", "type": "object", "description": "Policy violation resource information", "additionalProperties": false, "required": [ "cloud", "resource_type_label", "_cq_account_name", "name", "region", "_cq_platform_id" ], "properties": { "cloud": { "type": "string", "example": "aws" }, "resource_type_label": { "type": "string", "example": "EC2 Instance" }, "_cq_account_name": { "type": "string", "example": "my-account" }, "name": { "type": "string", "example": "my-resource" }, "region": { "type": "string", "example": "us-east-1" }, "_cq_platform_id": { "type": "string", "example": "aws_ec2_instances_12345678-1234-1234-1234-123456789abc" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Tags associated with the resource (e.g. for insights)" }, "additional_properties": { "type": "object", "description": "Insight-specific metadata per affected resource (e.g. AWS Health or cost insight fields)", "additionalProperties": true } } }, "PlatformPolicyEvaluationLog": { "title": "Policy Evaluation Log", "type": "object", "description": "Policy evaluation log entry", "additionalProperties": false, "required": [ "id", "policy_id", "violation_count", "run_at" ], "properties": { "id": { "type": "string", "format": "uuid" }, "policy_id": { "$ref": "#/components/schemas/PlatformPolicyID" }, "violation_count": { "type": "integer", "example": 5 }, "run_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" } } }, "PlatformPolicyMetrics": { "title": "Policy Metrics", "type": "object", "description": "Policy metrics summary", "additionalProperties": false, "required": [ "total_active_violations", "high_severity_violations", "violations_this_week" ], "properties": { "total_active_violations": { "type": "integer", "description": "Total violations from active policies", "example": 28 }, "high_severity_violations": { "type": "integer", "description": "Total violations from high or critical severity policies", "example": 10 }, "violations_this_week": { "type": "integer", "description": "Total violations from evaluations in the last 7 days", "example": 7 } } }, "PlatformViolationsByDomainItem": { "title": "Violations By Domain Item", "type": "object", "description": "Violation count for a specific domain", "additionalProperties": false, "required": [ "domain", "violation_count" ], "properties": { "domain": { "$ref": "#/components/schemas/PlatformPolicyDomain" }, "violation_count": { "type": "integer", "description": "Number of violations for this domain", "example": 15 } } }, "PlatformViolationsByDomain": { "title": "Violations By Domain", "type": "object", "description": "Violations grouped by domain", "additionalProperties": false, "required": [ "items", "total_violations" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformViolationsByDomainItem" } }, "total_violations": { "type": "integer", "description": "Total violations across all domains", "example": 28 } } }, "PlatformViolationsHistoryItem": { "title": "Violations History Item", "type": "object", "description": "Violation count for a specific date", "additionalProperties": false, "required": [ "date", "violation_count" ], "properties": { "date": { "type": "string", "format": "date", "description": "Date of the violations", "example": "2026-01-06" }, "violation_count": { "type": "integer", "description": "Number of violations on this date", "example": 3 } } }, "PlatformViolationsHistoryMetadata": { "title": "Violations History Metadata", "type": "object", "description": "Metadata for violations history query", "additionalProperties": false, "required": [ "interval", "start_date", "end_date" ], "properties": { "interval": { "type": "string", "description": "Interval in days used for grouping", "example": "30" }, "start_date": { "type": "string", "format": "date", "description": "Start date of the query range", "example": "2025-05-01" }, "end_date": { "type": "string", "format": "date", "description": "End date of the query range", "example": "2026-12-01" } } }, "PlatformViolationsHistory": { "title": "Violations History", "type": "object", "description": "Violations history over time", "additionalProperties": false, "required": [ "items", "metadata" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformViolationsHistoryItem" } }, "metadata": { "$ref": "#/components/schemas/PlatformViolationsHistoryMetadata" } } }, "PlatformPolicyGroupWithCounts": { "title": "Policy Group With Counts", "type": "object", "description": "Policy Group with policy count and violation counts by severity", "additionalProperties": false, "required": [ "id", "name", "description", "policy_count", "violation_count_low", "violation_count_medium", "violation_count_high", "violation_count_critical", "created_at", "updated_at" ], "allOf": [ { "$ref": "#/components/schemas/PlatformPolicyGroup" }, { "type": "object", "properties": { "policy_count": { "type": "integer", "description": "Number of policies in this group", "example": 5, "default": 0 }, "violation_count_low": { "type": "integer", "description": "Total violations from low severity policies in this group", "example": 10, "default": 0 }, "violation_count_medium": { "type": "integer", "description": "Total violations from medium severity policies in this group", "example": 25, "default": 0 }, "violation_count_high": { "type": "integer", "description": "Total violations from high severity policies in this group", "example": 15, "default": 0 }, "violation_count_critical": { "type": "integer", "description": "Total violations from critical severity policies in this group", "example": 3, "default": 0 } } } ] }, "PlatformPolicyGroupCreate": { "title": "Policy Group Create", "type": "object", "description": "Create a policy group", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { "type": "string", "example": "Security Policies" }, "description": { "type": "string", "default": "", "example": "Group containing all security-related policies" }, "policy_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "nullable": true, "description": "Optional array of policy IDs to add to this group" } } }, "PlatformPolicyGroupUpdate": { "title": "Policy Group Update", "type": "object", "description": "Update a policy group", "additionalProperties": false, "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "policy_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "nullable": true, "description": "Policy IDs to set for this group" } } }, "PlatformAPIKeyName": { "description": "Name of the API key", "type": "string", "example": "cli-api-key", "maxLength": 255, "minLength": 1, "pattern": "^(?:[a-zA-Z0-9][a-zA-Z0-9- ]*)?[a-zA-Z0-9]$", "x-pattern-message": "can contain only letters, numbers, spaces, and hyphens, starting and ending with a letter or number" }, "PlatformAPIKeyID": { "description": "ID of the API key", "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "x-go-name": "APIKeyID" }, "PlatformAPIKey": { "description": "API Key to interact with CloudQuery Platform", "type": "object", "required": [ "id", "name", "expires_at", "expired", "roles" ], "properties": { "name": { "$ref": "#/components/schemas/PlatformAPIKeyName" }, "created_by": { "type": "string", "example": "user@example.com", "description": "email of the user that created the API key" }, "id": { "$ref": "#/components/schemas/PlatformAPIKeyID" }, "key": { "type": "string", "description": "API key. Will be shown only in the response when creating the key.", "example": "1234567890abcdef1234567890abcdef" }, "created_at": { "type": "string", "format": "date-time", "example": "2017-07-14T16:53:42Z" }, "expires_at": { "type": "string", "description": "Timestamp at which API key will stop working", "format": "date-time", "example": "2017-07-14T16:53:42Z" }, "last_access_at": { "type": "string", "format": "date-time", "example": "2017-07-14T16:53:42Z", "description": "Timestamp at which API key was last used - accurate to the day only." }, "expired": { "type": "boolean", "description": "Whether the API key has expired or not", "example": false }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRole" } } } }, "PlatformRoleID": { "description": "The unique ID for the role.", "type": "string", "format": "uuid", "x-go-name": "RoleID" }, "PlatformAgentChatRequest": { "type": "object", "required": [ "message" ], "properties": { "session_id": { "type": "string", "description": "Optional session ID to continue an existing session. If omitted, a new session is created." }, "message": { "type": "string", "description": "The user message to send to the agent orchestrator." }, "custom_context_ids": { "type": "array", "description": "Optional list of custom context IDs to inject into the agent planner's system prompt for this request. Contexts marked auto_include are always included regardless of this list. Unknown IDs are silently skipped.", "items": { "type": "string", "format": "uuid" } }, "app_id": { "type": "string", "format": "uuid", "description": "Optional app ID to scope the agent's queries to. When set, the agent restricts resource-table queries to resources tagged for this app (via a WHERE clause against the app_memberships table). See docs/apps-topology-principle.md for the architectural framing." } } }, "PlatformAgentChatPlanStep": { "description": "A single step in the agent orchestrator's execution plan.", "type": "object", "properties": { "step": { "type": "integer", "description": "1-based step number." }, "agent_name": { "type": "string" }, "action": { "type": "string" }, "input": { "type": "string", "description": "Raw JSON-encoded input the planner produced for this step (e.g. {\"table_name\":\"aws_ec2_instances\"} or {\"sql\":\"SELECT ...\"}). Surfaced for traceability when a step fails — lets operators see exactly what the LLM asked an agent to do." }, "reasoning": { "type": "string" }, "depends_on": { "type": "array", "description": "Step numbers this step depends on. Populated on plan.steps[]; absent on step_results[].step (where the same shape is reused for traceability).", "items": { "type": "integer" } } } }, "PlatformAgentChatExecutionPlan": { "description": "The agent orchestrator's execution plan, assembled from the tool-use trajectory.", "type": "object", "properties": { "steps": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformAgentChatPlanStep" } } } }, "PlatformAgentChatOutputType": { "description": "The data type of an agent chat output. Determines which payload field is\npopulated on `AgentChatOutput` and how the frontend should render the value.\n\n- `query` — SQL string in `data_str`\n- `table` — `{cols, rows, total_rows?, query?}` in `data_obj`\n- `string` — plain text / markdown in `data_str`\n- `object` — freeform structured record in `data_obj`\n", "type": "string", "example": "table", "enum": [ "query", "table", "string", "object" ] }, "PlatformAgentChatOutput": { "description": "A single structured output returned by an agent step. The `type` field\ndetermines which of `data_str` / `data_obj` is populated and how the\nfrontend should render the payload.\n\nPer-type payload conventions:\n\n- `query` — `data_str` contains a SQL query string (ClickHouse dialect).\n Returned when an action produced SQL but did not execute it\n (e.g. exploration.execute_query with data access disabled,\n or any flow where the user asked for \"just the query\").\n- `table` — `data_obj` is `{cols: string[], rows: any[][], total_rows?: number, query?: string}`.\n Returned for tabular data. `query` optionally carries the SQL\n that produced the rows.\n- `string` — `data_str` contains plain text or markdown. Used for prose\n output like diagnose_sync narratives and simple confirmations.\n- `object` — `data_obj` is a freeform structured record. The exact shape\n depends on the action and usually mirrors an existing domain\n schema. The per-action payloads currently produced are:\n\n\n | Agent | Action | `data_obj` shape |\n |-------|--------|------------------|\n | exploration | `check_syntax` | `{valid: bool, error?: string}` |\n | exploration | `explain_table` | `{table_name, found, plugin?, title?, docs_url?, description?}` |\n | exploration | `search_tables` | `{keywords, plugin?, total_matches, returned, tables: [{table_name, plugin, title?, description?}]}` |\n | summary | `policy_metrics` | `PolicyMetrics` |\n | summary | `environment_overview` | `{synced_table_count, sync_count, syncs_by_status, policy_metrics?}` |\n | remediation | `get_violations` | `{policy_id, policy_name, domain, severity, query_sql, total_violations, columns, rows}` |\n | remediation | `get_policy_context` | `{policy_id, policy_name, description, domain, severity, query_sql, last_evaluated_at?, violation_count, sample_violations}` |\n | policy | `get_policy` | `{id, name, domain, severity, description, query_id, team_name, created_at, updated_at}` |\n | policy | `create_policy` | `{policy_id}` |\n | policy | `update_policy` | `{id, name, domain, severity, description, updated_at}` |\n | policy | `create_policy_group` | `{group_id}` |\n | integration | `get_sync` | `ExpandedSync` (sync metadata + source/destinations/transformers) |\n | integration | `get_sync_run` | `{id, status, status_reason?, total_rows, warnings, errors, created_at, completed_at?}` |\n | integration | `create_sync` | `{sync_name}` |\n | integration | `diagnose_sync` | `{sync_name, source_plugin, failed_run_count, total_run_count, failure_patterns}` |\n\n\nTransport / execution failures (agent unreachable, action returned a Go error, etc.) are surfaced via `step_results[].error` rather than as an `AgentChatOutput`.\n", "type": "object", "required": [ "type" ], "properties": { "type": { "$ref": "#/components/schemas/PlatformAgentChatOutputType" }, "data_str": { "type": "string", "description": "Populated for type=query, string." }, "data_obj": { "type": "object", "description": "Populated for type=table, object. Shape is documented per-action." } } }, "PlatformAgentChatStepResult": { "description": "Outcome of executing a single plan step.", "type": "object", "properties": { "step": { "$ref": "#/components/schemas/PlatformAgentChatPlanStep" }, "output": { "$ref": "#/components/schemas/PlatformAgentChatOutput" }, "error": { "type": "string" }, "duration_ms": { "type": "integer", "format": "int64" }, "tokens_used": { "type": "integer" } } }, "PlatformAgentChatResponse": { "type": "object", "required": [ "session_id", "summary", "total_latency_ms", "total_tokens" ], "properties": { "session_id": { "type": "string", "description": "The session ID for this conversation. Use this to continue the session in subsequent requests." }, "plan": { "$ref": "#/components/schemas/PlatformAgentChatExecutionPlan" }, "step_results": { "type": "array", "description": "Results from each executed step.", "items": { "$ref": "#/components/schemas/PlatformAgentChatStepResult" } }, "summary": { "type": "string", "description": "LLM-generated summary of the agent results." }, "total_latency_ms": { "type": "integer", "format": "int64", "description": "Total request latency in milliseconds." }, "total_tokens": { "type": "integer", "description": "Total tokens consumed across all LLM calls." }, "warning": { "type": "string", "description": "Optional warning message indicating token budget or daily limit exceeded. Present only when a limit was exceeded." }, "refused": { "type": "boolean", "description": "True when the agent's scope-check guardrail rejected the request as out of scope (off-topic or mixed off-topic) or when the guardrail itself errored and the request was failed-closed. When true, plan and step_results are absent and summary is the canned refusal message." }, "refusal_reason": { "type": "string", "description": "Short machine-friendly reason populated when refused is true. Either the classifier's reason (e.g. \"mixed_off_topic\") or \"scope_check_error\" when the guardrail itself failed." } } }, "PlatformAgentChatSessionTurn": { "description": "A single persisted turn in an agent conversation session.", "type": "object", "required": [ "role", "content", "created_at" ], "properties": { "role": { "type": "string", "description": "Either \"user\" or \"assistant\"." }, "content": { "type": "string", "description": "For user turns, the user's message. For assistant turns, the final summary text (or canned refusal message when refused is true)." }, "created_at": { "type": "string", "format": "date-time" }, "plan": { "$ref": "#/components/schemas/PlatformAgentChatExecutionPlan" }, "step_results": { "type": "array", "description": "Step outcomes from the execution plan. Absent on user turns and refused turns.", "items": { "$ref": "#/components/schemas/PlatformAgentChatStepResult" } }, "total_tokens": { "type": "integer", "description": "Tokens consumed when producing this assistant turn. Zero on user turns and refused turns." }, "total_latency_ms": { "type": "integer", "format": "int64", "description": "Wall-clock latency of the original request that produced this assistant turn." }, "warning": { "type": "string", "description": "Token-budget warning that was surfaced on this assistant turn, if any." }, "refused": { "type": "boolean", "description": "True when this assistant turn is the canned refusal from the scope-check guardrail." }, "refusal_reason": { "type": "string", "description": "Machine-friendly refusal reason; populated when refused is true." }, "latest": { "type": "boolean", "description": "True on the most recently persisted turn in the session (regardless of role). At most one turn per response has this set." } } }, "PlatformAgentChatSessionHistory": { "description": "The persisted history of an agent conversation session.", "type": "object", "required": [ "session_id", "turns" ], "properties": { "session_id": { "type": "string" }, "turns": { "type": "array", "description": "All turns persisted for this session, ordered by sequence ascending. Empty when the session has no turns (or does not exist).", "items": { "$ref": "#/components/schemas/PlatformAgentChatSessionTurn" } } } }, "PlatformAgentCustomContextID": { "description": "The unique ID for the agent custom context.", "type": "string", "format": "uuid", "x-go-name": "AgentCustomContextID" }, "PlatformAgentCustomContext": { "type": "object", "required": [ "id", "title", "body", "auto_include", "created_at", "updated_at" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformAgentCustomContextID" }, "title": { "type": "string", "description": "Short human-readable name for this custom context." }, "body": { "type": "string", "description": "The context text that is injected into the agent planner's system prompt." }, "auto_include": { "type": "boolean", "description": "When true, this context is always included in agent requests regardless of the caller's per-session selection." }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } }, "PlatformAgentCustomContextCreate": { "type": "object", "required": [ "title", "body" ], "properties": { "title": { "type": "string", "description": "Short human-readable name for this custom context." }, "body": { "type": "string", "description": "The context text that is injected into the agent planner's system prompt." }, "auto_include": { "type": "boolean", "default": false, "description": "When true, this context is always included in agent requests regardless of the caller's per-session selection." } } }, "PlatformAgentCustomContextUpdate": { "type": "object", "required": [ "title", "body", "auto_include" ], "properties": { "title": { "type": "string", "description": "Short human-readable name for this custom context." }, "body": { "type": "string", "description": "The context text that is injected into the agent planner's system prompt." }, "auto_include": { "type": "boolean", "description": "When true, this context is always included in agent requests regardless of the caller's per-session selection." } } }, "PlatformConversationCreate": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string", "description": "The initial message to start the conversation." }, "current_query": { "type": "string", "description": "An optional current query to provide context for the conversation." }, "mode": { "type": "string", "description": "The mode of the conversation, which can influence the behavior of the AI.", "default": "sql", "enum": [ "ask", "sql" ] } } }, "PlatformConversationMessage": { "type": "object", "required": [ "id", "role", "content", "created_at", "message_type", "end_turn", "mode" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier of the message", "x-go-name": "ID" }, "role": { "type": "string", "enum": [ "user", "assistant", "system" ], "description": "Role of the message sender" }, "content": { "type": "string", "description": "Content of the message. In the case of tool use or tool result, this will contain JSON data." }, "query_context": { "type": "string", "description": "The current query context when the message was sent, if applicable" }, "message_type": { "type": "string", "enum": [ "error", "message", "tool_use", "tool_result" ], "description": "Type of the message content" }, "created_at": { "type": "string", "format": "date-time" }, "end_turn": { "type": "boolean", "description": "Whether this message ends the conversation turn", "default": false }, "mode": { "type": "string", "description": "The mode of the conversation when this message was sent, which can influence the behavior of the AI.", "default": "sql", "enum": [ "ask", "sql" ] } } }, "PlatformConversation": { "type": "object", "required": [ "id", "messages", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier of the conversation", "x-go-name": "ID" }, "title": { "type": "string", "description": "Optional title of the conversation" }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformConversationMessage" } }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } }, "PlatformConversationSendMessage": { "title": "Conversation Send Message", "type": "object", "description": "Send a message in a conversation", "additionalProperties": false, "required": [ "message" ], "properties": { "message": { "type": "string", "example": "Help me find all EC2 instances with open ports", "description": "The message content to be sent" }, "query_context": { "type": "string", "example": "SELECT * FROM ec2_instances WHERE open_ports IS NOT NULL", "default": "", "description": "Optional context for the message, such as the current SQL query being edited" }, "mode": { "type": "string", "description": "The mode of the conversation, which can influence the behavior of the AI.", "default": "sql", "enum": [ "ask", "sql" ] } } }, "PlatformCustomColumnSortBy": { "title": "CustomColumnSortBy", "type": "string", "enum": [ "id", "description", "column_name", "label", "value_expr", "created_by", "created_at", "updated_at" ] }, "PlatformCustomColumnSortDirection": { "title": "CustomColumnSortDirection", "type": "string", "enum": [ "asc", "desc" ], "default": "asc" }, "PlatformCustomColumnID": { "description": "The unique ID for the custom column.", "type": "string", "format": "uuid", "x-go-name": "CustomColumnID" }, "PlatformCustomColumnColumnName": { "type": "string", "description": "The name for the custom column.", "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$", "example": "tags_v1_region", "x-pattern-message": "Letters, numbers, and underscores only. Must start with a letter.", "minLength": 1, "maxLength": 63 }, "PlatformCustomColumnValueExpr": { "type": "string", "description": "The SQL expression for the custom column." }, "PlatformCustomColumn": { "title": "Custom Column", "type": "object", "description": "A custom column that is configured manually by the user.", "additionalProperties": false, "required": [ "id", "column_name", "label", "value_expr", "created_by", "created_at" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformCustomColumnID" }, "description": { "type": "string" }, "column_name": { "$ref": "#/components/schemas/PlatformCustomColumnColumnName" }, "label": { "type": "string", "example": "Environment name" }, "value_expr": { "$ref": "#/components/schemas/PlatformCustomColumnValueExpr" }, "created_by": { "$ref": "#/components/schemas/PlatformCreatedBy" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" } } }, "PlatformCustomColumnCreateOrUpdate": { "title": "Custom Column Create or Update", "type": "object", "description": "Create or update a custom column", "additionalProperties": false, "required": [ "column_name", "label", "value_expr" ], "properties": { "description": { "type": "string" }, "column_name": { "$ref": "#/components/schemas/PlatformCustomColumnColumnName" }, "label": { "type": "string", "example": "Environment name" }, "value_expr": { "$ref": "#/components/schemas/PlatformCustomColumnValueExpr" } } }, "PlatformFilterTag": { "description": "A table column filter tag.", "type": "string" }, "PlatformFilterExpression": { "description": "A table column filter.", "type": "string", "example": "resource_type=aws_s3_buckets" }, "PlatformTableName": { "description": "The name of the table.", "type": "string", "example": "cloud_assets" }, "PlatformFilter": { "title": "Filter", "type": "object", "description": "Saved filter", "additionalProperties": false, "required": [ "id", "name", "expression", "created_at" ], "properties": { "id": { "description": "ID of the Filter", "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "x-go-name": "ID" }, "name": { "type": "string", "example": "t2.micro EC2 instances" }, "expression": { "$ref": "#/components/schemas/PlatformFilterExpression" }, "description": { "type": "string", "example": "Filter to find all EC2 instances of type t2.micro from the aws_ec2_instance raw table" }, "table": { "$ref": "#/components/schemas/PlatformTableName" }, "query_id": { "$ref": "#/components/schemas/PlatformQueryID" }, "user_id": { "$ref": "#/components/schemas/PlatformUserID" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformFilterTag" }, "x-go-type-skip-optional-pointer": true }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" } } }, "PlatformFilterID": { "description": "The unique ID for the filter.", "type": "string", "format": "uuid", "x-go-name": "FilterID" }, "PlatformFilterUpdate": { "title": "Filter definition for updating a filter", "description": "Filter Update Definition", "type": "object", "properties": { "name": { "type": "string", "example": "t2.micro EC2 instances" }, "description": { "type": "string" }, "expression": { "$ref": "#/components/schemas/PlatformFilterExpression" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformFilterTag" } } } }, "PlatformNotificationDetail": { "title": "Notification Detail", "type": "object", "description": "A notification instance for a triggered alert, including one notification destination. Each notification destination for an alert will result in a separate notification item.", "additionalProperties": false, "required": [ "id", "query_id", "policy_id", "message", "severity", "state", "total_violations", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier for the alert", "x-go-name": "ID" }, "query_id": { "type": "string", "format": "uuid", "description": "Reference to the associated query", "x-go-name": "QueryID" }, "policy_id": { "type": "string", "format": "uuid", "description": "Reference to the associated policy", "x-go-name": "PolicyID" }, "message": { "type": "string", "description": "Alert message content" }, "severity": { "$ref": "#/components/schemas/PlatformAlertSeverity" }, "state": { "$ref": "#/components/schemas/PlatformAlertState" }, "total_violations": { "type": "integer", "format": "int64", "description": "Number of violations that triggered the alert" }, "last_evaluated_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was last evaluated" }, "triggered_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was triggered" }, "created_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was created" }, "updated_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was last updated" }, "notification_destination": { "$ref": "#/components/schemas/PlatformNotificationDestinationListItem", "description": "The notification destination for this notification item (null if no destinations configured)", "nullable": true } } }, "PlatformNotificationDestinationData": { "title": "Notification Destination Data", "type": "object", "description": "Notification Destination Data", "properties": { "type": { "type": "string", "enum": [ "webhook", "slack" ], "default": "webhook", "description": "Type of notification destination" }, "slack_connection_id": { "type": "string", "format": "uuid", "description": "Slack connection ID (required for slack type)", "x-go-name": "SlackConnectionID" }, "slack_channels": { "type": "array", "items": { "type": "string" }, "description": "List of Slack channel IDs to send notifications to (required for slack type)", "x-go-name": "SlackChannels" }, "custom_message": { "type": "string", "description": "Optional custom message prepended to the alert when sending to Slack (only for slack type, must not be set for webhook)", "x-go-name": "CustomMessage" }, "url": { "type": "string", "example": "https://hooks.slack.com/services/EXAMPLE_T/EXAMPLE_B/EXAMPLE_SECRET_REDACTED", "description": "Webhook URL (required for webhook type, must not be set for slack type)", "x-go-name": "URL" }, "http_headers": { "type": "object", "additionalProperties": { "type": "string" }, "description": "HTTP headers (required for webhook type, must not be set for slack type)", "x-go-name": "HTTPHeaders", "x-go-type-skip-optional-pointer": true }, "http_secret_headers": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Secret HTTP headers with encrypted values. Values are encrypted at rest and returned as empty strings in responses. For updates, send empty string to keep existing value, or new value to replace. Must not be set for slack type.", "x-go-name": "HTTPSecretHeaders", "x-go-type-skip-optional-pointer": true }, "http_body": { "type": "string", "example": "{\"text\": \"Alert: {{alert_message}}\"}", "description": "HTTP body template (required for webhook type, must not be set for slack type). Supports simple variable interpolation using {{variable}} syntax. Available variables: {{query_name}}, {{query_url}}, {{alert_status}}, {{alert_message}}, {{alert_severity}}, {{alert_violations}}.", "x-go-name": "HTTPBody" } } }, "PlatformNotificationDestinationCreate": { "title": "Create Notification Destination", "type": "object", "description": "Create Notification Destination", "allOf": [ { "$ref": "#/components/schemas/PlatformNotificationDestinationData" }, { "type": "object", "required": [ "name", "enabled" ], "properties": { "name": { "type": "string", "example": "Send to Slack" }, "enabled": { "type": "boolean" } } } ] }, "PlatformNotificationDestination": { "title": "Notification Destination", "type": "object", "description": "Notification Destination", "additionalProperties": false, "required": [ "id", "name", "enabled", "type", "url", "created_at", "updated_at" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformNotificationDestinationID" }, "name": { "type": "string", "example": "Send to Slack" }, "enabled": { "type": "boolean" }, "type": { "type": "string", "enum": [ "webhook", "slack" ], "description": "Type of notification destination" }, "url": { "type": "string", "example": "https://hooks.slack.com/services/EXAMPLE_T/EXAMPLE_B/EXAMPLE_SECRET_REDACTED", "x-go-name": "URL" }, "http_headers": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "HTTPHeaders", "x-go-type-skip-optional-pointer": true }, "http_secret_headers": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Secret HTTP headers. Keys are visible but values are always returned as empty strings. The actual values are encrypted at rest.", "x-go-name": "HTTPSecretHeaders", "x-go-type-skip-optional-pointer": true }, "http_body": { "type": "string", "example": "{\"text\": \"Alert: {{alert_message}}\"}", "description": "HTTP body template (required for webhook type, must not be set for slack type). Supports simple variable interpolation using {{variable}} syntax. Available variables: {{query_name}}, {{query_url}}, {{alert_status}}, {{alert_message}}, {{alert_severity}}, {{alert_violations}}.", "x-go-name": "HTTPBody" }, "slack_connection_id": { "type": "string", "format": "uuid", "nullable": true, "description": "Slack connection ID (only for slack type)", "x-go-name": "SlackConnectionID" }, "slack_channels": { "type": "array", "items": { "type": "string" }, "description": "List of Slack channel IDs (only for slack type)", "x-go-name": "SlackChannels" }, "custom_message": { "type": "string", "nullable": true, "description": "Optional custom message prepended to the alert when sending to Slack (only for slack type)", "x-go-name": "CustomMessage" }, "last_notification_error_timestamp": { "type": "string", "format": "date-time", "nullable": true, "description": "Timestamp of the last notification error", "x-go-name": "LastNotificationErrorTimestamp" }, "last_notification_error_code": { "type": "string", "nullable": true, "description": "Error code of the last notification error", "x-go-name": "LastNotificationErrorCode" }, "last_notification_error_message": { "type": "string", "nullable": true, "description": "Error message of the last notification error", "x-go-name": "LastNotificationErrorMessage" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "updated_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" } } }, "PlatformNotificationDestinationUpdate": { "title": "Update Notification Destination", "type": "object", "description": "Update Notification Destination", "additionalProperties": false, "properties": { "name": { "type": "string", "example": "Send to Slack" }, "enabled": { "type": "boolean" }, "url": { "type": "string", "example": "https://hooks.slack.com/services/EXAMPLE_T/EXAMPLE_B/EXAMPLE_SECRET_REDACTED", "x-go-name": "URL" }, "http_headers": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "HTTPHeaders" }, "http_secret_headers": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Secret HTTP headers. Send empty string value to keep existing encrypted value, or new value to replace. Must not be set for slack type.", "x-go-name": "HTTPSecretHeaders" }, "http_body": { "type": "string", "example": "{\"text\": \"Alert: {{alert_message}}\"}", "description": "HTTP body template (required for webhook type, must not be set for slack type). Supports simple variable interpolation using {{variable}} syntax. Available variables: {{query_name}}, {{query_url}}, {{alert_status}}, {{alert_message}}, {{alert_severity}}, {{alert_violations}}.", "x-go-name": "HTTPBody" }, "custom_message": { "type": "string", "description": "Optional custom message prepended to the alert when sending to Slack (only for slack type, must not be set for webhook)", "x-go-name": "CustomMessage" }, "slack_connection_id": { "type": "string", "format": "uuid", "description": "Slack connection ID (only for slack type, must not be set for webhook)", "x-go-name": "SlackConnectionID" }, "slack_channels": { "type": "array", "items": { "type": "string" }, "description": "List of Slack channel IDs to send notifications to (only for slack type, must not be set for webhook)", "x-go-name": "SlackChannels" } } }, "PlatformSlackConnectionCreate": { "title": "Create Slack Connection", "type": "object", "description": "Create Slack Connection", "additionalProperties": false, "required": [ "code" ], "properties": { "code": { "type": "string", "description": "OAuth code from Slack authorization" }, "redirect_uri": { "type": "string", "description": "Redirect URI that was used when obtaining the OAuth code (required by Slack when exchanging the code)" } } }, "PlatformSlackConnection": { "title": "Slack Connection", "type": "object", "description": "Slack Connection", "additionalProperties": false, "required": [ "id", "slack_workspace_id", "team_name", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "Slack connection ID" }, "slack_workspace_id": { "type": "string", "description": "Slack workspace (team) ID", "x-go-name": "SlackWorkspaceID" }, "team_name": { "type": "string", "description": "Slack workspace (team) name", "x-go-name": "TeamName" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "updated_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" } } }, "PlatformSlackChannel": { "title": "Slack Channel", "type": "object", "description": "Slack Channel", "additionalProperties": false, "required": [ "id", "name" ], "properties": { "id": { "type": "string", "description": "Channel ID" }, "name": { "type": "string", "description": "Channel name" }, "is_private": { "type": "boolean", "description": "Whether the channel is private", "x-go-name": "IsPrivate" }, "is_archived": { "type": "boolean", "description": "Whether the channel is archived", "x-go-name": "IsArchived" } } }, "PlatformOnboardingID": { "description": "ID of the cloud provider onboarding session", "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "x-go-name": "OnboardingID" }, "PlatformOnboardingAWSCreateResponse": { "type": "object", "description": "AWS OpenID onboarding", "additionalProperties": false, "required": [ "id", "issuer_url", "audience", "subject", "template_url", "notify_path", "notify_token" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformOnboardingID" }, "region": { "type": "string", "description": "An AWS region (such as 'us-east-1') where stack is deployed" }, "stack_name": { "type": "string", "description": "Stack name that should be used", "maxLength": 128 }, "issuer_url": { "type": "string", "description": "URL of the OpenID server to use when setting up a trust relationship", "x-go-name": "IssuerURL" }, "audience": { "type": "string", "description": "OpenID audience claim for the trust realshionship", "x-go-name": "Audience" }, "subject": { "type": "string", "description": "OpenID subject claim for the trust relationship", "x-go-name": "Subject" }, "notify_path": { "type": "string", "description": "Path of the notify endpoint to use for status updates", "x-go-name": "NotifyPath" }, "template_url": { "type": "string", "description": "URL of the CloudFormation template to use for the authentication", "x-go-name": "TemplateURL" }, "notify_token": { "type": "string", "description": "An authentication token that should be used for notifications" } } }, "PlatformOnboardingAWS": { "type": "object", "description": "AWS OpenID onboarding", "additionalProperties": false, "required": [ "id", "stage", "created_at", "updated_at", "issuer_url", "audience", "subject" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformOnboardingID" }, "stage": { "type": "string", "description": "Stage of the onboarding process", "x-go-name": "OnboardingStage" }, "created_at": { "type": "string", "format": "date-time", "example": "2017-07-14T16:53:42Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2017-07-14T16:53:42Z" }, "issuer_url": { "type": "string", "description": "URL of the OpenID server to use when setting up a trust relationship", "x-go-name": "IssuerURL" }, "audience": { "type": "string", "description": "OpenID audience claim for the trust realshionship", "x-go-name": "Audience" }, "subject": { "type": "string", "description": "OpenID subject claim for the trust relationship", "x-go-name": "Subject" }, "management_role_arn": { "type": "string", "description": "Role used to manage the platform onboarding", "x-go-name": "ManagementRoleARN" }, "failure_reason": { "type": "string", "description": "CloudFormation stack errors", "x-go-name": "FailureReason" }, "sync_role_name": { "type": "string", "x-go-name": "SyncRoleName", "description": "(organization mode) The name of the sync role used to sync a specific account within the organization.\nNote: This is the role name only, not the full ARN.\n" }, "organizational_units": { "type": "array", "x-go-name": "OrganizationalUnitIDs", "description": "(organization mode) A list of Organizational Unit (OU) IDs included in this onboarding.\n", "items": { "type": "string" } } } }, "PlatformBaseNotification": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string" } } }, "PlatformStartedNotification": { "allOf": [ { "$ref": "#/components/schemas/PlatformBaseNotification" }, { "type": "object", "properties": { "status": { "enum": [ "started" ] } } } ] }, "PlatformRevokedNotification": { "allOf": [ { "$ref": "#/components/schemas/PlatformBaseNotification" }, { "type": "object", "properties": { "status": { "enum": [ "revoked" ] } } } ] }, "PlatformFailedNotification": { "allOf": [ { "$ref": "#/components/schemas/PlatformBaseNotification" }, { "type": "object", "required": [ "reason" ], "properties": { "status": { "enum": [ "failed" ] }, "reason": { "type": "string" } } } ] }, "PlatformDeployedNotification": { "allOf": [ { "$ref": "#/components/schemas/PlatformBaseNotification" }, { "type": "object", "required": [ "management_role_arn", "deployment_mode", "stack_id" ], "properties": { "status": { "enum": [ "deployed" ] }, "management_role_arn": { "type": "string" }, "deployment_mode": { "type": "string" }, "stack_id": { "type": "string" } } } ] }, "PlatformCompletedNotification": { "allOf": [ { "$ref": "#/components/schemas/PlatformBaseNotification" }, { "type": "object", "required": [ "admin_role_arn", "sync_role_name", "organizational_units", "skipped_accounts" ], "properties": { "status": { "enum": [ "completed" ] }, "admin_role_arn": { "type": "string" }, "sync_role_name": { "type": "string" }, "organizational_units": { "type": "array", "items": { "type": "string" } }, "skipped_accounts": { "type": "array", "items": { "type": "string" } }, "failed_accounts": { "type": "number" }, "additional_stack_ids": { "type": "array", "items": { "type": "string" } } } } ] }, "PlatformCompletedSingleAccountNotification": { "allOf": [ { "$ref": "#/components/schemas/PlatformBaseNotification" }, { "type": "object", "required": [ "sync_role_arn", "stack_id" ], "properties": { "status": { "enum": [ "completed_account" ] }, "sync_role_arn": { "type": "string" }, "stack_id": { "type": "string" } } } ] }, "PlatformOnboardingAWSNotification": { "oneOf": [ { "$ref": "#/components/schemas/PlatformStartedNotification" }, { "$ref": "#/components/schemas/PlatformRevokedNotification" }, { "$ref": "#/components/schemas/PlatformFailedNotification" }, { "$ref": "#/components/schemas/PlatformDeployedNotification" }, { "$ref": "#/components/schemas/PlatformCompletedNotification" }, { "$ref": "#/components/schemas/PlatformCompletedSingleAccountNotification" } ], "discriminator": { "propertyName": "status", "mapping": { "started": "#/components/schemas/PlatformStartedNotification", "revoked": "#/components/schemas/PlatformRevokedNotification", "failed": "#/components/schemas/PlatformFailedNotification", "deployed": "#/components/schemas/PlatformDeployedNotification", "completed": "#/components/schemas/PlatformCompletedNotification", "completed_account": "#/components/schemas/PlatformCompletedSingleAccountNotification" } } }, "PlatformOnboardingAWSAccounts": { "type": "object", "description": "AWS OpenID onboarding account structure", "additionalProperties": false, "required": [ "id", "type" ], "properties": { "id": { "type": "string", "description": "ID of the account or OU", "x-go-name": "ID" }, "arn": { "type": "string", "description": "ARN of the account or OU", "x-go-name": "ARN" }, "type": { "type": "string", "description": "Type of the account", "enum": [ "OU", "account", "root" ] }, "name": { "type": "string", "description": "Display name of the account or OU" }, "children": { "type": "array", "description": "Children accounts and OUs of the target account", "items": { "$ref": "#/components/schemas/PlatformOnboardingAWSAccounts" } } } }, "PlatformOrganizationalUnitID": { "description": "ID of an organizational unit in AWS", "type": "string", "example": "ou-7f3s-j8zfa1ao", "pattern": "^ou-[a-z0-9]{4,32}-[a-z0-9]{8,32}$", "x-pattern-message": "must start with \"ou-\" followed by 4 to 32 lowercase letters or digits, then a second \"-\" dash, and finally 8 to 32 additional lowercase letters or digits", "x-go-name": "OrganizationalUnitID" }, "PlatformOnboardingAWSProvision": { "type": "object", "description": "Stackset provisioning configuration", "required": [ "notify_url", "organizational_units" ], "properties": { "notify_url": { "type": "string", "description": "URL that should be used for provisioning notifications (including scheme, hostname, and path)" }, "organizational_units": { "type": "array", "description": "OUs to provision roles into", "items": { "type": "string", "pattern": "^(r-[0-9a-z]{4,32}|ou-[a-z0-9]{4,32}-[a-z0-9]{8,32})$", "example": "r-xvfz", "x-pattern-message": "must start with either \"r-\" followed by 4 to 32 lowercase letters or digits, or \"ou-\" followed by 4 to 32 lowercase letters or digits, a hyphen, and then 8 to 32 lowercase letters or digits, with no additional characters before or after." } }, "skip_accounts": { "type": "array", "description": "Account IDs to skip onboarding", "items": { "description": "ID of an account in AWS", "type": "string", "example": "615713231484", "pattern": "^\\d{12}$", "x-pattern-message": "account ID must be exactly 12 digits" } } } }, "PlatformOnboardingAWSCURCreateResponse": { "type": "object", "description": "AWS CUR onboarding create response", "additionalProperties": false, "required": [ "id", "region", "issuer_url", "audience", "subject", "template_url", "notify_path", "notify_token" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformOnboardingID" }, "region": { "type": "string", "description": "AWS region where the CUR stack must be deployed. Always 'us-east-1' because AWS Cost and Usage Reports are only available in that region." }, "stack_name": { "type": "string", "description": "Stack name that should be used", "maxLength": 128 }, "issuer_url": { "type": "string", "description": "URL of the OpenID server to use when setting up a trust relationship", "x-go-name": "IssuerURL" }, "audience": { "type": "string", "description": "OpenID audience claim for the trust relationship", "x-go-name": "Audience" }, "subject": { "type": "string", "description": "OpenID subject claim for the trust relationship", "x-go-name": "Subject" }, "notify_path": { "type": "string", "description": "Path of the notify endpoint to use for status updates", "x-go-name": "NotifyPath" }, "template_url": { "type": "string", "description": "URL of the CloudFormation template to use for the CUR setup", "x-go-name": "TemplateURL" }, "notify_token": { "type": "string", "description": "An authentication token that should be used for notifications" } } }, "PlatformOnboardingAWSCUR": { "type": "object", "description": "AWS CUR onboarding", "additionalProperties": false, "required": [ "id", "stage", "created_at", "updated_at", "issuer_url", "audience", "subject" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformOnboardingID" }, "stage": { "type": "string", "description": "Stage of the onboarding process", "x-go-name": "OnboardingStage" }, "created_at": { "type": "string", "format": "date-time", "example": "2017-07-14T16:53:42Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2017-07-14T16:53:42Z" }, "issuer_url": { "type": "string", "description": "URL of the OpenID server to use when setting up a trust relationship", "x-go-name": "IssuerURL" }, "audience": { "type": "string", "description": "OpenID audience claim for the trust relationship", "x-go-name": "Audience" }, "subject": { "type": "string", "description": "OpenID subject claim for the trust relationship", "x-go-name": "Subject" }, "sync_role_arn": { "type": "string", "description": "Role used to access the S3 bucket with CUR reports", "x-go-name": "SyncRoleARN" }, "s3_bucket_name": { "type": "string", "description": "Name of the S3 bucket containing CUR reports", "x-go-name": "S3BucketName" }, "s3_report_prefix": { "type": "string", "description": "Prefix path for CUR reports in the S3 bucket", "x-go-name": "S3ReportPrefix" }, "cur_report_name": { "type": "string", "description": "Name of the CUR report", "x-go-name": "CURReportName" }, "failure_reason": { "type": "string", "description": "Error details if the onboarding failed", "x-go-name": "FailureReason" } } }, "PlatformDeployedCURNotification": { "allOf": [ { "$ref": "#/components/schemas/PlatformBaseNotification" }, { "type": "object", "required": [ "main_role_arn", "sync_role_arn", "s3_bucket_name", "s3_report_prefix", "cur_report_name", "stack_id" ], "properties": { "status": { "enum": [ "deployed_cur" ] }, "main_role_arn": { "type": "string" }, "sync_role_arn": { "type": "string" }, "s3_bucket_name": { "type": "string" }, "s3_report_prefix": { "type": "string" }, "cur_report_name": { "type": "string" }, "stack_id": { "type": "string" } } } ] }, "PlatformOnboardingAWSCURNotification": { "oneOf": [ { "$ref": "#/components/schemas/PlatformStartedNotification" }, { "$ref": "#/components/schemas/PlatformRevokedNotification" }, { "$ref": "#/components/schemas/PlatformFailedNotification" }, { "$ref": "#/components/schemas/PlatformDeployedCURNotification" } ], "discriminator": { "propertyName": "status", "mapping": { "started": "#/components/schemas/PlatformStartedNotification", "revoked": "#/components/schemas/PlatformRevokedNotification", "failed": "#/components/schemas/PlatformFailedNotification", "deployed_cur": "#/components/schemas/PlatformDeployedCURNotification" } } }, "PlatformOnboardingAWSUnifiedCreateRequest": { "type": "object", "description": "Request to create a unified AWS onboarding", "additionalProperties": false, "required": [ "features" ], "properties": { "features": { "type": "array", "description": "List of features to enable. Determines the CloudFormation template composition.\n", "items": { "type": "string", "enum": [ "asset_inventory", "cost_and_usage", "additional_metadata" ] }, "minItems": 1 }, "single_account": { "type": "boolean", "default": false, "description": "Only relevant when asset_inventory is selected. If true, uses single-account mode instead of organization mode.\n" } } }, "PlatformOnboardingAWSUnifiedCreateResponse": { "type": "object", "description": "Response when creating a unified AWS onboarding", "additionalProperties": false, "required": [ "id", "features", "issuer_url", "audience", "subject", "template_url", "notify_path", "notify_token" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformOnboardingID" }, "features": { "type": "array", "items": { "type": "string", "enum": [ "asset_inventory", "cost_and_usage", "additional_metadata" ] } }, "region": { "type": "string", "description": "AWS region for stack deployment. Forced to us-east-1 when cost_and_usage is included." }, "stack_name": { "type": "string", "description": "CloudFormation stack name to use", "maxLength": 128 }, "issuer_url": { "type": "string", "description": "URL of the OpenID server to use when setting up a trust relationship", "x-go-name": "IssuerURL" }, "audience": { "type": "string", "description": "OpenID audience claim for the trust relationship", "x-go-name": "Audience" }, "subject": { "type": "string", "description": "OpenID subject claim for the trust relationship", "x-go-name": "Subject" }, "notify_path": { "type": "string", "description": "Path of the notify endpoint to use for status updates", "x-go-name": "NotifyPath" }, "template_url": { "type": "string", "description": "URL of the composed CloudFormation template matching requested features", "x-go-name": "TemplateURL" }, "notify_token": { "type": "string", "description": "Authentication token for notifications" } } }, "PlatformOnboardingAWSUnifiedAssetInventory": { "type": "object", "description": "Asset inventory feature status and details", "additionalProperties": false, "required": [ "stage" ], "properties": { "stage": { "type": "string", "description": "Stage of the asset inventory feature. Values: pending, started, deployed, provisioning, completed, failed, revoked.\n" }, "failure_reason": { "type": "string", "description": "Error details if the feature failed", "x-go-name": "FailureReason" }, "management_role_arn": { "type": "string", "x-go-name": "ManagementRoleARN" }, "deployment_mode": { "type": "string" }, "admin_role_arn": { "type": "string", "x-go-name": "AdminRoleARN" }, "sync_role_name": { "type": "string", "x-go-name": "SyncRoleName", "description": "Name of the sync role in each onboarded account" }, "organizational_units": { "type": "array", "x-go-name": "OrganizationalUnitIDs", "items": { "type": "string" } }, "skipped_accounts": { "type": "array", "x-go-name": "SkippedAccountIDs", "items": { "type": "string" } }, "failed_accounts_count": { "type": "integer", "x-go-name": "FailedAccountsCount" } } }, "PlatformOnboardingAWSUnifiedCostAndUsage": { "type": "object", "description": "Cost and usage feature status and details", "additionalProperties": false, "required": [ "stage" ], "properties": { "stage": { "type": "string", "description": "Stage of the cost and usage feature. Values: pending, started, deployed, provisioning, verified, failed, revoked.\n" }, "failure_reason": { "type": "string", "description": "Error details if the feature failed", "x-go-name": "FailureReason" }, "sync_role_arn": { "type": "string", "x-go-name": "SyncRoleARN" }, "s3_bucket_name": { "type": "string", "x-go-name": "S3BucketName" }, "s3_report_prefix": { "type": "string", "x-go-name": "S3ReportPrefix" }, "cur_report_name": { "type": "string", "x-go-name": "CURReportName" } } }, "PlatformOnboardingAWSUnified": { "type": "object", "description": "Unified AWS onboarding status with per-feature stages", "additionalProperties": false, "required": [ "id", "created_at", "updated_at", "issuer_url", "audience", "subject" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformOnboardingID" }, "created_at": { "type": "string", "format": "date-time", "example": "2017-07-14T16:53:42Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2017-07-14T16:53:42Z" }, "issuer_url": { "type": "string", "description": "URL of the OpenID server", "x-go-name": "IssuerURL" }, "audience": { "type": "string", "x-go-name": "Audience" }, "subject": { "type": "string", "x-go-name": "Subject" }, "asset_inventory": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedAssetInventory" }, "cost_and_usage": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedCostAndUsage" } } }, "PlatformDeployedUnifiedNotification": { "type": "object", "description": "Notification sent when unified CloudFormation stack deployment completes", "additionalProperties": false, "required": [ "status", "stack_id" ], "properties": { "status": { "type": "string", "enum": [ "deployed_unified" ] }, "stack_id": { "type": "string", "description": "CloudFormation stack ARN" }, "management_role_arn": { "type": "string", "description": "Management role ARN (present when asset_inventory is active)", "x-go-name": "ManagementRoleArn" }, "deployment_mode": { "type": "string", "description": "Deployment mode (present when asset_inventory is active)" }, "cur_main_role_arn": { "type": "string", "description": "CUR main role ARN (present when cost_and_usage is active)", "x-go-name": "CurMainRoleArn" }, "cur_sync_role_arn": { "type": "string", "description": "CUR sync role ARN (present when cost_and_usage is active)", "x-go-name": "CurSyncRoleArn" }, "cur_s3_bucket_name": { "type": "string", "description": "S3 bucket for CUR data (present when cost_and_usage is active)", "x-go-name": "CurS3BucketName" }, "cur_s3_report_prefix": { "type": "string", "description": "S3 prefix for CUR reports (present when cost_and_usage is active)", "x-go-name": "CurS3ReportPrefix" }, "cur_report_name": { "type": "string", "description": "BCM Data Export name (present when cost_and_usage is active)", "x-go-name": "CurReportName" } } }, "PlatformOnboardingAWSUnifiedNotification": { "oneOf": [ { "$ref": "#/components/schemas/PlatformStartedNotification" }, { "$ref": "#/components/schemas/PlatformRevokedNotification" }, { "$ref": "#/components/schemas/PlatformFailedNotification" }, { "$ref": "#/components/schemas/PlatformDeployedUnifiedNotification" }, { "$ref": "#/components/schemas/PlatformCompletedNotification" }, { "$ref": "#/components/schemas/PlatformCompletedSingleAccountNotification" } ], "discriminator": { "propertyName": "status", "mapping": { "started": "#/components/schemas/PlatformStartedNotification", "revoked": "#/components/schemas/PlatformRevokedNotification", "failed": "#/components/schemas/PlatformFailedNotification", "deployed_unified": "#/components/schemas/PlatformDeployedUnifiedNotification", "completed": "#/components/schemas/PlatformCompletedNotification", "completed_account": "#/components/schemas/PlatformCompletedSingleAccountNotification" } } }, "PlatformOnboardingAWSUnifiedTestConnectionsRequest": { "type": "object", "description": "Request to create test connections for all enabled features", "additionalProperties": false, "properties": { "asset_inventory": { "type": "object", "description": "Configuration for asset inventory test connection (regions, etc.)", "additionalProperties": true }, "cost_and_usage": { "type": "object", "description": "Configuration for cost and usage test connection", "additionalProperties": true }, "additional_metadata": { "type": "object", "description": "Configuration for additional metadata test connection", "additionalProperties": true } } }, "PlatformOnboardingAWSUnifiedTestConnectionsResponse": { "type": "object", "description": "Response with created test connections", "additionalProperties": false, "required": [ "test_connections" ], "properties": { "test_connections": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "feature", "test_connection_id", "plugin_path" ], "properties": { "feature": { "type": "string", "enum": [ "asset_inventory", "cost_and_usage", "additional_metadata" ] }, "test_connection_id": { "type": "string", "format": "uuid", "x-go-name": "TestConnectionID" }, "plugin_path": { "type": "string" } } } } } }, "PlatformDisplayName": { "description": "A human-readable display name", "minLength": 1, "maxLength": 255, "pattern": "^[a-zA-Z\\p{L}\\p{N}_][a-zA-Z\\p{L}\\p{N}_ \\-'\\(\\)\\[\\]]*$", "x-pattern-message": "can contain only letters, numbers, spaces, hyphens, underscores, brackets and apostrophes", "type": "string", "example": "Human Readable Name" }, "PlatformOnboardingAWSUnifiedIntegrationConfig": { "type": "object", "description": "Per-feature configuration for a unified integration, containing only the test connection reference", "additionalProperties": false, "required": [ "test_connection_id" ], "properties": { "test_connection_id": { "type": "string", "format": "uuid", "x-go-name": "TestConnectionID" } } }, "PlatformOnboardingAWSUnifiedIntegrationsRequest": { "type": "object", "description": "Request to create integrations for all enabled features", "additionalProperties": false, "required": [ "name", "destination_names" ], "properties": { "name": { "type": "string", "description": "Base name for the integrations. Sub-integrations derive their names from this value." }, "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "destination_names": { "type": "array", "items": { "type": "string" } }, "schedule": { "type": "string", "description": "Cron schedule for recurring syncs" }, "asset_inventory": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedIntegrationConfig" }, "cost_and_usage": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedIntegrationConfig" }, "additional_metadata": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedIntegrationConfig" } } }, "PlatformOnboardingAWSUnifiedIntegrationsResponse": { "type": "object", "description": "Response containing the integrations created by the unified onboarding flow. Some features create multiple integrations from a single config: asset_inventory creates both a main sync and a companion sync with a \"-cloudtrail\" suffix, and additional_metadata creates a sync with a \"-metadata\" suffix. All names are derived from the user-provided name in the request.\n", "required": [ "integrations" ], "properties": { "integrations": { "type": "array", "items": { "type": "object", "required": [ "name", "feature" ], "properties": { "name": { "type": "string", "description": "The integration name. For asset_inventory, this may be the base name or the base name with a \"-cloudtrail\" suffix. For additional_metadata, this is the base name with a \"-metadata\" suffix.\n" }, "feature": { "type": "string", "enum": [ "asset_inventory", "cost_and_usage", "additional_metadata" ] } } } } } }, "PlatformSyncEnvCreate": { "type": "object", "description": "Environment variable. Environment variables are assumed to be secret.", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "Name of the environment variable" }, "value": { "type": "string", "description": "Value of the environment variable" } } }, "PlatformAWSUnifiedFeatureTestConnectionConfig": { "type": "object", "description": "Per-feature plugin spec and environment variables for a standalone AWS unified test connection. The spec may contain ${ENV_VAR} placeholders that resolve from the env list at sync time.", "required": [ "spec" ], "additionalProperties": false, "properties": { "spec": { "type": "object", "additionalProperties": true, "description": "Plugin spec (regions, accounts, etc.). May reference env vars via ${VAR}." }, "env": { "type": "array", "description": "Environment variables for the plugin. All values are stored as encrypted secrets and substituted into the spec at sync time.", "items": { "$ref": "#/components/schemas/PlatformSyncEnvCreate" } } } }, "PlatformAWSUnifiedTestConnectionsRequest": { "type": "object", "description": "Request to create test connections for AWS unified features without an onboarding. Each feature is enabled by including its config block. The frontend is responsible for building the full plugin spec (e.g. cloudquery/aws with an accounts array of {role_arn, external_id}) and supplying any external_id values via the env list.", "additionalProperties": false, "properties": { "asset_inventory": { "$ref": "#/components/schemas/PlatformAWSUnifiedFeatureTestConnectionConfig" }, "cost_and_usage": { "$ref": "#/components/schemas/PlatformAWSUnifiedFeatureTestConnectionConfig" }, "additional_metadata": { "$ref": "#/components/schemas/PlatformAWSUnifiedFeatureTestConnectionConfig" } } }, "PlatformAWSUnifiedIntegrationsRequest": { "type": "object", "description": "Request to create AWS unified integrations from previously created standalone test connections (no onboarding). Sub-integrations derive their names from the base name: asset_inventory creates -asset-inventory and -cloudtrail syncs, additional_metadata creates a -metadata sync, and cost_and_usage creates a -cost-and-usage sync.", "additionalProperties": false, "required": [ "name", "destination_names" ], "properties": { "name": { "type": "string", "description": "Base name for the integrations. Sub-integrations derive their names from this value." }, "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "destination_names": { "type": "array", "items": { "type": "string" } }, "schedule": { "type": "string", "description": "Cron schedule for recurring syncs" }, "asset_inventory": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedIntegrationConfig" }, "cost_and_usage": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedIntegrationConfig" }, "additional_metadata": { "$ref": "#/components/schemas/PlatformOnboardingAWSUnifiedIntegrationConfig" } } }, "PlatformSyncPluginPath": { "type": "string", "description": "Plugin path in CloudQuery registry", "pattern": "^cloudquery/[^/]+", "x-pattern-message": "should be in the format cloudquery/" }, "PlatformSyncEnv": { "type": "object", "description": "Environment variable. Environment variables are assumed to be secret.", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "Name of the environment variable" } } }, "PlatformSyncLastUpdateSource": { "description": "How was the source or destination been created or updated last", "type": "string", "enum": [ "yaml", "ui" ] }, "PlatformSyncIntegrationSourceV2": { "description": "Integration Source Definition", "type": "object", "required": [ "path", "version", "tables", "env", "spec" ], "properties": { "test_connection_id": { "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "description": "unique ID of the test connection", "x-go-name": "TestConnectionID" }, "path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/aws" }, "version": { "type": "string", "description": "Version of the plugin", "example": "v1.2.3" }, "tables": { "type": "array", "description": "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", "items": { "type": "string" } }, "skip_tables": { "type": "array", "description": "Tables matched by `tables` that should be skipped. Wildcards are supported.", "items": { "type": "string" } }, "spec": { "type": "object", "additionalProperties": true, "format": "Plugin parameters, specific to each plugin" }, "env": { "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncEnv" } }, "last_update_source": { "$ref": "#/components/schemas/PlatformSyncLastUpdateSource" }, "onboarding_id": { "$ref": "#/components/schemas/PlatformOnboardingID", "description": "ID of the onboarding that will be used to authenticate the source." }, "unified_sync_kind": { "type": "string", "description": "The kind of unified sync this source belongs to. Null for standalone integrations.", "readOnly": true, "enum": [ "asset_inventory", "asset_inventory_cloudtrail", "asset_inventory_metadata", "cost_and_usage" ] } } }, "PlatformSyncDestinationWriteMode": { "type": "string", "description": "Write mode for the destination", "enum": [ "append", "overwrite", "overwrite-delete-stale" ], "default": "overwrite-delete-stale" }, "PlatformSyncDestinationMigrateMode": { "type": "string", "description": "Migrate mode for the destination", "enum": [ "safe", "forced" ], "default": "safe" }, "PlatformSyncDestinationCreate": { "title": "Sync Destination definition for creating a new destination", "description": "Sync Destination Definition", "type": "object", "required": [ "name", "path", "version" ], "properties": { "name": { "type": "string", "example": "my-destination-definition", "description": "Descriptive, unique name for the destination", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/postgresql" }, "version": { "type": "string", "description": "Version of the plugin", "example": "v1.2.3" }, "write_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationWriteMode" }, "migrate_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationMigrateMode" }, "sync_group_id": { "type": "string", "x-go-name": "SyncGroupID" }, "send_sync_summary": { "type": "boolean" }, "spec": { "type": "object", "additionalProperties": true, "format": "Plugin parameters, specific to each plugin" }, "env": { "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncEnvCreate" } }, "last_update_source": { "$ref": "#/components/schemas/PlatformSyncLastUpdateSource" }, "transformers": { "type": "array", "items": { "type": "string", "description": "Unique name of the transformer", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" } } } }, "PlatformSyncRunStatus": { "description": "The status of the sync run", "type": "string", "enum": [ "completed", "failed", "started", "cancelled", "created", "pending" ] }, "PlatformSyncRunStatusReason": { "description": "The reason for the status", "type": "string", "enum": [ "error", "oom_killed", "partial_success", "ingestion_failed" ] }, "PlatformSyncRunWorkerPhase": { "description": "Phase of the worker in the sync run", "type": "string", "enum": [ "Pending", "Running", "Succeeded", "Failed", "Unknown" ] }, "PlatformSyncRunWorkerStatus": { "description": "The worker information for a sync run", "type": "object", "required": [ "phase" ], "properties": { "phase": { "$ref": "#/components/schemas/PlatformSyncRunWorkerPhase", "description": "Phase that the worker is in" }, "reason": { "type": "string", "description": "The reason for the status of the worker" } } }, "PlatformSyncRun": { "description": "Managed Sync Run definition", "type": "object", "required": [ "created_at", "sync_name", "id", "status", "total_rows", "warnings", "errors", "migrate", "ingested" ], "properties": { "sync_name": { "type": "string", "description": "Name of the sync" }, "id": { "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "description": "unique ID of the run", "x-go-name": "ID" }, "status": { "$ref": "#/components/schemas/PlatformSyncRunStatus", "description": "Status of the sync run" }, "status_reason": { "$ref": "#/components/schemas/PlatformSyncRunStatusReason", "description": "Reason for the status of the sync run" }, "workers": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncRunWorkerStatus" }, "description": "Information about the workers used in the sync run" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the sync run was created" }, "completed_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the sync run was completed" }, "total_rows": { "type": "integer", "format": "int64", "description": "Total number of rows in the sync" }, "warnings": { "type": "integer", "format": "int64", "description": "Number of warnings encountered during the sync" }, "errors": { "type": "integer", "format": "int64", "description": "Number of errors encountered during the sync" }, "migration": { "type": "boolean", "description": "Whether the sync run is a migration" }, "ingested": { "type": "boolean", "description": "Whether the sync run's data has been ingested" } } }, "PlatformSyncDestinationV2": { "allOf": [ { "$ref": "#/components/schemas/PlatformSyncDestinationCreate" }, { "type": "object", "required": [ "name", "display_name", "path", "version", "write_mode", "migrate_mode", "spec", "env", "created_at", "updated_at", "last_update_source", "draft", "transformers", "disabled" ], "properties": { "created_at": { "type": "string", "format": "date-time", "example": "2023-07-14T16:53:42Z", "description": "Time when the source was created" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-14T16:53:42Z", "description": "Time when the source was last updated" }, "env": { "description": "Environment variables for the plugin.", "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncEnv" } }, "draft": { "type": "boolean", "description": "If a sync destination is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID." }, "previous_version": { "type": "string", "description": "Previous version of the plugin during a version upgrade", "example": "v1.2.2" }, "disabled": { "type": "boolean", "description": "If true, the sync destination is disabled and cannot be used in syncs." }, "last_run": { "$ref": "#/components/schemas/PlatformSyncRun" }, "plugin": { "$ref": "#/components/schemas/PlatformPlugin" } } } ] }, "PlatformSyncIntegrationV2": { "type": "object", "description": "An integration definition", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "Descriptive, unique name for the integration", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "source": { "$ref": "#/components/schemas/PlatformSyncIntegrationSourceV2" }, "plugin": { "$ref": "#/components/schemas/PlatformPlugin" }, "destinations": { "type": "array", "description": "List of sync destinations associated with this integration", "items": { "$ref": "#/components/schemas/PlatformSyncDestinationV2" } }, "schedule": { "type": "string", "description": "Cron schedule for the integration" }, "disabled": { "type": "boolean", "description": "Whether the integration is disabled", "default": false }, "created_at": { "type": "string", "format": "date-time", "description": "Time when the sync was created" }, "updated_at": { "type": "string", "format": "date-time", "description": "Time when the sync was updated" }, "created_by": { "type": "string" } } }, "PlatformSyncIntegrationGroup": { "type": "object", "description": "A group of integrations linked by a shared onboarding", "additionalProperties": false, "required": [ "integrations" ], "properties": { "onboarding_id": { "type": "string", "format": "uuid", "description": "Onboarding ID linking the integrations. Null for standalone integrations.", "x-go-name": "OnboardingID" }, "integrations": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncIntegrationV2" } } } }, "PlatformQueryExpression": { "title": "QueryExpression", "type": "string", "description": "Query expression", "example": "SELECT account_id, instance_id, instance_type, region, name, tags FROM aws_ec2_instance WHERE instance_type = 't2.micro'" }, "PlatformAlert": { "title": "Alert", "type": "object", "description": "An alert instance that can be triggered by a query", "additionalProperties": false, "required": [ "id", "query_id", "enabled", "message", "severity", "state", "total_violations", "created_at", "updated_at", "num_destinations" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier for the alert", "x-go-name": "ID" }, "query_id": { "type": "string", "format": "uuid", "description": "Reference to the associated query", "x-go-name": "QueryID" }, "enabled": { "type": "boolean", "description": "Indicates if the alert is enabled" }, "message": { "type": "string", "description": "Alert message content" }, "severity": { "$ref": "#/components/schemas/PlatformAlertSeverity" }, "state": { "$ref": "#/components/schemas/PlatformAlertState" }, "total_violations": { "type": "integer", "format": "int64", "description": "Number of violations that triggered the alert" }, "last_evaluated_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was last evaluated" }, "triggered_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was triggered" }, "created_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was created" }, "updated_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was last updated" }, "num_destinations": { "type": "integer", "description": "Number of notification destinations this alert is configured to send to" } } }, "PlatformQueryViewName": { "description": "The name of the view the query is saved to in the warehouse", "type": "string", "pattern": "^(saved_query_view_[a-zA-Z0-9_]+|)$", "x-pattern-message": "can contain only alphanumerical characters and underscores. must start with `saved_query_view_`" }, "PlatformQuery": { "title": "Query", "type": "object", "description": "Saved query", "additionalProperties": false, "required": [ "id", "name", "query", "created_at", "alert_configured" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformQueryID" }, "name": { "type": "string", "example": "Find all t2.micro EC2 instances" }, "query": { "$ref": "#/components/schemas/PlatformQueryExpression" }, "description": { "type": "string", "example": "Query to find all EC2 instances of type t2.micro from the aws_ec2_instance raw table" }, "user_id": { "$ref": "#/components/schemas/PlatformUserID" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformQueryTag" }, "x-go-type-skip-optional-pointer": true }, "columns": { "type": "array", "items": { "type": "string" }, "description": "Columns returned by this query", "x-go-type-skip-optional-pointer": true }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "alert_configured": { "type": "boolean", "description": "Indicates if the query has an alert configured" }, "alert": { "$ref": "#/components/schemas/PlatformAlert" }, "view_name": { "$ref": "#/components/schemas/PlatformQueryViewName" } } }, "PlatformQueryColumns": { "type": "object", "additionalProperties": false, "required": [ "columns", "top_level_tables", "is_aggregate" ], "properties": { "columns": { "type": "array", "description": "Column names the query would produce, including columns resolved from `SELECT *` via the referenced table schemas.", "items": { "type": "string" } }, "top_level_tables": { "type": "array", "description": "Tables referenced by the top-level `FROM` clause (joins included, subqueries excluded). Database-qualified tables are returned unqualified. Empty when the outermost SELECT has no top-level tables (e.g. FROM only has subqueries).", "items": { "type": "string" } }, "is_aggregate": { "type": "boolean", "description": "True when the top-level SELECT collapses input rows — either because a `GROUP BY` clause is present or because every top-level SELECT item is an aggregate function call (count/sum/avg/min/max, etc)." } }, "title": "QueryColumns" }, "PlatformTableSelect": { "title": "TableSelect", "type": "string" }, "PlatformTableSortBy": { "title": "TableSortBy", "type": "string" }, "PlatformTableSortDirection": { "title": "TableSortDirection", "type": "string", "enum": [ "asc", "desc" ], "default": "asc" }, "PlatformTableGroupBy": { "title": "TableGroupBy", "type": "string" }, "PlatformTableData": { "additionalProperties": false, "properties": { "query": { "$ref": "#/components/schemas/PlatformQueryExpression" }, "columns": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string" } }, "required": [ "name", "type" ] } }, "rows": { "type": "array", "items": { "type": "array", "items": {} } } }, "required": [ "columns", "rows" ], "title": "TableData", "type": "object" }, "PlatformQueryCreate": { "title": "Query Create", "type": "object", "description": "Create a saved query", "additionalProperties": false, "required": [ "name", "query" ], "properties": { "name": { "type": "string", "example": "Find all t2.micro EC2 instances" }, "query": { "type": "string", "example": "SELECT account_id, instance_id, instance_type, region, name, tags FROM aws_ec2_instance WHERE instance_type = 't2.micro'" }, "public": { "type": "boolean", "default": true, "x-omitempty": false, "x-go-type-skip-optional-pointer": true }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformQueryTag" }, "x-go-type-skip-optional-pointer": true }, "description": { "type": "string", "example": "Query to find all EC2 instances of type t2.micro from the aws_ec2_instance raw table" }, "view_name": { "$ref": "#/components/schemas/PlatformQueryViewName" }, "alert": { "$ref": "#/components/schemas/PlatformAlertCreate" } } }, "PlatformQueryDetail": { "title": "Query Detail", "type": "object", "description": "Query Detail", "additionalProperties": false, "required": [ "id", "name", "query", "created_at", "alert_configured" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformQueryID" }, "name": { "type": "string", "example": "Find all t2.micro EC2 instances" }, "query": { "$ref": "#/components/schemas/PlatformQueryExpression" }, "description": { "type": "string", "example": "Query to find all EC2 instances of type t2.micro from the aws_ec2_instance raw table" }, "user_id": { "$ref": "#/components/schemas/PlatformUserID" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformQueryTag" }, "x-go-type-skip-optional-pointer": true }, "columns": { "type": "array", "items": { "type": "string" }, "description": "Columns returned by this query", "x-go-type-skip-optional-pointer": true }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" }, "alert_configured": { "type": "boolean", "description": "Indicates if the query has an alert configured. When this is set, the alert field will be populated with the alert details." }, "alert": { "$ref": "#/components/schemas/PlatformAlertDetail" }, "view_name": { "$ref": "#/components/schemas/PlatformQueryViewName" } } }, "PlatformAlertUpdate": { "title": "Alert Update", "description": "Alert Update Definition", "type": "object", "properties": { "message": { "type": "string", "example": "All resources need to be tagged" }, "severity": { "$ref": "#/components/schemas/PlatformAlertSeverity" }, "enabled": { "type": "boolean", "description": "Indicates if the alert is enabled" }, "notification_destinations": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformNotificationDestinationID" }, "description": "List of notification destinations to send alerts to", "allowEmptyValue": true, "explode": true } } }, "PlatformQueryUpdate": { "title": "Query Update", "type": "object", "description": "Update a saved query", "additionalProperties": false, "properties": { "name": { "type": "string", "example": "Find all t2.micro EC2 instances" }, "query": { "type": "string", "example": "SELECT account_id, instance_id, instance_type, region, name, tags FROM aws_ec2_instances WHERE instance_type = 't2.micro'" }, "public": { "type": "boolean" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformQueryTag" } }, "description": { "type": "string", "example": "Query to find all EC2 instances of type t2.micro from the aws_ec2_instances raw table" }, "view_name": { "$ref": "#/components/schemas/PlatformQueryViewName" }, "alert": { "$ref": "#/components/schemas/PlatformAlertUpdate" } } }, "PlatformFilterCreate": { "title": "Filter definition for creating a filter", "type": "object", "description": "Saved filter", "additionalProperties": false, "required": [ "name", "expression" ], "properties": { "name": { "type": "string", "example": "t2.micro EC2 instances" }, "expression": { "$ref": "#/components/schemas/PlatformFilterExpression" }, "public": { "type": "boolean", "default": true, "x-omitempty": false, "x-go-type-skip-optional-pointer": true, "description": "Whether the filter is visible to all users, or only to the user who created it" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformFilterTag" }, "x-go-type-skip-optional-pointer": true }, "description": { "type": "string", "example": "Filter to find all EC2 instances of type t2.micro from the aws_ec2_instance raw table" } } }, "PlatformInsightSeverity": { "description": "Insight severity level", "type": "string", "enum": [ "Low", "Medium", "High", "Critical" ], "x-go-name": "InsightSeverity" }, "PlatformInsightID": { "description": "Unique identifier for the insight", "type": "string", "x-go-name": "InsightID" }, "PlatformInsight": { "title": "Insight", "type": "object", "description": "Security or compliance insight summary", "additionalProperties": false, "required": [ "id", "title", "severity", "insight_category", "source", "source_category", "resource_types", "resources_count", "accounts_count", "created_at", "detected_at", "last_synced_at" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformInsightID" }, "title": { "type": "string", "description": "Title of the insight" }, "evidence": { "type": "string", "description": "Detailed evidence (description) of the insight (Markdown)" }, "mitigation": { "type": "string", "description": "Mitigation steps for the insight (Markdown)" }, "severity": { "$ref": "#/components/schemas/PlatformInsightSeverity" }, "insight_category": { "type": "string", "description": "Category (e.g. Security, FinOps)" }, "source": { "type": "string", "description": "Source (e.g. Platform, Wiz, Lacework)" }, "source_category": { "type": "string", "description": "Source category (e.g. Platform, Third Party, Custom)" }, "subcategory": { "type": "string", "nullable": true }, "resource_types": { "type": "string", "description": "Resource types affected" }, "resources_count": { "type": "integer", "format": "int64", "description": "Number of resources affected" }, "accounts_count": { "type": "integer", "format": "int64", "description": "Number of accounts affected" }, "additional_properties": { "type": "object", "description": "Insight-specific metadata summed for all affected resources (e.g. cost insight fields).", "additionalProperties": true }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Tags associated with the insight" }, "created_at": { "type": "string", "format": "date-time", "description": "When the insight record was created" }, "detected_at": { "type": "string", "format": "date-time", "description": "When the insight was first detected" }, "last_synced_at": { "type": "string", "format": "date-time", "description": "When the insight was last synced" } } }, "PlatformInsightsListMetadata": { "required": [ "page_size" ], "properties": { "total_count": { "type": "integer" }, "resource_count": { "type": "integer" }, "resource_types": { "type": "integer" }, "last_page": { "type": "integer" }, "page_size": { "type": "integer" }, "time_ms": { "type": "integer" } } }, "PlatformInsightFilter": { "title": "Insight Filter", "type": "object", "description": "Saved insight filter details", "additionalProperties": false, "required": [ "id", "name", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab" }, "name": { "type": "string", "example": "My Saved Security Filter" }, "description": { "type": "string", "example": "Filters for critical security insights in AWS" }, "search": { "type": "string", "example": "s3 bucket" }, "insight_category": { "type": "array", "items": { "type": "string" }, "example": [ "Security", "Compliance" ] }, "severities": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformInsightSeverity" }, "example": [ "Critical", "High" ] }, "resource_types": { "type": "array", "items": { "type": "string" }, "example": [ "aws_s3_bucket", "aws_ec2_instance" ] }, "source": { "type": "array", "items": { "type": "string" }, "example": [ "Platform", "Wiz" ] }, "source_category": { "type": "array", "items": { "type": "string" }, "example": [ "Platform", "Third Party" ] }, "clouds": { "type": "array", "items": { "type": "string" }, "example": [ "aws", "azure" ] }, "accounts": { "type": "array", "items": { "type": "string" }, "example": [ "prod-account", "staging-account" ] }, "regions": { "type": "array", "items": { "type": "string" }, "example": [ "us-east-1", "eu-west-1" ] }, "tags": { "type": "array", "items": { "type": "string" }, "example": [ "production", "critical" ] }, "ownership_tags": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "description": "Ownership tag filters keyed by tag name", "example": { "team": [ "engineering", "platform" ], "org": [ "cloud" ] } }, "group_by": { "type": "array", "items": { "type": "string" }, "example": [ "severity" ] }, "user_id": { "$ref": "#/components/schemas/PlatformUserID" }, "created_at": { "type": "string", "format": "date-time", "example": "2017-07-14T16:53:42Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2017-07-14T16:53:42Z" } } }, "PlatformInsightFilterCreate": { "title": "Insight Filter Create", "type": "object", "description": "Definition for creating a new saved insight filter", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { "type": "string", "example": "My Saved Security Filter" }, "description": { "type": "string", "example": "Filters for critical security insights in AWS" }, "search": { "type": "string", "example": "s3 bucket" }, "insight_category": { "type": "array", "items": { "type": "string" } }, "severities": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformInsightSeverity" } }, "resource_types": { "type": "array", "items": { "type": "string" } }, "source": { "type": "array", "items": { "type": "string" } }, "source_category": { "type": "array", "items": { "type": "string" } }, "clouds": { "type": "array", "items": { "type": "string" } }, "accounts": { "type": "array", "items": { "type": "string" } }, "regions": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "ownership_tags": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "description": "Ownership tag filters keyed by tag name", "example": { "team": [ "engineering", "platform" ], "org": [ "cloud" ] } }, "group_by": { "type": "array", "items": { "type": "string" } } } }, "PlatformInsightFilterID": { "description": "The unique ID for the insight filter", "type": "string", "format": "uuid", "x-go-name": "InsightFilterID" }, "PlatformInsightFilterUpdate": { "title": "Insight Filter Update", "type": "object", "description": "Definition for updating an existing saved insight filter", "additionalProperties": false, "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "search": { "type": "string" }, "insight_category": { "type": "array", "items": { "type": "string" } }, "severities": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformInsightSeverity" } }, "resource_types": { "type": "array", "items": { "type": "string" } }, "source": { "type": "array", "items": { "type": "string" } }, "source_category": { "type": "array", "items": { "type": "string" } }, "clouds": { "type": "array", "items": { "type": "string" } }, "accounts": { "type": "array", "items": { "type": "string" } }, "regions": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "ownership_tags": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "description": "Ownership tag filters keyed by tag name", "example": { "team": [ "engineering", "platform" ], "org": [ "cloud" ] } }, "group_by": { "type": "array", "items": { "type": "string" } } } }, "PlatformTableRowID": { "description": "ID of the Resource", "type": "string", "example": "table_12345678-1234-1234-1234-1234567890ab" }, "PlatformReportSortBy": { "title": "ReportSortBy", "type": "string", "enum": [ "id", "title", "description", "private", "created_at", "updated_at" ] }, "PlatformReportSortDirection": { "title": "ReportTemplateSortDirection", "type": "string", "enum": [ "asc", "desc" ], "default": "asc" }, "PlatformReport": { "type": "object", "required": [ "id", "title", "description", "content", "private" ], "properties": { "id": { "type": "string", "format": "uuid", "x-go-name": "ID" }, "title": { "type": "string" }, "description": { "type": "string" }, "content": { "description": "YAML body", "type": "string" }, "private": { "type": "boolean" }, "created_by": { "$ref": "#/components/schemas/PlatformCreatedBy" }, "updated_by": { "$ref": "#/components/schemas/PlatformCreatedBy" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } }, "PlatformReportCreate": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "content": { "type": "string", "description": "YAML body" }, "private": { "type": "boolean" }, "template_id": { "type": "string", "format": "uuid", "x-go-name": "TemplateID", "description": "Template ID, if report is being created from a template" } }, "required": [ "title", "content" ] }, "PlatformReportUpdate": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "content": { "type": "string", "description": "YAML body" }, "private": { "type": "boolean" }, "template_id": { "type": "string", "format": "uuid", "x-go-name": "TemplateID", "description": "Template ID, if report is being created from a template" } } }, "PlatformReportTemplateSortBy": { "title": "ReportTemplateSortBy", "type": "string", "enum": [ "id", "title", "description", "visible", "created_at", "updated_at" ] }, "PlatformReportTemplateSortDirection": { "title": "ReportTemplateSortDirection", "type": "string", "enum": [ "asc", "desc" ], "default": "asc" }, "PlatformReportTemplate": { "type": "object", "required": [ "id", "title", "description", "content", "visible" ], "properties": { "id": { "type": "string", "format": "uuid", "x-go-name": "ID" }, "title": { "type": "string" }, "description": { "type": "string" }, "content": { "description": "YAML body", "type": "string" }, "visible": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } }, "PlatformReportTemplateCreateOrUpdate": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "content": { "type": "string", "description": "YAML body" }, "visible": { "type": "boolean" } } }, "PlatformSyncDestinationTestConnectionCreate": { "title": "Sync Destination Test Connection creation definition", "type": "object", "required": [ "path", "version" ], "properties": { "path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/postgresql" }, "destination_name": { "type": "string", "description": "Name of an existing destination" }, "version": { "type": "string", "description": "Version of the plugin", "example": "v1.2.3" }, "write_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationWriteMode" }, "migrate_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationMigrateMode" }, "sync_group_id": { "type": "string", "x-go-name": "SyncGroupID" }, "spec": { "type": "object", "additionalProperties": true, "format": "Plugin parameters, specific to each plugin" }, "env": { "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncEnvCreate" } } } }, "PlatformSyncTestConnectionID": { "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "description": "unique ID of the test connection", "x-go-name": "ID" }, "PlatformSyncTestConnectionStatus": { "description": "The status of the sync run", "type": "string", "enum": [ "completed", "failed", "started", "created" ] }, "PlatformSyncDestinationTestConnection": { "type": "object", "required": [ "id", "created_at", "status" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformSyncTestConnectionID", "x-go-name": "ID" }, "status": { "$ref": "#/components/schemas/PlatformSyncTestConnectionStatus", "description": "Status of the sync test connection" }, "failure_reason": { "type": "string", "description": "Reason for failure", "example": "password authentication failed for user \"exampleuser\"" }, "failure_code": { "example": "INVALID_CREDENTIALS", "type": "string", "description": "Code for failure" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the test connection was created" }, "completed_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the test connection was completed" }, "plugin_path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/postgresql" }, "plugin_version": { "$ref": "#/components/schemas/PlatformVersionName", "description": "Version of the plugin" }, "sync_group_id": { "type": "string", "x-go-name": "SyncGroupID" } } }, "PlatformSyncDestinationTestConnectionID": { "description": "ID of the Sync Destination Test Connection", "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "x-go-name": "SyncDestinationTestConnectionID" }, "PlatformPromoteSyncDestinationTestConnection": { "title": "Sync Destination definition for creating a new source", "description": "Sync Destination Definition", "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "example": "my-destination-definition", "description": "Descriptive, unique name for the destination", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "write_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationWriteMode" }, "migrate_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationMigrateMode" }, "send_sync_summary": { "type": "boolean" }, "overwrite_destination": { "type": "boolean", "description": "Set this to allow overwriting an existing sync destination. Defaults to true to preserve compatibility." } } }, "PlatformSyncDestination": { "allOf": [ { "$ref": "#/components/schemas/PlatformSyncDestinationCreate" }, { "type": "object", "required": [ "name", "display_name", "path", "version", "write_mode", "migrate_mode", "spec", "env", "created_at", "updated_at", "last_update_source", "draft", "transformers" ], "properties": { "created_at": { "type": "string", "format": "date-time", "example": "2023-07-14T16:53:42Z", "description": "Time when the source was created" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-14T16:53:42Z", "description": "Time when the source was last updated" }, "env": { "description": "Environment variables for the plugin.", "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncEnv" } }, "draft": { "type": "boolean", "description": "If a sync destination is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID." }, "previous_version": { "type": "string", "description": "Previous version of the plugin during a version upgrade", "example": "v1.2.2" } } } ] }, "PlatformSyncGenericSortBy": { "title": "SyncGenericSortBy", "type": "string", "enum": [ "name", "display_name", "path", "version", "created_at", "updated_at", "draft" ] }, "PlatformSyncSortDirection": { "title": "SyncSortDirection", "type": "string", "enum": [ "asc", "desc" ], "default": "asc" }, "PlatformSyncDestinationWriteModeUpdate": { "type": "string", "description": "Write mode for the destination, for updating", "enum": [ "append", "overwrite", "overwrite-delete-stale" ] }, "PlatformSyncDestinationMigrateModeUpdate": { "type": "string", "description": "Migrate mode for the destination, for updating", "enum": [ "safe", "forced" ] }, "PlatformSyncDestinationUpdate": { "title": "Sync Destination definition for updating a destination", "description": "Sync Destination Update Definition", "type": "object", "properties": { "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "write_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationWriteModeUpdate" }, "migrate_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationMigrateModeUpdate" }, "send_sync_summary": { "type": "boolean" }, "last_update_source": { "$ref": "#/components/schemas/PlatformSyncLastUpdateSource" }, "transformers": { "type": "array", "items": { "type": "string", "description": "Unique name of the transformer", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" } } } }, "PlatformSyncSortBy": { "title": "SyncSortBy", "type": "string", "enum": [ "cpu", "created_at", "created_by", "destinations", "disabled", "display_name", "memory", "name", "schedule", "source", "updated_at", "last_run_created_at", "last_run_updated_at", "last_run_completed_at", "last_run_errors", "last_run_warnings", "last_run_total_rows", "last_run_status", "last_run_migration" ] }, "PlatformSync": { "description": "Managed Sync definition", "type": "object", "required": [ "name", "display_name", "source", "destinations", "disabled", "schedule", "cpu", "memory", "created_at", "updated_at" ], "properties": { "name": { "type": "string", "description": "Descriptive, unique name for the sync", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "source": { "type": "string", "description": "Unique name of the source" }, "destinations": { "type": "array", "description": "List of destinations for the sync", "items": { "type": "string", "description": "Unique name of the destination" } }, "disabled": { "type": "boolean", "description": "Whether the sync is disabled" }, "schedule": { "type": "string", "description": "Cron schedule for the sync" }, "cpu": { "type": "string", "description": "CPU quota for the sync", "example": "1", "x-go-name": "CPU" }, "memory": { "type": "string", "description": "Memory quota for the sync", "example": "2Gi" }, "created_at": { "type": "string", "format": "date-time", "description": "Time when the sync was created" }, "updated_at": { "type": "string", "format": "date-time", "description": "Time when the sync was updated" }, "created_by": { "type": "string" } } }, "PlatformListSyncLastRun": { "description": "Managed Sync List Entry Last Run Info", "required": [ "id", "status", "migration", "created_at", "total_rows", "warnings", "errors", "ingested" ], "properties": { "id": { "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "description": "unique ID of the run", "x-go-name": "ID" }, "status": { "$ref": "#/components/schemas/PlatformSyncRunStatus", "description": "Status of the sync run" }, "status_reason": { "$ref": "#/components/schemas/PlatformSyncRunStatusReason", "description": "Reason for the status of the sync run" }, "migration": { "type": "boolean", "description": "Whether the sync run was a migration" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the sync run was created" }, "completed_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the sync run was completed" }, "total_rows": { "type": "integer", "format": "int64", "description": "Total number of rows in the sync" }, "warnings": { "type": "integer", "format": "int64", "description": "Number of warnings encountered during the sync" }, "errors": { "type": "integer", "format": "int64", "description": "Number of errors encountered during the sync" }, "ingested": { "type": "boolean", "description": "Whether the sync run's data has been ingested" } } }, "PlatformListSync": { "description": "Managed Sync List Entry", "allOf": [ { "$ref": "#/components/schemas/PlatformSync" }, { "type": "object", "properties": { "last_run": { "$ref": "#/components/schemas/PlatformListSyncLastRun" } } } ] }, "PlatformSyncTestConnection": { "type": "object", "required": [ "id", "created_at", "status" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformSyncTestConnectionID", "x-go-name": "ID" }, "status": { "$ref": "#/components/schemas/PlatformSyncTestConnectionStatus", "description": "Status of the sync test connection" }, "failure_reason": { "type": "string", "description": "Reason for failure", "example": "password authentication failed for user \"exampleuser\"" }, "failure_code": { "example": "INVALID_CREDENTIALS", "type": "string", "description": "Code for failure" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the test connection was created" }, "completed_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the test connection was completed" }, "plugin_path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/postgresql" }, "plugin_version": { "$ref": "#/components/schemas/PlatformVersionName", "description": "Version of the plugin" }, "plugin_kind": { "$ref": "#/components/schemas/PlatformPluginKind" } } }, "PlatformSyncSourceTestConnectionCreate": { "title": "Sync Source Test Connection creation definition", "type": "object", "required": [ "path", "version" ], "properties": { "path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/postgresql" }, "source_name": { "type": "string", "description": "Name of an existing source" }, "version": { "type": "string", "description": "Version of the plugin", "example": "v1.2.3" }, "spec": { "type": "object", "additionalProperties": true, "format": "Plugin parameters, specific to each plugin" }, "env": { "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncEnvCreate" } }, "onboarding_id": { "$ref": "#/components/schemas/PlatformOnboardingID", "description": "ID of the onboarding that will be used to authenticate the source." } } }, "PlatformSyncSourceTestConnection": { "type": "object", "required": [ "id", "created_at", "status" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformSyncTestConnectionID", "x-go-name": "ID" }, "status": { "$ref": "#/components/schemas/PlatformSyncTestConnectionStatus", "description": "Status of the sync test connection" }, "failure_reason": { "type": "string", "description": "Reason for failure", "example": "password authentication failed for user \"exampleuser\"" }, "failure_code": { "example": "INVALID_CREDENTIALS", "type": "string", "description": "Code for failure" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the test connection was created" }, "completed_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the test connection was completed" }, "plugin_path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/postgresql" }, "plugin_version": { "$ref": "#/components/schemas/PlatformVersionName", "description": "Version of the plugin" } } }, "PlatformSyncSourceTestConnectionID": { "description": "ID of the Sync Source Test Connection", "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "x-go-name": "SyncSourceTestConnectionID" }, "PlatformSyncDestinationName": { "type": "string", "example": "my-destination-definition", "description": "Descriptive, unique name for the destination", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores", "x-go-name": "SyncDestinationNameField" }, "PlatformPromoteSyncSourceTestConnection": { "title": "Sync Source definition for creating a new source", "description": "Sync Source Definition", "type": "object", "required": [ "name", "tables" ], "properties": { "name": { "type": "string", "example": "my-source-definition", "description": "Descriptive, unique name for the source", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "tables": { "type": "array", "description": "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", "items": { "type": "string" } }, "skip_tables": { "type": "array", "description": "Tables matched by `tables` that should be skipped. Wildcards are supported.", "items": { "type": "string" } }, "overwrite_source": { "type": "boolean", "description": "Set this to allow overwriting an existing sync source. Defaults to true to preserve compatibility." }, "destination_names": { "type": "array", "description": "List of sync destination names associated with this source", "items": { "$ref": "#/components/schemas/PlatformSyncDestinationName" }, "minItems": 0, "default": [ "cloudquery" ] } } }, "PlatformSyncSourceCreate": { "title": "Sync Source definition for creating a new source", "description": "Sync Source Definition", "type": "object", "required": [ "name", "path", "version", "tables" ], "properties": { "name": { "type": "string", "example": "my-source-definition", "description": "Descriptive, unique name for the source", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/aws" }, "version": { "type": "string", "description": "Version of the plugin", "example": "v1.2.3" }, "tables": { "type": "array", "description": "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", "items": { "type": "string" } }, "skip_tables": { "type": "array", "description": "Tables matched by `tables` that should be skipped. Wildcards are supported.", "items": { "type": "string" } }, "spec": { "type": "object", "additionalProperties": true, "format": "Plugin parameters, specific to each plugin" }, "env": { "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncEnvCreate" } }, "last_update_source": { "$ref": "#/components/schemas/PlatformSyncLastUpdateSource" }, "onboarding_id": { "$ref": "#/components/schemas/PlatformOnboardingID", "description": "ID of the onboarding that will be used to authenticate the source." } } }, "PlatformSyncSource": { "allOf": [ { "$ref": "#/components/schemas/PlatformSyncSourceCreate" }, { "type": "object", "required": [ "name", "display_name", "path", "version", "tables", "skip_tables", "spec", "env", "created_at", "updated_at", "last_update_source", "draft" ], "properties": { "created_at": { "type": "string", "format": "date-time", "example": "2023-07-14T16:53:42Z", "description": "Time when the source was created" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-14T16:53:42Z", "description": "Time when the source was last updated" }, "env": { "description": "Environment variables for the plugin.", "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncEnv" } }, "draft": { "type": "boolean", "description": "If a sync source is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID." }, "previous_version": { "type": "string", "description": "Previous version of the plugin during a version upgrade", "example": "v1.2.2" } } } ] }, "PlatformSyncIntegrationTestConnectionCreateV2": { "title": "Sync Integration Test Connection creation definition", "type": "object", "required": [ "path" ], "properties": { "path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/postgresql" }, "source_name": { "type": "string", "description": "Name of an existing sync integration. The handler resolves it to the underlying sync source via `syncs.source_name` to inherit env/secret values during update flows. For backward compatibility, when no sync with this name exists the value is treated as a direct sync source name." }, "version": { "type": "string", "description": "Version of the plugin", "example": "v1.2.3" }, "spec": { "type": "object", "additionalProperties": true, "format": "Plugin parameters, specific to each plugin" }, "env": { "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncEnvCreate" } }, "onboarding_id": { "$ref": "#/components/schemas/PlatformOnboardingID", "description": "ID of the onboarding that will be used to authenticate the source." } } }, "PlatformSyncIntegrationTestConnectionV2": { "type": "object", "required": [ "id", "created_at", "status" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformSyncTestConnectionID", "x-go-name": "ID" }, "status": { "$ref": "#/components/schemas/PlatformSyncTestConnectionStatus", "description": "Status of the sync test connection" }, "failure_reason": { "type": "string", "description": "Reason for failure", "example": "password authentication failed for user \"exampleuser\"" }, "failure_code": { "example": "INVALID_CREDENTIALS", "type": "string", "description": "Code for failure" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the test connection was created" }, "completed_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the test connection was completed" }, "plugin_path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/postgresql" }, "plugin_version": { "$ref": "#/components/schemas/PlatformVersionName", "description": "Version of the plugin" } } }, "PlatformSyncIntegrationExpandedV2": { "description": "Managed Sync List Entry", "allOf": [ { "$ref": "#/components/schemas/PlatformSyncIntegrationV2" }, { "type": "object", "properties": { "last_run": { "$ref": "#/components/schemas/PlatformListSyncLastRun" } } } ] }, "PlatformSyncIntegrationSourceCreateV2": { "description": "Integration Source Definition", "type": "object", "required": [ "test_connection_id", "tables" ], "properties": { "test_connection_id": { "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "description": "unique ID of the test connection", "x-go-name": "TestConnectionID" }, "tables": { "type": "array", "description": "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", "items": { "type": "string" } }, "skip_tables": { "type": "array", "description": "Tables matched by `tables` that should be skipped. Wildcards are supported.", "items": { "type": "string" } }, "last_update_source": { "$ref": "#/components/schemas/PlatformSyncLastUpdateSource" } } }, "PlatformSyncIntegrationCreateV2": { "type": "object", "description": "Create a new sync integration", "required": [ "name", "source", "destination_names" ], "properties": { "name": { "type": "string", "description": "Descriptive, unique name for the integration", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "source": { "$ref": "#/components/schemas/PlatformSyncIntegrationSourceCreateV2" }, "schedule": { "type": "string", "description": "Cron schedule for the integration" }, "disabled": { "type": "boolean", "description": "Whether the integration is disabled", "default": false }, "destination_names": { "type": "array", "description": "List of sync destination names associated with this integration", "items": { "$ref": "#/components/schemas/PlatformSyncDestinationName" }, "minItems": 0, "default": [ "cloudquery" ] } } }, "PlatformSyncIntegrationSourceUpdateV2": { "description": "Integration Definition", "type": "object", "properties": { "test_connection_id": { "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "description": "unique ID of the test connection", "x-go-name": "TestConnectionID" }, "tables": { "type": "array", "description": "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", "items": { "type": "string" } }, "skip_tables": { "type": "array", "description": "Tables matched by `tables` that should be skipped. Wildcards are supported.", "items": { "type": "string" } }, "last_update_source": { "$ref": "#/components/schemas/PlatformSyncLastUpdateSource" } } }, "PlatformSyncIntegrationUpdateV2": { "type": "object", "description": "Update an existing integration", "properties": { "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "source": { "$ref": "#/components/schemas/PlatformSyncIntegrationSourceUpdateV2" }, "schedule": { "type": "string", "description": "Cron schedule for the integration" }, "disabled": { "type": "boolean", "description": "Whether the integration is disabled" }, "destination_names": { "type": "array", "description": "List of sync destinations associated with this integration", "items": { "$ref": "#/components/schemas/PlatformSyncDestinationName" } } } }, "PlatformSyncSourceUpdate": { "title": "Sync Source definition for updating a source", "description": "Sync Source Update Definition", "type": "object", "properties": { "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "tables": { "type": "array", "description": "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", "items": { "type": "string" } }, "skip_tables": { "type": "array", "description": "Tables matched by `tables` that should be skipped. Wildcards are supported.", "items": { "type": "string" } }, "last_update_source": { "$ref": "#/components/schemas/PlatformSyncLastUpdateSource" }, "destination_names": { "type": "array", "description": "List of sync destination names associated with this source", "items": { "$ref": "#/components/schemas/PlatformSyncDestinationName" }, "minItems": 0, "default": [ "cloudquery" ] } } }, "PlatformSyncTransformerCreate": { "title": "Sync Transformer definition for creating a new transformer", "description": "Sync Transformer Definition", "type": "object", "required": [ "name", "path", "version", "tables" ], "properties": { "name": { "type": "string", "example": "my-transformer-definition", "description": "Descriptive, unique name for the transformer", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/basic" }, "version": { "type": "string", "description": "Version of the plugin", "example": "v1.2.3" }, "spec": { "type": "object", "additionalProperties": true, "format": "Plugin parameters, specific to each plugin" }, "env": { "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncEnvCreate" } }, "last_update_source": { "$ref": "#/components/schemas/PlatformSyncLastUpdateSource" } } }, "PlatformSyncTransformer": { "allOf": [ { "$ref": "#/components/schemas/PlatformSyncTransformerCreate" }, { "type": "object", "required": [ "name", "display_name", "path", "version", "spec", "env", "created_at", "updated_at", "last_update_source", "draft" ], "properties": { "created_at": { "type": "string", "format": "date-time", "example": "2023-07-14T16:53:42Z", "description": "Time when the transformer was created" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-14T16:53:42Z", "description": "Time when the transformer was last updated" }, "env": { "description": "Environment variables for the plugin.", "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncEnv" } }, "draft": { "type": "boolean", "description": "If a sync transformer is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID." } } } ] }, "PlatformSyncTransformerUpdate": { "title": "Sync Transformer definition for updating a transformer", "description": "Sync Transformer Update Definition", "type": "object", "properties": { "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "last_update_source": { "$ref": "#/components/schemas/PlatformSyncLastUpdateSource" } } }, "PlatformSyncUpgrade": { "title": "Sync version upgrade definition", "description": "Sync Version Upgrade Definition", "type": "object", "required": [ "path", "kind", "prev_version", "new_version", "platform_version", "created_at", "sync_source_destination_names", "sync_source_destination_display_names" ], "properties": { "path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/aws" }, "kind": { "$ref": "#/components/schemas/PlatformPluginKind" }, "prev_version": { "type": "string", "description": "Previous version of the plugin", "example": "v1.2.3" }, "new_version": { "type": "string", "description": "Upgraded version of the plugin", "example": "v1.3.0" }, "platform_version": { "type": "string", "description": "Version of the platform that the upgrade was made on", "example": "v1.1.0" }, "created_at": { "type": "string", "format": "date-time", "example": "2023-07-14T16:53:42Z", "description": "Time when the upgrade record was created" }, "sync_source_destination_names": { "type": "array", "items": { "type": "string" }, "description": "List of sync sources or sync destinations (depending on kind) that were upgraded", "x-go-name": "Names" }, "sync_source_destination_display_names": { "type": "array", "items": { "type": "string" }, "description": "List of sync sources or sync destinations (depending on kind) display names that were upgraded", "x-go-name": "DisplayNames" } } }, "PlatformSyncCreate": { "type": "object", "description": "Managed Sync definition", "required": [ "name", "source", "destinations" ], "properties": { "name": { "type": "string", "description": "Descriptive, unique name for the sync", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "source": { "type": "string", "description": "Unique name of the source", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "destinations": { "type": "array", "items": { "type": "string", "description": "Unique name of the destination", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "minItems": 1 }, "schedule": { "type": "string", "description": "Cron schedule for the sync" }, "disabled": { "type": "boolean", "description": "Whether the sync is disabled", "default": false }, "cpu": { "type": "string", "description": "CPU quota for the sync", "default": "1", "x-go-name": "CPU" }, "memory": { "type": "string", "description": "Memory quota for the sync", "default": "2Gi" } } }, "PlatformSyncUpdate": { "type": "object", "description": "Managed Sync definition", "properties": { "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "source": { "type": "string", "description": "Unique name of the source", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "destinations": { "type": "array", "items": { "type": "string", "description": "Unique name of the destination", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "minItems": 1 }, "schedule": { "type": "string", "description": "Cron schedule for the sync" }, "disabled": { "type": "boolean", "description": "Whether the sync is disabled", "default": false }, "env": { "type": "array", "description": "Environment variables for the sync", "items": { "$ref": "#/components/schemas/PlatformSyncEnv" } }, "cpu": { "type": "string", "description": "CPU quota for the sync", "default": "1", "x-go-name": "CPU" }, "memory": { "type": "string", "description": "Memory quota for the sync", "default": "2Gi" } } }, "PlatformSyncRunID": { "description": "ID of the SyncRun", "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "x-go-name": "SyncRunID" }, "PlatformSyncRunDetails": { "allOf": [ { "$ref": "#/components/schemas/PlatformSyncRun" }, { "type": "object", "required": [ "created_at", "sync_name", "id", "status", "total_rows", "warnings", "errors", "ingested" ], "properties": { "cpu_seconds": { "type": "number", "format": "double", "description": "Total CPU seconds utilized during this sync run", "x-go-name": "CPUSeconds" }, "memory_byte_seconds": { "type": "number", "format": "double", "description": "Total memory byte seconds utilized during this sync run" }, "network_egress_bytes": { "type": "number", "format": "double", "description": "Total network egress bytes during this sync run" } } } ] }, "PlatformSyncRunTableProgress": { "description": "Table-specific progress information for a sync run", "type": "object", "additionalProperties": { "type": "object", "properties": { "errors": { "type": "integer", "format": "int64", "description": "Number of errors for this table" }, "rows": { "type": "integer", "format": "int64", "description": "Number of rows processed for this table" } }, "required": [ "errors", "rows" ] } }, "PlatformSyncRunStats": { "type": "object", "required": [ "started_at", "completed_tables", "resources", "errors", "panics" ], "properties": { "completed_tables": { "type": "integer", "format": "uint64", "description": "Number of tables completed" }, "started_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the table sync was started" }, "last_completed_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the last table was completed" }, "resources": { "type": "integer", "format": "uint64", "description": "Number of total resources fetched" }, "errors": { "type": "integer", "format": "uint64", "description": "Number of total errors encountered" }, "panics": { "type": "integer", "format": "uint64", "description": "Number of total panics encountered" } } }, "PlatformSyncRunTableSortBy": { "title": "TableSortBy", "type": "string", "enum": [ "name", "started_at", "completed_at", "runtime_seconds", "resources", "errors" ] }, "PlatformSyncRunTableStat": { "type": "object", "required": [ "service_name", "name", "started_at" ], "properties": { "service_name": { "type": "string", "description": "Name of the service", "example": "aws" }, "name": { "type": "string", "description": "Name of the table", "example": "aws_ec2_instances" }, "started_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the table sync was started" }, "completed_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the table sync was completed" }, "resources": { "type": "integer", "format": "uint64", "description": "Number of resources fetched" }, "errors": { "type": "integer", "format": "uint64", "description": "Number of errors encountered" }, "panics": { "type": "integer", "format": "uint64", "description": "Number of panics encountered" }, "runtime_seconds": { "type": "integer", "format": "int64", "description": "Number of seconds it took to sync a table" } } }, "PlatformTableListItem": { "additionalProperties": false, "properties": { "name": { "$ref": "#/components/schemas/PlatformTableName" } }, "required": [ "name" ], "title": "TableListItem", "type": "object" }, "PlatformTableDataListItem": { "description": "Sync with its associated tables", "type": "object", "required": [ "source_name", "tables" ], "properties": { "source_name": { "type": "string", "description": "The unique name of the source (source_name from synced_tables)", "example": "aws-integration" }, "display_name": { "type": "string", "description": "Human-readable display name of the source", "example": "AWS Integration" }, "plugin": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/aws" }, "tables": { "type": "array", "items": { "type": "object", "required": [ "name", "deletion_pending" ], "properties": { "name": { "type": "string", "description": "The table name" }, "deletion_pending": { "type": "boolean", "description": "Whether this table's data is marked for deletion" } } }, "description": "List of tables synced by this integration with their deletion status", "example": [ { "name": "aws_ec2_instances", "deletion_pending": false }, { "name": "aws_s3_buckets", "deletion_pending": true } ] } }, "example": { "source_name": "aws-integration", "display_name": "AWS Integration", "plugin": "cloudquery/aws", "tables": [ { "name": "aws_ec2_instances", "deletion_pending": false }, { "name": "aws_s3_buckets", "deletion_pending": false }, { "name": "aws_iam_users", "deletion_pending": true } ] } }, "PlatformTableDataAction": { "description": "Request body for performing actions on table data", "type": "object", "required": [ "action", "sources" ], "properties": { "action": { "type": "string", "enum": [ "delete" ], "description": "The action to perform on the table data" }, "sources": { "type": "object", "description": "Map of source names to arrays of table names", "additionalProperties": { "type": "array", "items": { "type": "string", "description": "Table name to perform action on" } } } }, "example": { "action": "delete", "sources": { "source_name_1": [ "table_1", "table_2" ], "source_name_2": [ "table_3" ] } } }, "PlatformTableRow": { "additionalProperties": true, "title": "TableRow", "type": "object" }, "PlatformTableRowFieldMatch": { "type": "object", "title": "TableRowFieldMatch", "required": [ "key", "value" ], "properties": { "key": { "type": "string" }, "value": { "type": "string" }, "start_index": { "type": "integer", "format": "int64" }, "end_index": { "type": "integer", "format": "int64" } } }, "PlatformTableSchemaColumnKind": { "description": "The kind of the schema column type", "type": "string", "enum": [ "any", "array", "bool", "date", "datetime", "enum", "map", "number", "string", "tuple", "unknown", "uuid" ] }, "PlatformTableSchemaColumn": { "additionalProperties": false, "properties": { "name": { "type": "string", "example": "column_name", "description": "Column name" }, "type": { "type": "string", "example": "Nullable(String)", "description": "Column type" }, "default_kind": { "type": "string", "description": "Expression type (DEFAULT, MATERIALIZED, ALIAS) for the default value, or an empty string if it is not defined.", "example": "DEFAULT" }, "default_expression": { "type": "string", "description": "Expression for the default value, or an empty string if it is not defined." }, "comment": { "type": "string", "description": "Comment on the column, or an empty string if it is not defined." }, "kind": { "$ref": "#/components/schemas/PlatformTableSchemaColumnKind" }, "nullable": { "type": "boolean", "description": "Whether the column is nullable." } }, "required": [ "name", "type", "default_kind", "default_expression", "comment", "kind", "nullable" ], "title": "TableSchemaColumn", "type": "object" }, "PlatformTableSchema": { "items": { "$ref": "#/components/schemas/PlatformTableSchemaColumn" }, "title": "TableSchema", "type": "array" }, "PlatformTableDisplayColumn": { "title": "TableDisplayColumn", "description": "One entry in the resolved per-table column layout for the UI's column picker.\n\nFor primary slots (Cloud / Account / Name / Region / Tags) the `id` is a\nstable slot identifier and `resolved_column` is the physical column the\nslot points to for this table. The slot id may differ from the resolved\ncolumn — e.g. for a table that has a resource-specific `name` column the\nName slot will resolve to `name`; for a table that has only `_cq_name` the\nName slot resolves to `_cq_name`. Either way the slot id is always `name`.\n\nFor details columns (the resource-specific columns rendered below the fold)\n`id` and `resolved_column` are equal — there is no aliasing.\n\nThe `/tables/{table_name}/data` and `/tables/{table_name}/columns/{column_name}/values`\nendpoints accept either the slot id or the resolved column name in\n`select`, `sort_by`, `filter` and the column path; the API rewrites slot\nids to physical columns server-side.", "type": "object", "required": [ "id", "label", "resolved_column", "group" ], "properties": { "id": { "type": "string", "description": "Stable identifier for this slot or column. Use this in URLs (e.g.\n`?select=name`) — the API resolves slot ids to physical columns." }, "label": { "type": "string", "description": "Human-readable label for the column picker." }, "resolved_column": { "type": "string", "description": "Physical column name in the warehouse for this slot. May equal `id`\n(details columns), or differ (primary slots that aliased to a\nresource-specific column or fell back to `_cq_*`)." }, "group": { "type": "string", "enum": [ "primary", "details" ], "description": "`primary` columns are rendered above the fold (the canonical Cloud /\nAccount / Name / Region / Tags layout). `details` columns are\nrendered below in schema order." } } }, "PlatformRelationColumnDef": { "type": "object", "required": [ "field", "label" ], "properties": { "field": { "type": "string", "description": "Column field name in the query result." }, "label": { "type": "string", "description": "Display label for the column." }, "type": { "type": "string", "description": "Column render type (e.g. text, tags, boolean, json, code)." }, "hidden": { "type": "boolean", "description": "Whether the column is present for navigation but not displayed." } } }, "PlatformRelationDef": { "type": "object", "required": [ "title", "resource_type", "columns", "sql_query" ], "properties": { "title": { "type": "string", "description": "Display title for the relation tab/section." }, "resource_type": { "type": "string", "description": "Target CloudQuery table name." }, "columns": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRelationColumnDef" }, "description": "Column definitions for the relation view." }, "sql_query": { "type": "string", "description": "ClickHouse SQL template with {{field_name}} placeholders." } } }, "PlatformRelatedResourcesRequest": { "type": "object", "description": "Inputs for executing the curated relation queries defined for a source\ntable against a specific resource row. Either `platform_id` or `fields`\nmust be supplied; if both are present, `fields` wins.\n", "properties": { "platform_id": { "type": "string", "description": "`_cq_platform_id` of the source row. When set (and `fields` is absent),\nthe server fetches the row from the source table and uses its column\nvalues to substitute the relation templates.\n" }, "fields": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Pre-extracted field values keyed by column name. Used to substitute\n`{{field_name}}` placeholders in the relation SQL templates.\n" } } }, "PlatformRelatedResourcesGroup": { "type": "object", "description": "Result for one curated relation defined on the source table — the\nrelation's metadata plus the rows returned by executing its substituted\nSQL template against the warehouse. `error` is set in place of `data`\nwhen the substituted query failed (e.g. unresolved placeholder, missing\nreferenced table).\n", "required": [ "title", "resource_type", "sql_query", "columns" ], "properties": { "title": { "type": "string", "description": "Display title for the relation." }, "resource_type": { "type": "string", "description": "Target CloudQuery table name." }, "sql_query": { "type": "string", "description": "The substituted ClickHouse SQL that was executed." }, "columns": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRelationColumnDef" }, "description": "Column definitions for the relation view." }, "data": { "$ref": "#/components/schemas/PlatformTableData" }, "error": { "type": "string", "description": "Populated when the relation query failed to execute." } } }, "PlatformRelatedResourcesResponse": { "type": "object", "description": "Curated relation results for a source row, grouped by relation title.\n", "required": [ "table_name", "relations" ], "properties": { "table_name": { "type": "string", "description": "The source table the relations are defined for." }, "relations": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRelatedResourcesGroup" } } } }, "PlatformBatchTableSchemaItem": { "title": "BatchTableSchemaItem", "type": "object", "required": [ "table_name", "schema", "default_columns", "display_columns" ], "properties": { "table_name": { "type": "string", "description": "Table name" }, "schema": { "$ref": "#/components/schemas/PlatformTableSchema" }, "default_columns": { "type": "array", "items": { "type": "string", "description": "Column name" } }, "display_columns": { "type": "array", "description": "Resolved per-table column layout for the UI's column picker. See\nTableDisplayColumn for the slot resolution model.", "items": { "$ref": "#/components/schemas/PlatformTableDisplayColumn" } } } }, "PlatformTableColumnName": { "description": "The name of the table column.", "type": "string", "example": "region" }, "PlatformTableColumnListItem": { "additionalProperties": false, "properties": { "name": { "$ref": "#/components/schemas/PlatformTableColumnName" }, "kind": { "$ref": "#/components/schemas/PlatformTableSchemaColumnKind" }, "nullable": { "type": "boolean", "description": "Whether the column is nullable." } }, "required": [ "name", "kind", "nullable" ], "title": "TableColumnListItem", "type": "object" }, "PlatformTableColumnValueListItem": { "additionalProperties": false, "properties": { "value": { "type": "string" }, "kind": { "$ref": "#/components/schemas/PlatformTableSchemaColumnKind" } }, "required": [ "name", "kind" ], "title": "TableColumnValueListItem", "type": "object" }, "PlatformTableColumnGroupedItem": { "additionalProperties": false, "properties": { "value": { "type": "string", "description": "The distinct value of the grouped column." }, "kind": { "$ref": "#/components/schemas/PlatformTableSchemaColumnKind" }, "count": { "type": "integer", "format": "int64", "description": "Exact number of rows in the group." } }, "required": [ "value", "kind", "count" ], "title": "TableColumnGroupedItem", "type": "object" }, "PlatformUsageSummaryGroup": { "title": "CloudQuery Usage Summary Group", "description": "A usage summary group.", "type": "object", "required": [ "name", "value" ], "properties": { "name": { "type": "string", "description": "The name of the group.", "example": "plugin" }, "value": { "type": "string", "description": "The value of the group at this index.", "example": "cloudquery/source/aws" } } }, "PlatformUsageSummaryValue": { "title": "CloudQuery Usage Summary Value", "description": "A usage summary value.", "type": "object", "required": [ "timestamp" ], "properties": { "timestamp": { "type": "string", "format": "date-time", "description": "The timestamp marking the start of a period." }, "paid_rows": { "type": "array", "items": { "type": "integer", "format": "int64" }, "description": "The paid rows that were synced in this period, one per group." }, "cloud_vcpu_seconds": { "type": "array", "items": { "type": "integer", "format": "int64" }, "description": "vCPU/seconds consumed in this period, one per group." }, "cloud_vram_byte_seconds": { "type": "array", "items": { "type": "integer", "format": "int64" }, "description": "vRAM/byte-seconds consumed in this period, one per group." }, "cloud_egress_bytes": { "type": "array", "items": { "type": "integer", "format": "int64" }, "description": "Egress bytes consumed in this period, one per group." } } }, "PlatformUsageSummary": { "title": "CloudQuery Usage Summary", "description": "A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range.\nNote that empty or all-zero values are not included in the response.\n", "type": "object", "additionalProperties": false, "required": [ "groups", "values", "metadata" ], "properties": { "groups": { "type": "array", "description": "The groups of the usage summary. Every group will have a corresponding value at the same index in the values array.", "items": { "$ref": "#/components/schemas/PlatformUsageSummaryGroup" }, "example": [ { "name": "plugin", "value": "cloudquery/source/aws" }, { "name": "plugin", "value": "cloudquery/source/gcp" } ] }, "values": { "items": { "$ref": "#/components/schemas/PlatformUsageSummaryValue" }, "type": "array", "example": [ { "timestamp": "2021-01-01T00:00:00Z", "paid_rows": [ 100, 200 ] }, { "timestamp": "2021-01-02T00:00:00Z", "paid_rows": [ 150, 300 ] } ] }, "metadata": { "type": "object", "description": "Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details.", "required": [ "start", "end", "aggregation_period", "metrics" ], "additionalProperties": false, "properties": { "start": { "type": "string", "format": "date-time", "description": "The inclusive start of the query time range." }, "end": { "type": "string", "format": "date-time", "description": "The exclusive end of the query time range." }, "aggregation_period": { "type": "string", "description": "The aggregation period to sum data over. In other words, data will be returned at this granularity.", "enum": [ "day", "month" ] }, "metrics": { "type": "array", "description": "List of metrics included in the response.", "items": { "type": "string", "enum": [ "paid_rows", "cloud_egress_bytes", "cloud_vcpu_seconds", "cloud_vram_byte_seconds" ] }, "default": [ "paid_rows" ] } } } } }, "PlatformSAMLConfig": { "title": "SAML Configuration", "type": "object", "additionalProperties": false, "required": [ "platform_metadata_download_url", "platform_certificate_download_url", "platform_sso_url", "platform_entity_id", "enabled", "can_enable" ], "properties": { "platform_sso_url": { "type": "string", "description": "SAML service URL.", "format": "url", "x-go-name": "PlatformSSOURL" }, "platform_entity_id": { "type": "string", "description": "SAML Entity ID.", "x-go-name": "PlatformEntityID" }, "platform_metadata_download_url": { "type": "string", "description": "URL to download platform metadata.", "format": "url", "x-go-name": "PlatformMetadataDownloadURL" }, "platform_certificate_download_url": { "type": "string", "description": "Platform Certificate download URL", "format": "url", "x-go-name": "PlatformCertificateDownloadURL" }, "metadata_url": { "type": "string", "description": "Metadata URL from identity provider. Mutually exclusive with `metadata_xml`", "format": "url", "x-go-name": "MetadataURL" }, "metadata_xml": { "type": "string", "description": "Metadata file contents from identity provider. Mutually exclusive with `metadata_url`", "format": "url", "x-go-name": "MetadataXML" }, "logout_url": { "type": "string", "description": "Logout URL from identity provider", "format": "url", "x-go-name": "LogoutURL" }, "role_group_key": { "type": "string", "description": "Role group key name", "example": "groups" }, "role_mappings": { "type": "object", "description": "Mapping from IdP group names to roles. Each key is a potential IdP group value for the specified role_group_key, and each value is an array of roles to assign to users in that group.", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRole" } }, "x-go-type-skip-optional-pointer": true }, "default_roles": { "type": "array", "description": "Default roles for new users who are not in any group", "items": { "$ref": "#/components/schemas/PlatformRole" }, "x-go-type-skip-optional-pointer": true, "x-omitempty": false }, "disable_access_if_no_role_group": { "type": "boolean", "description": "Whether to disable access if no role group is found in the SAML assertion. If true, users without a role group will not be able to log in." }, "enabled": { "type": "boolean", "description": "Whether SAML is enabled" }, "can_enable": { "type": "boolean", "description": "Whether SAML can be enabled" }, "certificate_fingerprint": { "type": "string", "description": "Fingerprint of the current SAML certificate" }, "certificate_expires_at": { "type": "string", "format": "date-time", "description": "Expiration time of the current SAML certificate" }, "rollover_certificate_fingerprint": { "type": "string", "description": "Fingerprint of the SAML certificate that will be used after rollover" }, "rollover_certificate_expires_at": { "type": "string", "format": "date-time", "description": "Expiration time of the SAML certificate that will be used after rollover" } } }, "PlatformSAMLConfigUpdate": { "title": "SAML Configuration Update", "type": "object", "additionalProperties": false, "properties": { "metadata_url": { "type": "string", "description": "Metadata URL from identity provider. Mutually exclusive with `metadata_xml`", "format": "url", "x-go-name": "MetadataURL" }, "metadata_xml": { "type": "string", "description": "Metadata file contents from identity provider. Mutually exclusive with `metadata_url`", "format": "url", "x-go-name": "MetadataXML" }, "logout_url": { "type": "string", "description": "Logout URL from identity provider", "format": "url", "x-go-name": "LogoutURL" }, "role_group_key": { "type": "string", "description": "Role group key name" }, "role_mappings": { "type": "object", "description": "Mapping from IdP group names to roles. Each key is a potential IdP group value for the specified role_group_key, and each value is an array of roles to assign to users in that group.", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRoleID" } } }, "default_roles": { "type": "array", "description": "Default roles for new users who are not in any group", "items": { "$ref": "#/components/schemas/PlatformRoleID" } }, "disable_access_if_no_role_group": { "type": "boolean", "description": "Whether to disable access if no role group is found in the SAML assertion. If true, users without a role group will not be able to log in." }, "enabled": { "type": "boolean", "description": "Whether to enable or disable SAML" } } }, "PlatformSettings": { "type": "object", "description": "Platform settings definition", "required": [ "enforce_mfa", "ai_agent_data_access" ], "properties": { "enforce_mfa": { "type": "boolean", "description": "Whether or not to require MFA for all users", "default": false }, "ai_agent_data_access": { "type": "boolean", "description": "Whether AI agents can execute queries against the data warehouse. When false, agents can only explore schemas and generate queries for the user to run manually.", "default": false } } }, "PlatformSettingsUpdate": { "type": "object", "description": "Platform settings partial update", "properties": { "enforce_mfa": { "type": "boolean", "description": "Whether or not to require MFA for all users", "default": false }, "ai_agent_data_access": { "type": "boolean", "description": "Whether AI agents can execute queries against the data warehouse. When false, agents can only explore schemas and generate queries for the user to run manually.", "default": false } } }, "PlatformDataSettings": { "type": "object", "description": "Platform data settings definition", "required": [ "ownership_tags" ], "properties": { "ownership_tags": { "type": "array", "description": "List of tag names for asset ownership", "items": { "type": "string" }, "default": [] } } }, "PlatformDataSettingsUpdate": { "type": "object", "description": "Platform data settings partial update", "properties": { "ownership_tags": { "type": "array", "description": "List of tag names for asset ownership", "items": { "type": "string" } } } }, "PlatformCreateSyncDestinationTestConnectionV2": { "title": "Sync Destination Test Connection creation definition", "type": "object", "required": [ "path" ], "properties": { "path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/postgresql" }, "destination_name": { "type": "string", "description": "Name of an existing destination" }, "version": { "type": "string", "description": "Version of the plugin", "example": "v1.2.3" }, "write_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationWriteMode" }, "migrate_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationMigrateMode" }, "sync_group_id": { "type": "string", "x-go-name": "SyncGroupID" }, "spec": { "type": "object", "additionalProperties": true, "format": "Plugin parameters, specific to each plugin" }, "env": { "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", "type": "array", "items": { "$ref": "#/components/schemas/PlatformSyncEnvCreate" } } } }, "PlatformSyncDestinationTestConnectionV2": { "type": "object", "required": [ "id", "created_at", "status" ], "properties": { "id": { "$ref": "#/components/schemas/PlatformSyncTestConnectionID", "x-go-name": "ID" }, "status": { "$ref": "#/components/schemas/PlatformSyncTestConnectionStatus", "description": "Status of the sync test connection" }, "failure_reason": { "type": "string", "description": "Reason for failure", "example": "password authentication failed for user \"exampleuser\"" }, "failure_code": { "example": "INVALID_CREDENTIALS", "type": "string", "description": "Code for failure" }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the test connection was created" }, "completed_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", "description": "Time the test connection was completed" }, "plugin_path": { "$ref": "#/components/schemas/PlatformSyncPluginPath", "example": "cloudquery/postgresql" }, "plugin_version": { "$ref": "#/components/schemas/PlatformVersionName", "description": "Version of the plugin" }, "sync_group_id": { "type": "string", "x-go-name": "SyncGroupID" } } }, "PlatformCreateSyncDestinationV2": { "title": "Sync Destination definition for creating a new source", "description": "Sync Destination Definition", "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "example": "my-destination-definition", "description": "Descriptive, unique name for the destination", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" }, "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "write_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationWriteMode" }, "migrate_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationMigrateMode" }, "send_sync_summary": { "type": "boolean" }, "last_update_source": { "$ref": "#/components/schemas/PlatformSyncLastUpdateSource" }, "overwrite_destination": { "type": "boolean", "description": "Set this to allow overwriting an existing sync destination. Defaults to true to preserve compatibility." }, "sync_destination_test_connection_id": { "$ref": "#/components/schemas/PlatformSyncDestinationTestConnectionID" } } }, "PlatformSyncDestinationUpdateV2": { "title": "Sync Destination definition for updating a destination", "description": "Sync Destination Update Definition", "type": "object", "properties": { "display_name": { "$ref": "#/components/schemas/PlatformDisplayName" }, "write_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationWriteModeUpdate" }, "migrate_mode": { "$ref": "#/components/schemas/PlatformSyncDestinationMigrateModeUpdate" }, "send_sync_summary": { "type": "boolean" }, "last_update_source": { "$ref": "#/components/schemas/PlatformSyncLastUpdateSource" }, "disabled": { "type": "boolean", "description": "Whether the sync destination is disabled" }, "transformers": { "type": "array", "items": { "type": "string", "description": "Unique name of the transformer", "pattern": "^[a-zA-Z0-9_-]+$", "x-pattern-message": "can contain only alphanumerical characters, dashes, and underscores" } } } }, "PlatformRBACPermissionSortBy": { "title": "RBACPermissionSortBy", "type": "string", "enum": [ "id", "name", "description", "created_by", "created_at", "updated_at" ] }, "PlatformRBACPermissionSortDirection": { "title": "RBACPermissionSortDirection", "type": "string", "enum": [ "asc", "desc" ], "default": "asc" }, "PlatformRBACPermissionCreate": { "type": "object", "required": [ "name", "description", "query" ], "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "query": { "type": "string" }, "dry_run": { "type": "boolean", "default": false } } }, "PlatformRBACPermissionUpdate": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "query": { "type": "string" } } }, "PlatformRBACRoleSortBy": { "title": "RBACRoleSortBy", "type": "string", "enum": [ "id", "name", "description", "created_by", "created_at", "updated_at" ] }, "PlatformRBACRoleSortDirection": { "title": "RBACRoleSortDirection", "type": "string", "enum": [ "asc", "desc" ], "default": "asc" }, "PlatformRBACRoleCreate": { "type": "object", "required": [ "name", "permissions" ], "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRBACPermissionID" } } } }, "PlatformRBACRoleUpdate": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformRBACPermissionID" } } } }, "PlatformTeam": { "additionalProperties": false, "description": "CloudQuery Team", "properties": { "name": { "$ref": "#/components/schemas/PlatformTeamName" } }, "required": [ "name" ], "title": "Team", "type": "object" } }, "responses": { "PlatformRequiresAuthentication": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformBasicError" } } }, "description": "Requires authentication" }, "PlatformForbidden": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFieldError" } } }, "description": "Forbidden" }, "PlatformInternalError": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformBasicError" } } }, "description": "Internal Error" }, "PlatformNotFound": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformBasicError" } } }, "description": "Resource not found" }, "PlatformBadRequest": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFieldError" } } }, "description": "Bad request" }, "PlatformServiceUnavailable": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformBasicError" } } }, "description": "Service unavailable" }, "PlatformTooManyRequests": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformBasicError" } } }, "description": "Too Many Requests" }, "PlatformUnprocessableEntity": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFieldError" } } }, "description": "UnprocessableEntity" }, "PlatformConflict": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformFieldError" } } }, "description": "Conflict" }, "PlatformMethodNotAllowed": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformBasicError" } } }, "description": "Method not allowed" } } } }