{"openapi":"3.1.0","info":{"title":"RawTree API","description":"Simplified analytics API for AI agents. Store JSON data and query with SQL.","license":{"name":""},"version":"0.1.0"},"paths":{"/health":{"get":{"tags":["Health"],"summary":"Check regional database readiness","operationId":"health","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"503":{"description":"The regional database is unavailable"}}}},"/v1/apps":{"get":{"tags":["Apps"],"summary":"List available apps and their installation state for a cluster","operationId":"list_apps","parameters":[{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","description":"Cluster name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAppsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/apps/datahub/configuration":{"get":{"tags":["Apps"],"operationId":"get","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"put":{"tags":["Apps"],"operationId":"configure","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigureRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/apps/datahub/pause":{"post":{"tags":["Apps"],"operationId":"pause","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/apps/datahub/preview":{"post":{"tags":["Apps"],"operationId":"preview","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/apps/datahub/sync":{"post":{"tags":["Apps"],"operationId":"sync_now","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/apps/datahub/test-connection":{"post":{"tags":["Apps"],"operationId":"test_connection","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigureRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/apps/splunk/searches":{"get":{"tags":["Apps"],"summary":"List saved Splunk searches for a cluster","operationId":"list_saved_searches","parameters":[{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","description":"Cluster name","required":true,"schema":{"type":"string"}},{"name":"search","in":"query","description":"Literal name or description text","required":false,"schema":{"type":"string"}},{"name":"created_by","in":"query","description":"Exact creator email or user ID","required":false,"schema":{"type":"string"}},{"name":"database","in":"query","description":"Exact database name","required":false,"schema":{"type":"string"}},{"name":"visibility","in":"query","description":"Exact visibility","required":false,"schema":{"$ref":"#/components/schemas/SavedSearchVisibility"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSavedSearchesResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Apps"],"summary":"Create a saved Splunk search","operationId":"create_saved_search","parameters":[{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","description":"Cluster name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSavedSearchRequest"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/apps/splunk/searches/{search_id}":{"get":{"tags":["Apps"],"summary":"Get a saved Splunk search","operationId":"get_saved_search","parameters":[{"name":"search_id","in":"path","description":"Saved search ID","required":true,"schema":{"type":"string"}},{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","description":"Cluster name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"delete":{"tags":["Apps"],"summary":"Delete a saved Splunk search","operationId":"delete_saved_search","parameters":[{"name":"search_id","in":"path","description":"Saved search ID","required":true,"schema":{"type":"string"}},{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","description":"Cluster name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSavedSearchResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"patch":{"tags":["Apps"],"summary":"Update a saved Splunk search","operationId":"update_saved_search","parameters":[{"name":"search_id","in":"path","description":"Saved search ID","required":true,"schema":{"type":"string"}},{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","description":"Cluster name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSavedSearchRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/apps/splunk/snapshots":{"get":{"tags":["Apps"],"summary":"List private and shared snapshots without loading result payloads","operationId":"list_snapshots","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"search_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSnapshotsResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Apps"],"summary":"Preserve a completed SPL result, inheriting the source visibility","operationId":"create_snapshot","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSnapshotRequest"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotSummary"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/apps/splunk/snapshots/{snapshot_id}":{"get":{"tags":["Apps"],"summary":"Load a snapshot without executing its query","operationId":"get_snapshot","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"delete":{"tags":["Apps"],"summary":"Delete an accessible private or shared snapshot","operationId":"delete_snapshot","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"patch":{"tags":["Apps"],"summary":"Change snapshot visibility without modifying captured data","operationId":"update_snapshot","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSnapshotRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotSummary"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/apps/{app_id}":{"put":{"tags":["Apps"],"summary":"Install an app into a cluster","operationId":"install_app","parameters":[{"name":"app_id","in":"path","description":"App ID","required":true,"schema":{"$ref":"#/components/schemas/AppId"}},{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","description":"Cluster name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppItem"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"delete":{"tags":["Apps"],"summary":"Uninstall an app from a cluster","operationId":"uninstall_app","parameters":[{"name":"app_id","in":"path","description":"App ID","required":true,"schema":{"$ref":"#/components/schemas/AppId"}},{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","description":"Cluster name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppItem"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/clusters":{"get":{"tags":["Clusters"],"summary":"List permanent clusters and their current status","description":"User credentials list clusters in the selected organization. API keys receive the same details for their bound cluster.","operationId":"list_clusters","parameters":[{"name":"organization","in":"query","description":"Organization name; required for users, optional for API keys","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListClustersResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Clusters"],"summary":"Create a permanent cluster","description":"If the response is ambiguous, reconcile by listing clusters before retrying.","operationId":"create_cluster","parameters":[{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClusterRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterItem"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/clusters/sizes":{"get":{"tags":["Clusters"],"summary":"List cluster sizes and replica limits","operationId":"list_cluster_sizes","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterSizesResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/clusters/verify-s3-access":{"post":{"tags":["Clusters"],"summary":"Verify customer-owned S3 access for cluster creation","operationId":"verify_s3_access","parameters":[{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyS3AccessRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3AccessVerification"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/clusters/{cluster_id}":{"get":{"tags":["Clusters"],"summary":"Get a permanent cluster and its current status","operationId":"get_cluster","parameters":[{"name":"cluster_id","in":"path","description":"Cluster ID","required":true,"schema":{"type":"string"}},{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterItem"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"delete":{"tags":["Clusters"],"summary":"Permanently delete a cluster","operationId":"delete_cluster","parameters":[{"name":"cluster_id","in":"path","description":"Cluster ID","required":true,"schema":{"type":"string"}},{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteClusterResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"patch":{"tags":["Clusters"],"summary":"Update cluster settings","operationId":"update_cluster","parameters":[{"name":"cluster_id","in":"path","description":"Cluster ID","required":true,"schema":{"type":"string"}},{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClusterRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterItem"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/clusters/{cluster_id}/resume":{"post":{"tags":["Clusters"],"summary":"Resume a cluster","operationId":"resume_cluster","parameters":[{"name":"cluster_id","in":"path","description":"Cluster ID","required":true,"schema":{"type":"string"}},{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterItem"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/clusters/{cluster_id}/stop":{"post":{"tags":["Clusters"],"summary":"Stop a cluster","operationId":"stop_cluster","parameters":[{"name":"cluster_id","in":"path","description":"Cluster ID","required":true,"schema":{"type":"string"}},{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterItem"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/connectors":{"get":{"tags":["Connectors"],"operationId":"list_connectors","parameters":[{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","description":"Cluster name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListConnectorsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Connectors"],"operationId":"create_connector","parameters":[{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","description":"Cluster name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectorRequest"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorItem"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/connectors/{connector_id}":{"get":{"tags":["Connectors"],"operationId":"get_connector","parameters":[{"name":"connector_id","in":"path","description":"Connector ID","required":true,"schema":{"type":"string"}},{"name":"organization","in":"query","description":"Organization name","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","description":"Cluster name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorItem"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"delete":{"tags":["Connectors"],"operationId":"delete_connector","parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteConnectorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"patch":{"tags":["Connectors"],"operationId":"update_connector","parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnectorRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorItem"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/databases":{"get":{"tags":["Databases"],"summary":"List databases in an organization","operationId":"list_databases","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDatabasesResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Databases"],"summary":"Create a database in an organization","operationId":"create_database","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatabaseRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatabaseResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/databases/verify-s3-access":{"post":{"tags":["Databases"],"summary":"Verify customer-owned S3 access for a database","operationId":"verify_database_s3_access","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatabaseRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3AccessVerification"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/databases/{database}":{"delete":{"tags":["Databases"],"summary":"Delete a database from an organization","operationId":"delete_database","parameters":[{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDatabaseResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/federation-rules":{"get":{"tags":["Federation rules"],"summary":"List stored rules. Requires a organization administrator using a user session or OAuth.","operationId":"list","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkloadFederationRule"}}}}},"400":{"description":"Invalid configuration"},"401":{"description":"User session or OAuth required"},"403":{"description":"Organization administrator required"},"404":{"description":"Rule not found"},"409":{"description":"Name already exists"}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Federation rules"],"summary":"Store a rule configuration. Does not fetch keys or enable authentication.","operationId":"create","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleConfiguration"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadFederationRule"}}}},"400":{"description":"Invalid configuration"},"401":{"description":"User session or OAuth required"},"403":{"description":"Organization administrator required"},"404":{"description":"Rule not found"},"409":{"description":"Name already exists"}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/federation-rules/{id}":{"get":{"tags":["Federation rules"],"summary":"Get a stored rule configuration.","operationId":"get","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadFederationRule"}}}},"400":{"description":"Invalid configuration"},"401":{"description":"User session or OAuth required"},"403":{"description":"Organization administrator required"},"404":{"description":"Rule not found"},"409":{"description":"Name already exists"}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"put":{"tags":["Federation rules"],"summary":"Replace the complete configuration. Omitted optional fields are cleared.","operationId":"replace","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleConfiguration"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadFederationRule"}}}},"400":{"description":"Invalid configuration"},"401":{"description":"User session or OAuth required"},"403":{"description":"Organization administrator required"},"404":{"description":"Rule not found"},"409":{"description":"Name already exists"}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"delete":{"tags":["Federation rules"],"summary":"Delete a stored rule configuration.","operationId":"delete","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"default":null}}}},"400":{"description":"Invalid configuration"},"401":{"description":"User session or OAuth required"},"403":{"description":"Organization administrator required"},"404":{"description":"Rule not found"},"409":{"description":"Name already exists"}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/feedback":{"post":{"tags":["Feedback"],"summary":"Submit feedback","description":"Submit feedback with optional organization and cluster UUIDs. Users may submit before creating an organization. Supplied scopes must be accessible to the caller; a cluster alone determines its organization. Extra accepts arbitrary JSON fields. The request body is limited to 32 KiB. Success confirms storage in RawTree's internal feedback table.","operationId":"submit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedback"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackReceipt"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/handlers":{"get":{"tags":["Data"],"summary":"List handlers in the selected cluster","operationId":"list","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandlersResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Data"],"summary":"Create a GET handler across the selected cluster","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandlerDefinition"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandlerDefinition"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/handlers/{path}":{"get":{"tags":["Data"],"operationId":"invoke","parameters":[{"name":"path","in":"path","description":"Native handler path, appended after /v1/handlers","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Handler query results in its configured format"},"400":{"description":"Platform validation error or native database error"},"401":{"description":"Platform authentication error or native database error"},"403":{"description":"Platform permission error or native database error"},"404":{"description":"Native database error or missing handler"},"429":{"description":"Platform query rate limit or native database error"},"500":{"description":"Native database error; body uses the database output format"}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/keys":{"get":{"tags":["API Keys"],"summary":"List all API keys for a cluster","operationId":"list_api_keys","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApiKeysResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["API Keys"],"summary":"Create a new API key for a cluster","description":"principal_type and principal_id must be supplied together. User-authenticated requests default to the current user; only that user or an organization service account may be selected. Service-account assignment requires organization admin access. Admin API-key callers inherit their existing principal and cannot select another. Provide exactly one of permission or database_roles. Legacy permission keys are unchanged. Custom keys require administrator access and existing roles on this cluster; they support query execution, cancellation, and inserts into existing tables. Database roles do not grant RawTree management permissions.","operationId":"create_api_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/keys/{id_or_token}":{"delete":{"tags":["API Keys"],"summary":"Permanently delete an API key (cannot be undone)","description":"Permanently revokes and deletes the specified API key. This action cannot be undone. Any key can be deleted, including the last admin key. The `{id_or_token}` path segment accepts either a key UUID (`id`) or the full API key token (`token`, for example `rt_...`).","operationId":"delete_api_key","parameters":[{"name":"id_or_token","in":"path","description":"Either `id` (UUID) or `token` (full `rt_...` token).","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteApiKeyResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/logs":{"get":{"tags":["Data"],"summary":"List platform API request logs","operationId":"list_logs","parameters":[{"name":"search","in":"query","description":"Free-text search across log ID, method, path, status, source, user agent, and errors.","required":false,"schema":{"type":"string"}},{"name":"methods","in":"query","description":"Comma-separated HTTP methods, for example `GET,POST`.","required":false,"schema":{"type":"string"}},{"name":"status_codes","in":"query","description":"Comma-separated HTTP status codes, for example `200,404,500`.","required":false,"schema":{"type":"string"}},{"name":"levels","in":"query","description":"Comma-separated request levels: `success`, `warning`, or `error`.","required":false,"schema":{"type":"string"}},{"name":"sources","in":"query","description":"Comma-separated request sources: `ui`, `cli`, or `api`.","required":false,"schema":{"type":"string"}},{"name":"user_agent","in":"query","description":"Exact user-agent value.","required":false,"schema":{"type":"string"}},{"name":"host","in":"query","description":"Case-insensitive substring of the request host.","required":false,"schema":{"type":"string"}},{"name":"paths","in":"query","description":"Comma-separated exact request paths.","required":false,"schema":{"type":"string"}},{"name":"min_duration_ms","in":"query","description":"Minimum request duration in milliseconds.","required":false,"schema":{"type":"integer","format":"int64","minimum":0}},{"name":"max_duration_ms","in":"query","description":"Maximum request duration in milliseconds.","required":false,"schema":{"type":"integer","format":"int64","minimum":0}},{"name":"start_time","in":"query","description":"Inclusive lower bound using a RawTree-compatible datetime string.","required":false,"schema":{"type":"string"}},{"name":"end_time","in":"query","description":"Inclusive upper bound using a RawTree-compatible datetime string.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of rows to return (default 50, max 200).","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"offset","in":"query","description":"Number of rows to skip (default 0).","required":false,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"oauth2":["full_access"]}]}},"/v1/metrics":{"get":{"tags":["Metrics"],"summary":"Read stored metric rows with mandatory tenant authorization and exact field filters.","operationId":"list_metrics","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"organization","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"cluster","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"cluster_id","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"filters","in":"query","description":"JSON object of exact-match dotted field paths and string values.","required":false,"schema":{"type":["string","null"]}},{"name":"metric","in":"query","description":"Comma-separated metric names; required for aggregation. Raw reads may omit it.","required":false,"schema":{"type":["string","null"]}},{"name":"aggregation","in":"query","description":"Numeric reduction within each time bucket and group.","required":false,"schema":{"oneOf":[{"type":"null"},{"type":"string","enum":["avg","min","max","sum","count"]}]}},{"name":"function","in":"query","description":"Reset-aware per-series operation, applied before aggregation.","required":false,"schema":{"oneOf":[{"type":"null"},{"type":"string","enum":["increase","rate"]}]}},{"name":"granularity_seconds","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"group_by","in":"query","description":"Additional dimensions; tenant and collector dimensions are always retained.","required":false,"schema":{"type":["string","null"]}},{"name":"start_time","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"end_time","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"window_seconds","in":"query","description":"Trailing interval resolved against server UTC; excludes explicit timestamps.","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/organizations":{"get":{"tags":["Organizations"],"summary":"List accessible organizations","description":"Returns organization details for user memberships or the API key bound organization. The membership role is null for API keys.","operationId":"list_organizations","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOrganizationsResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/organizations/{organization_id}/federation-issuers":{"get":{"tags":["Federation issuers"],"summary":"List stored issuers. Requires a organization administrator using a user session or OAuth.","operationId":"list","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkloadFederationIssuer"}}}}},"400":{"description":"Invalid configuration"},"401":{"description":"User session or OAuth required"},"403":{"description":"Organization administrator required"},"404":{"description":"Issuer not found"},"409":{"description":"Name already exists"}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Federation issuers"],"summary":"Store an issuer configuration. Does not fetch keys or enable authentication.","operationId":"create","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuerConfiguration"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadFederationIssuer"}}}},"400":{"description":"Invalid configuration"},"401":{"description":"User session or OAuth required"},"403":{"description":"Organization administrator required"},"404":{"description":"Issuer not found"},"409":{"description":"Name already exists"}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/organizations/{organization_id}/federation-issuers/{id}":{"get":{"tags":["Federation issuers"],"summary":"Get a stored issuer configuration.","operationId":"get","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadFederationIssuer"}}}},"400":{"description":"Invalid configuration"},"401":{"description":"User session or OAuth required"},"403":{"description":"Organization administrator required"},"404":{"description":"Issuer not found"},"409":{"description":"Name already exists"}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"put":{"tags":["Federation issuers"],"summary":"Replace the complete configuration. Omitted optional fields are cleared; jwks_source defaults to discovery.","operationId":"replace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuerConfiguration"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadFederationIssuer"}}}},"400":{"description":"Invalid configuration"},"401":{"description":"User session or OAuth required"},"403":{"description":"Organization administrator required"},"404":{"description":"Issuer not found"},"409":{"description":"Name already exists"}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"delete":{"tags":["Federation issuers"],"summary":"Delete a stored issuer configuration.","operationId":"delete","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"default":null}}}},"400":{"description":"Invalid configuration"},"401":{"description":"User session or OAuth required"},"403":{"description":"Organization administrator required"},"404":{"description":"Issuer not found"},"409":{"description":"Name already exists"}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/organizations/{organization_id}/service-accounts":{"get":{"tags":["Service accounts"],"summary":"List service accounts. Requires an organization administrator.","operationId":"list","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServiceAccount"}}}}},"401":{"description":"User session or OAuth access token required"},"403":{"description":"Organization administrator required"}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Service accounts"],"summary":"Create a service account. The name cannot be changed after creation.","operationId":"create","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServiceAccount"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAccount"}}}},"401":{"description":"User session or OAuth access token required"},"403":{"description":"Organization administrator required"}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/organizations/{organization_id}/service-accounts/{id}":{"delete":{"tags":["Service accounts"],"summary":"Delete a service account from this organization.","operationId":"delete","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Service account deleted"},"401":{"description":"First-party session required"},"403":{"description":"Organization administrator required"}},"security":[{"bearerAuth":[]}]}},"/v1/query":{"post":{"tags":["Data"],"summary":"Execute SQL query and return results in the requested ClickHouse format","description":"Accepts read-only queries, `ALTER TABLE [database.]<table> MODIFY ORDER BY (...)` to change a table sorting key, `ALTER TABLE [database.]<table> ADD PROJECTION [IF NOT EXISTS] <name> (SELECT ...)`, `MATERIALIZE PROJECTION [IF EXISTS] <name>`, `CLEAR PROJECTION [IF EXISTS] <name>`, and `DROP PROJECTION [IF EXISTS] <name>` to manage projections, `ADD INDEX [IF NOT EXISTS] <name> <expression> TYPE <type> [GRANULARITY <n>]`, `MATERIALIZE INDEX [IF EXISTS] <name>`, `CLEAR INDEX [IF EXISTS] <name>`, and `DROP INDEX [IF EXISTS] <name>` to manage indexes (including text indexes), `KILL MUTATION WHERE table = '<table>' [AND mutation_id = '<id>']` to stop a running projection or index materialization or clear in the selected database, `INSERT INTO [database.]<table> [(columns)] SELECT ...` to materialize query results into an existing table, and `CREATE TABLE [IF NOT EXISTS] [database.]<table> ENGINE = ReplicatedRawMergeTree [ORDER BY (...)]` to create a table in the selected user database. ALTER and KILL MUTATION require the same authorization as updating table configuration, and CREATE TABLE the same as creating a table. Unsupported CREATE TABLE statements are rejected with a supported query in the hint. INSERT requires read and write permission, reads only from tables, and reports `statistics.written_rows`. Organization administrators and admin API keys may also CREATE ROLE, DROP ROLE [IF EXISTS], and GRANT SELECT or INSERT on explicitly qualified tables to existing roles; these operations apply to the selected cluster. Administrators may CREATE NAMED COLLECTION [IF NOT EXISTS] <name> [ON CLUSTER default] AS key = literal [NOT OVERRIDABLE | OVERRIDABLE], ... . Only string, numeric, and boolean literals are supported. ON CLUSTER default is passed through with native database semantics; distributed DDL exposes collection values in system.distributed_ddl_queue. Collection use permissions are managed separately; ALTER and DROP NAMED COLLECTION are unsupported. Other DCL and delegation options are not accepted. Administrators may manage WORKLOAD and RESOURCE definitions with CREATE, CREATE OR REPLACE, and DROP; ON CLUSTER default is optional and must be omitted with Keeper-backed workload storage. Reads and INSERT SELECT can select a workload using SQL SETTINGS workload = 'interactive'. Administrators may use CREATE SETTINGS PROFILE (including OR REPLACE) and DROP SETTINGS PROFILE for workload and use_concurrency_control, optionally READONLY or CONST, assigned to explicit existing database roles; arbitrary settings, users, and inheritance are unsupported. Administrators may CREATE ROW POLICY (including OR REPLACE) and DROP ROW POLICY on one table in the selected user database, with a SELECT filter assigned to explicit existing roles. Only ON CLUSTER default is supported and requires an explicitly qualified database.table target. Row policies filter reads for their target roles; they do not constrain writes or guarantee restrictions on untargeted readers.","operationId":"query","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"408":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"oauth2":["full_access"]}]}},"/v1/query-format":{"post":{"tags":["Data"],"operationId":"format_query","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryFormatRequest"}}},"required":true},"responses":{"200":{"description":"SQL formatted without database execution","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryFormatResponse"}}}},"400":{"description":"Invalid SQL or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"408":{"description":"Formatting timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request or formatted output too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Formatter unavailable or busy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/regions":{"get":{"tags":["Clusters"],"summary":"List regions","description":"Without an organization ID, returns enabled public regions. Organization members can pass an organization ID to list public regions and their organization's BYOC regions, including disabled entries.","operationId":"list","parameters":[{"name":"organization_id","in":"query","description":"Include regions owned by this organization when its plan permits BYOC.","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRegions"}}}},"400":{"description":"Invalid organization ID"},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/spl/capabilities":{"get":{"tags":["Apps"],"summary":"Describe the SPL language subset supported by this RawTree backend","operationId":"spl_capabilities","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplCapabilitiesResponse"}}}}}}},"/v1/spl/search":{"post":{"tags":["Apps"],"summary":"Execute the supported SPL v1 subset over splunk_events","operationId":"spl_search","parameters":[{"name":"organization","in":"query","description":"Organization name. Required for user and OAuth sessions.","required":false,"schema":{"type":"string"}},{"name":"cluster","in":"query","description":"Cluster name. Required only when the organization has multiple clusters.","required":false,"schema":{"type":"string"}},{"name":"database","in":"query","description":"Database containing splunk_events. Database-bound API keys may omit this parameter.","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplSearchRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplSearchResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"408":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"oauth2":["full_access"]}]}},"/v1/tables":{"get":{"tags":["Data"],"summary":"List all tables in a database","operationId":"list_tables","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TablesResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Data"],"summary":"Create a table in the selected database","operationId":"create_table","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTableRequest"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTableResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"oauth2":["full_access"]}]}},"/v1/tables/{table}":{"get":{"tags":["Data"],"summary":"Describe columns of a table","operationId":"describe_table","parameters":[{"name":"table","in":"path","description":"Table name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DescribeTableResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Data"],"summary":"Insert data into a table (auto-creates table if needed). URL imports wait for completion and return JSON.","operationId":"insert_into_table","parameters":[{"name":"table","in":"path","description":"Table name","required":true,"schema":{"type":"string"}},{"name":"url","in":"query","description":"Optional source URL. Mutually exclusive with request body.","required":false,"schema":{"type":"string"}},{"name":"query_id","in":"query","description":"Optional query ID for correlating a URL import with ClickHouse query logs.","required":false,"schema":{"type":"string"}},{"name":"columns","in":"query","description":"Optional comma-separated column names for TSV data when using transform=firehose.","required":false,"schema":{"type":"string"}},{"name":"deduplicate_insert","in":"query","description":"Optional ClickHouse insert deduplication setting: enable or disable.","required":false,"schema":{"type":"string"}},{"name":"insert_deduplication_token","in":"query","description":"Optional custom ClickHouse insert deduplication token.","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"A single JSON object or array of objects. Mutually exclusive with the 'url' query parameter.","content":{"application/json":{"schema":{}}}},"responses":{"200":{"description":"Normal JSON body mode returns native database summary fields plus legacy inserted (null if unavailable). Transformed JSON returns {inserted}. Firehose transform returns JSON {requestId,timestamp}. URL mode returns JSON {inserted}; inserted is null when unavailable. The ClickHouse query ID is returned in X-ClickHouse-Query-Id."},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"oauth2":["full_access"]}]},"delete":{"tags":["Data"],"summary":"Delete a table","operationId":"delete_table","parameters":[{"name":"table","in":"path","description":"Table name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTableResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"oauth2":["full_access"]}]},"patch":{"tags":["Data"],"summary":"Update a table's ClickHouse configuration","operationId":"update_table","parameters":[{"name":"table","in":"path","description":"Table name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTableRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTableResponse"}}}},"400":{"description":"Invalid sorting key, or the table does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"oauth2":["full_access"]}]}},"/v1/workflows":{"get":{"tags":["Workflows"],"summary":"List workflows in an organization and cluster.","operationId":"list_workflows","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWorkflows"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Workflows"],"summary":"Create a scheduled SQL workflow.","operationId":"create_workflow","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDefinition"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowItem"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Get a workflow and its sink configuration.","operationId":"get_workflow","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowItem"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]},"delete":{"tags":["Workflows"],"summary":"Delete a workflow and its schedule.","operationId":"delete_workflow","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Workflow deleted"},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]},"patch":{"tags":["Workflows"],"summary":"Update a workflow, including its schedule and sinks.","operationId":"update_workflow","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflow"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowItem"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/workflows/{workflow_id}/logs":{"get":{"tags":["Workflows"],"summary":"List workflow execution and sink delivery logs.","operationId":"list_workflow_logs","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","description":"Inclusive Unix milliseconds. Defaults to the last 24 hours.","required":false,"schema":{"type":["integer","null"],"format":"int64"}},{"name":"to","in":"query","description":"Exclusive Unix milliseconds.","required":false,"schema":{"type":["integer","null"],"format":"int64"}},{"name":"cursor","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowLogs"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/workflows/{workflow_id}/runs":{"get":{"tags":["Workflows"],"summary":"List manual and scheduled executions retained by Temporal.\nActive executions come first, then finished executions by descending finish\ntime. Visibility is eventually consistent. A run stays `running` until every\nsink it handed rows to reports its delivery, and fails if any delivery\nfailed or is unconfirmed after 65 minutes. `deliveries` shows each sink's\nprogress; per-attempt details are in logs.","operationId":"list_workflow_runs","parameters":[{"name":"organization","in":"path","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"path","description":"Maximum runs per page. Defaults to 20; accepts 1–100.","required":true,"schema":{"type":["integer","null"],"format":"int32","default":20,"maximum":100,"minimum":1}},{"name":"cursor","in":"path","description":"Opaque next_cursor returned for this workflow; omit for the first page.","required":true,"schema":{"type":["string","null"]}},{"name":"run_id","in":"path","description":"Return only this execution within the workflow. Cannot be combined with cursor.","required":true,"schema":{"type":["string","null"],"format":"uuid"}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRuns"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]},"post":{"tags":["Workflows"],"summary":"Execute a saved workflow once, independently of its schedule.","description":"No request body is required. Acceptance does not mean execution or delivery\nhas completed. Reuse an Idempotency-Key to recover the same run after a\ntimeout, while Temporal retains its execution history.","operationId":"create_workflow_run","parameters":[{"name":"organization","in":"path","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"path","required":true,"schema":{"type":"string"}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Optional retry key, 1–128 visible ASCII characters without spaces. Scoped to this workflow; deduplication lasts while Temporal retains the execution.","required":false,"schema":{"type":["string","null"]}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedWorkflowRun"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/workflows/{workflow_id}/runs/{run_id}/cancel":{"post":{"tags":["Workflows"],"summary":"Request cancellation of one manual or scheduled run without changing its schedule.\nNo body is required. Acceptance is asynchronous and does not undo completed writes.\nRecently started runs may not yet be visible. Repeating a request is safe;\nalready canceled runs return 202 and other finished runs return 409.","operationId":"cancel_workflow_run","parameters":[{"name":"organization","in":"path","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"path","required":true,"schema":{"type":"string"}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Cancellation accepted; empty response body."},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/workflows/{workflow_id}/sinks":{"post":{"tags":["Workflows"],"summary":"Add a sink to a workflow.","operationId":"create_workflow_sink","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkInput"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkView"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}},"/v1/workflows/{workflow_id}/sinks/{sink_id}":{"delete":{"tags":["Workflows"],"summary":"Remove one sink from a workflow.","operationId":"delete_workflow_sink","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sink_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Sink removed"},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]},"patch":{"tags":["Workflows"],"summary":"Change one sink of a workflow; omitted settings keep their stored values.","operationId":"update_workflow_sink","parameters":[{"name":"organization","in":"query","required":true,"schema":{"type":"string"}},{"name":"cluster","in":"query","required":true,"schema":{"type":"string"}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sink_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkPatch"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkView"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]},{"oauth2":["full_access"]}]}}},"components":{"schemas":{"AcceptedWorkflowRun":{"type":"object","required":["id","workflow_id","query_id","source"],"properties":{"id":{"type":"string"},"workflow_id":{"type":"string"},"query_id":{"type":"string"},"source":{"$ref":"#/components/schemas/WorkflowRunSource"}}},"ActorType":{"type":"string","enum":["human","agent"]},"ApiKeyDatabaseRef":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"ApiKeyItem":{"type":"object","required":["principal_type","principal_id","expires_at","id","token","name","database","created_at"],"properties":{"principal_type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrincipalType","description":"Null only for legacy or internally provisioned keys without an owner."}]},"principal_id":{"type":["string","null"],"format":"uuid"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Expiration instant in UTC, or null for a key that never expires."},"id":{"type":"string"},"token":{"type":"string"},"name":{"type":"string"},"permission":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PermissionLevel"}]},"database_roles":{"type":["array","null"],"items":{"type":"string"},"description":"Existing ClickHouse roles. Mutually exclusive with permission."},"database":{"$ref":"#/components/schemas/ApiKeyDatabaseRef"},"created_at":{"type":"string"}}},"AppId":{"type":"string","enum":["opentelemetry","prometheus","splunk","datahub"]},"AppItem":{"type":"object","required":["id","name","installed"],"properties":{"id":{"$ref":"#/components/schemas/AppId"},"name":{"type":"string"},"installed":{"type":"boolean"}}},"Category":{"type":"string","enum":["bug","feature_request","question","other"]},"ClusterItem":{"type":"object","required":["id","name","created_at","status","can_pause","can_resume","idle_timeout_minutes"],"properties":{"id":{"type":"string"},"deployment_id":{"type":["string","null"],"description":"Deployment actually serving the cluster; null during the routing migration."},"cloud_region":{"type":["string","null"],"description":"Cloud region of the serving deployment."},"name":{"type":"string"},"created_at":{"type":"string"},"rawtree_version":{"type":["string","null"],"description":"RawTree version reported in the latest cluster status snapshot, or null if unavailable."},"status":{"$ref":"#/components/schemas/ClusterLifecycleStatus"},"status_observed_at":{"type":["string","null"]},"status_source":{"type":["string","null"]},"resources":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ClusterResources"}]},"can_pause":{"type":"boolean"},"can_resume":{"type":"boolean"},"s3_storage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/S3StorageMetadata"}]},"s3_storage_access":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/S3StorageAccess","description":"Saved immutable S3 storage access identity; null for clusters without one."}]},"idle_timeout_minutes":{"type":"integer","format":"int64","minimum":0}}},"ClusterLifecyclePhase":{"type":"string","enum":["provisioning","routing","pausing","reconciling","rolling_keeper","rolling_rawtree","upgrading","syncing_replica","error","ready","ready_with_failures","update_available","terminating","stopped","resuming","degraded","unknown"]},"ClusterLifecycleStatus":{"type":"object","required":["phase","ready","label"],"properties":{"phase":{"$ref":"#/components/schemas/ClusterLifecyclePhase"},"ready":{"type":"boolean"},"label":{"type":"string"},"message":{"type":["string","null"]}}},"ClusterResourceSize":{"type":"object","required":["cpu_cores","memory_bytes"],"properties":{"cpu_cores":{"type":"number","format":"double"},"memory_bytes":{"type":"integer","format":"int64","minimum":0}}},"ClusterResources":{"type":"object","required":["shards","replicas"],"properties":{"shards":{"type":"integer","format":"int32","minimum":0},"replicas":{"type":"integer","format":"int32","minimum":0},"cpu_cores_per_replica":{"type":["number","null"],"format":"double"},"memory_bytes_per_replica":{"type":["integer","null"],"format":"int64","minimum":0},"minimum_size":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ClusterResourceSize"}]},"maximum_size":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ClusterResourceSize"}]}}},"ClusterSizeItem":{"type":"object","required":["size","cpu_cores","memory_gib"],"properties":{"size":{"type":"string"},"cpu_cores":{"type":"integer","format":"int32","minimum":0},"memory_gib":{"type":"integer","format":"int32","minimum":0}}},"ClusterSizesResponse":{"type":"object","required":["min_number_of_replicas","max_number_of_replicas","sizes","default_min_size","default_max_size"],"properties":{"min_number_of_replicas":{"type":"integer","format":"int32","minimum":0},"max_number_of_replicas":{"type":"integer","format":"int32","minimum":0},"sizes":{"type":"array","items":{"$ref":"#/components/schemas/ClusterSizeItem"}},"default_min_size":{"$ref":"#/components/schemas/ClusterSizeItem"},"default_max_size":{"$ref":"#/components/schemas/ClusterSizeItem"}}},"ColumnInfo":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string"},"type":{"type":"string"}}},"Configuration":{"type":"object","required":["settings","enabled","has_token","revision"],"properties":{"settings":{"$ref":"#/components/schemas/Settings"},"enabled":{"type":"boolean"},"has_token":{"type":"boolean"},"revision":{"type":"string"}}},"ConfigureRequest":{"type":"object","required":["settings","enabled"],"properties":{"settings":{"$ref":"#/components/schemas/Settings"},"enabled":{"type":"boolean"},"token":{"type":["string","null"],"description":"Omit to retain the saved token. Empty clears it (operator-allowed origins only)."},"revision":{"type":["string","null"],"description":"Optimistic concurrency token from GET. Omit for the first configuration."}},"additionalProperties":false},"ConnectionResponse":{"type":"object","required":["connected"],"properties":{"connected":{"type":"boolean"}}},"ConnectorBatchSettings":{"type":"object","properties":{"max_events":{"type":"integer","format":"int32","minimum":0},"timeout_secs":{"type":"number","format":"double"}},"additionalProperties":false},"ConnectorDestination":{"oneOf":[{"type":"object","required":["id","topics","group_id","database","table"],"properties":{"id":{"type":"string"},"topics":{"type":"array","items":{"type":"string"}},"group_id":{"type":"string"},"database":{"type":"string"},"table":{"type":"string"}}},{"type":"object","required":["id","postgres_tables","database","table"],"properties":{"id":{"type":"string"},"postgres_tables":{"type":"array","items":{"type":"string"}},"database":{"type":"string"},"table":{"type":"string"}}}]},"ConnectorDestinationRequest":{"oneOf":[{"type":"object","required":["topics","database","table"],"properties":{"id":{"type":["string","null"]},"topics":{"type":"array","items":{"type":"string"}},"group_id":{"type":["string","null"]},"database":{"type":"string"},"table":{"type":"string"}}},{"type":"object","required":["postgres_tables","database","table"],"properties":{"id":{"type":["string","null"]},"postgres_tables":{"type":"array","items":{"type":"string"}},"database":{"type":"string"},"table":{"type":"string"}}}],"description":"A connector destination. Shaped by connector type: Kafka destinations read named `topics`\nwith a `group_id`; Postgres destinations read named `postgres_tables` and have no consumer\ngroup. Untagged so existing Kafka clients, which send neither a `type` field nor\n`postgres_tables`, keep working unchanged."},"ConnectorItem":{"type":"object","required":["id","name","type","destinations","settings","status","credentials_configured","revision","created_at","updated_at"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/ConnectorType"},"destinations":{"type":"array","items":{"$ref":"#/components/schemas/ConnectorDestination"}},"settings":{"type":"object"},"status":{"$ref":"#/components/schemas/ConnectorStatus"},"credentials_configured":{"type":"boolean"},"slot_owned":{"type":["boolean","null"],"description":"Postgres connectors only: whether the platform created the replication slot and will\ndrop it when the connector is deleted."},"revision":{"type":"integer","format":"int64"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"ConnectorStatus":{"type":"string","enum":["active","paused"]},"ConnectorType":{"type":"string","enum":["kafka","postgres"]},"CreateApiKeyRequest":{"type":"object","required":["name"],"properties":{"principal_type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrincipalType","description":"Identity this key acts as. Supply both principal fields or omit both."}]},"principal_id":{"type":["string","null"],"format":"uuid"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Expiration instant in RFC 3339 format. Omitted or null means never."},"name":{"type":"string"},"permission":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PermissionLevel"}]},"database_roles":{"type":["array","null"],"items":{"type":"string"},"description":"Existing ClickHouse roles. Mutually exclusive with permission."}}},"CreateApiKeyResponse":{"type":"object","required":["principal_type","principal_id","expires_at","id","token","name","database"],"properties":{"principal_type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrincipalType","description":"Null only for legacy or internally provisioned keys without an owner."}]},"principal_id":{"type":["string","null"],"format":"uuid"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Expiration instant in UTC, or null for a key that never expires."},"id":{"type":"string"},"token":{"type":"string"},"name":{"type":"string"},"permission":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PermissionLevel"}]},"database_roles":{"type":["array","null"],"items":{"type":"string"},"description":"Existing ClickHouse roles. Mutually exclusive with permission."},"database":{"$ref":"#/components/schemas/ApiKeyDatabaseRef"}}},"CreateClusterAutoscaling":{"type":"object","required":["min_size","max_size"],"properties":{"min_size":{"$ref":"#/components/schemas/CreateClusterSize"},"max_size":{"$ref":"#/components/schemas/CreateClusterSize"}},"additionalProperties":false},"CreateClusterRequest":{"type":"object","required":["name","region_id","replicas","size"],"properties":{"name":{"type":"string"},"region_id":{"type":"string","format":"uuid","description":"Region from /v1/regions. The API resolves its deployment internally."},"replicas":{"type":"integer","format":"int32","minimum":0},"size":{"$ref":"#/components/schemas/CreateClusterSize","description":"Resources per replica, one of the sizes returned by /v1/clusters/sizes."},"idle_timeout_minutes":{"type":["integer","null"],"format":"int64","description":"Minutes without activity before automatically pausing. Omit to use the configured default.","minimum":0},"cluster_id":{"type":["string","null"],"description":"Optional client-generated cluster UUID. Omit to let the backend generate one."},"autoscaling":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CreateClusterAutoscaling"}]},"s3_storage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/S3StorageInput"}]},"s3_storage_access":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/S3StorageAccessInput","description":"Immutable S3 storage access identity. Omitted values are generated by the API."}]}},"additionalProperties":false},"CreateClusterSize":{"type":"object","required":["cpu_cores","memory_gib"],"properties":{"cpu_cores":{"type":"integer","format":"int32","minimum":0},"memory_gib":{"type":"integer","format":"int32","minimum":0}}},"CreateConnectorRequest":{"type":"object","required":["name","type","destinations","settings"],"properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/ConnectorType"},"destinations":{"type":"array","items":{"$ref":"#/components/schemas/ConnectorDestinationRequest"}},"settings":{"type":"object"}},"additionalProperties":false},"CreateDatabaseRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"s3_storage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/S3StorageInput","description":"Optional database-level customer-owned S3 configuration. Tables in the\ndatabase inherit this storage."}]}},"additionalProperties":false},"CreateDatabaseResponse":{"type":"object","required":["database"],"properties":{"database":{"$ref":"#/components/schemas/DatabaseItem"}}},"CreateSavedSearchRequest":{"type":"object","required":["database","name","spl"],"properties":{"database":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"spl":{"type":"string"},"earliest":{"type":"string"},"latest":{"type":"string"},"visibility":{"$ref":"#/components/schemas/SavedSearchVisibility"},"visualization":{"$ref":"#/components/schemas/SavedSearchVisualization"},"visualization_span_minutes":{"type":"integer","format":"int32"},"show_table":{"type":"boolean"},"visualization_config":{"$ref":"#/components/schemas/SavedSearchVisualizationConfig"}},"additionalProperties":false},"CreateServiceAccount":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Lowercase letters and digits separated by single hyphens; 1–128 characters.","maxLength":128,"minLength":1,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"description":{"type":["string","null"],"description":"Optional description, up to 2000 UTF-8 bytes."},"role":{"$ref":"#/components/schemas/ServiceAccountRole"}},"additionalProperties":false},"CreateSnapshotRequest":{"type":"object","required":["name","document"],"properties":{"name":{"type":"string"},"search_id":{"type":["string","null"],"format":"uuid"},"document":{"$ref":"#/components/schemas/SplunkRenderDocument"}},"additionalProperties":false},"CreateTableRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Table name in the selected database. The table uses the database's\ncustomer-owned S3 storage when configured, then the cluster default."},"sorting_key":{"type":["string","null"],"description":"Optional comma-separated SQL sorting expressions. Omit it, or send an empty string,\nto let the table pick a key per part from the ingested data."}},"additionalProperties":false},"CreateTableResponse":{"type":"object","required":["database","table","storage","sorting_key"],"properties":{"database":{"type":"string"},"table":{"type":"string"},"storage":{"$ref":"#/components/schemas/TableStorageResponse"},"sorting_key":{"type":"string"}}},"DatabaseItem":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"DatabaseListItem":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"s3_storage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/S3StorageMetadata","description":"Explicit database-level customer-owned S3 storage. `null` means that\nthe database inherits the cluster's default storage."}]}}},"DeleteApiKeyResponse":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}},"DeleteClusterResponse":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}},"DeleteConnectorResponse":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}},"DeleteDatabaseResponse":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}},"DeleteSavedSearchResponse":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}},"DeleteTableResponse":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}},"DescribeTableEntity":{"type":"object","required":["name","created_at","total_rows","total_bytes","columns","sorting_key"],"properties":{"name":{"type":"string"},"created_at":{"type":"string"},"total_rows":{"type":"integer","format":"int64","minimum":0},"total_bytes":{"type":"integer","format":"int64","minimum":0},"columns":{"type":"array","items":{"$ref":"#/components/schemas/ColumnInfo"}},"sorting_key":{"type":"string","description":"Sorting key expressions in key order, empty when the table picks a key per part."}}},"DescribeTableResponse":{"type":"object","required":["table"],"properties":{"table":{"$ref":"#/components/schemas/DescribeTableEntity"}}},"ErrorResponse":{"type":"object","description":"Error response shape returned by all endpoints.","required":["error","message","hint"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}}},"FeedbackReceipt":{"type":"object","required":["id","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"}}},"FirehoseInsertResponse":{"type":"object","required":["requestId","timestamp"],"properties":{"requestId":{"type":"string"},"timestamp":{"type":"integer","format":"int64","minimum":0}}},"HandlerDefinition":{"type":"object","required":["name","url","sql"],"properties":{"name":{"type":"string","description":"Handler name, unique across the selected cluster's databases."},"url":{"type":"string","description":"Native URL path. Call it under /v1/handlers."},"sql":{"type":"string","description":"SELECT query. FORMAT is optional; execution defaults to JSON."}},"additionalProperties":false},"HandlersResponse":{"type":"object","required":["handlers"],"properties":{"handlers":{"type":"array","items":{"$ref":"#/components/schemas/HandlerDefinition"}}}},"HealthResponse":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}}},"HttpSinkSettingsInput":{"type":"object","properties":{"url":{"type":["string","null"],"description":"Omit on update to preserve the configured URL."},"headers":{"type":["object","null"],"description":"Omit the map to preserve all headers. Within a supplied map, null\npreserves the stored value for the same case-insensitive name.","additionalProperties":{"type":["string","null"]},"propertyNames":{"type":"string"}}},"additionalProperties":false},"HttpSinkSettingsView":{"type":"object","required":["url_configured","header_names"],"properties":{"url":{"type":["string","null"],"description":"Configured URL, or null when its encrypted configuration is unreadable.\nHeader values are never returned."},"url_configured":{"type":"boolean"},"header_names":{"type":"array","items":{"type":"string"},"description":"Configured header names. Values are never returned."}}},"InsertResponse":{"type":"object","properties":{"inserted":{"type":["integer","null"],"format":"int64","description":"Legacy count. Normal inserts use written_rows from the database summary, or null if unavailable.","deprecated":true,"minimum":0}},"additionalProperties":{"description":"Unmodified database summary fields for normal JSON body inserts."}},"IntegrationResponse":{"type":"object","required":["sync"],"properties":{"configuration":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Configuration"}]},"sync":{"$ref":"#/components/schemas/SyncStatus"}}},"IssuerConfiguration":{"type":"object","description":"Complete issuer configuration for create and replace operations.\nSaving configuration performs no network requests or credential issuance.","required":["name","issuer_url"],"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"description":{"type":["string","null"],"description":"Optional description, up to 2000 UTF-8 bytes."},"issuer_url":{"type":"string","description":"HTTPS URL without credentials, query, or fragment; up to 2048 UTF-8 bytes."},"jwks_source":{"$ref":"#/components/schemas/JwksSource"},"jwks_url":{"type":["string","null"],"description":"Required for explicit_url; must be null or omitted for discovery.\nHTTPS URL without credentials or fragment; up to 2048 UTF-8 bytes."}},"additionalProperties":false},"JwksSource":{"type":"string","enum":["discovery","explicit_url"]},"KafkaConnectorSettings":{"type":"object","required":["bootstrap_servers"],"properties":{"bootstrap_servers":{"type":"string"},"auto_offset_reset":{"type":"string"},"tls":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/KafkaTlsSettings"}]},"sasl":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/KafkaSaslSettings"}]},"batch":{"$ref":"#/components/schemas/ConnectorBatchSettings"}},"additionalProperties":false},"KafkaSaslSettings":{"type":"object","required":["enabled","mechanism"],"properties":{"enabled":{"type":"boolean"},"mechanism":{"type":"string"},"username":{"type":["string","null"],"writeOnly":true},"password":{"type":["string","null"],"writeOnly":true}},"additionalProperties":false},"KafkaTlsSettings":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"},"verify_certificate":{"type":"boolean"},"verify_hostname":{"type":"boolean"}},"additionalProperties":false},"ListApiKeysResponse":{"type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyItem"}}}},"ListAppsResponse":{"type":"object","required":["apps"],"properties":{"apps":{"type":"array","items":{"$ref":"#/components/schemas/AppItem"}}}},"ListClustersResponse":{"type":"object","required":["clusters"],"properties":{"clusters":{"type":"array","items":{"$ref":"#/components/schemas/ClusterItem"}}}},"ListConnectorsResponse":{"type":"object","required":["connectors"],"properties":{"connectors":{"type":"array","items":{"$ref":"#/components/schemas/ConnectorItem"}}}},"ListDatabasesResponse":{"type":"object","required":["databases"],"properties":{"databases":{"type":"array","items":{"$ref":"#/components/schemas/DatabaseListItem"}}}},"ListOrganizationsResponse":{"type":"object","required":["organizations"],"properties":{"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationItem"}}}},"ListRegions":{"type":"object","required":["regions"],"properties":{"regions":{"type":"array","items":{"$ref":"#/components/schemas/Region"}}}},"ListSavedSearchesResponse":{"type":"object","required":["searches","truncated"],"properties":{"searches":{"type":"array","items":{"$ref":"#/components/schemas/SavedSearchSummary"}},"truncated":{"type":"boolean"}}},"ListSnapshotsResponse":{"type":"object","required":["snapshots"],"properties":{"snapshots":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotSummary"}},"next_offset":{"type":["integer","null"],"format":"int64","minimum":0}}},"ListWorkflows":{"type":"object","required":["workflows"],"properties":{"workflows":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowItem"}}}},"ListedWorkflowRunSource":{"type":"string","enum":["manual","scheduled"]},"LogEntry":{"type":"object","required":["uuid","level","date","status","pathname","latency","headers","id","time","method","host","path","route","status_code","source","duration_ms","user_agent","client_version","request_size_bytes","response_size_bytes","content_encoding","handler_ms","app_overhead_ms","error","error_code","error_message","error_hint","trace_id","span_id","parent_span_id","database","user_id","user_email","key_name","service_account_id","service_account_name","federation_rule_id","federation_issuer_id","organization_id","organization_name","cluster_id","cluster_name","url_query","request_body"],"properties":{"uuid":{"type":"string","description":"OpenStatus-compatible identifier for the request span."},"level":{"type":"string","description":"OpenStatus-compatible request level derived from the HTTP status."},"date":{"type":"string","description":"OpenStatus-compatible RFC3339 timestamp in UTC."},"status":{"type":"integer","format":"int32","description":"OpenStatus-compatible status code.","minimum":0},"pathname":{"type":"string","description":"OpenStatus-compatible request pathname."},"latency":{"type":"integer","format":"int64","description":"OpenStatus-compatible request latency in milliseconds.","minimum":0},"headers":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"message":{"type":["string","null"]},"percentile":{"type":["number","null"],"format":"double"},"id":{"type":"string"},"time":{"type":"string","description":"RFC3339 timestamp in UTC."},"method":{"type":"string"},"host":{"type":"string"},"path":{"type":"string"},"route":{"type":"string"},"status_code":{"type":"integer","format":"int32","minimum":0},"source":{"type":"string"},"duration_ms":{"type":"integer","format":"int64","minimum":0},"user_agent":{"type":"string"},"client_version":{"type":"string"},"request_size_bytes":{"type":"integer","format":"int64","minimum":0},"response_size_bytes":{"type":"integer","format":"int64","minimum":0},"content_encoding":{"type":"string"},"handler_ms":{"type":"integer","format":"int64","minimum":0},"app_overhead_ms":{"type":"integer","format":"int64","minimum":0},"error":{"type":"string"},"error_code":{"type":"string"},"error_message":{"type":"string"},"error_hint":{"type":"string"},"trace_id":{"type":"string"},"span_id":{"type":"string"},"parent_span_id":{"type":"string"},"database":{"type":"string"},"user_id":{"type":"string"},"user_email":{"type":"string"},"key_name":{"type":"string"},"service_account_id":{"type":"string"},"service_account_name":{"type":"string"},"federation_rule_id":{"type":"string"},"federation_issuer_id":{"type":"string"},"organization_id":{"type":"string"},"organization_name":{"type":"string"},"cluster_id":{"type":"string"},"cluster_name":{"type":"string"},"url_query":{"type":"string","description":"Raw URL query string of the request, for example `format=json&limit=10`."},"request_body":{"type":"string","description":"Captured request body (textual bodies up to 8 KiB; empty otherwise)."}}},"LogsResponse":{"type":"object","required":["logs","has_more"],"properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/LogEntry"}},"has_more":{"type":"boolean"},"next_offset":{"type":["integer","null"],"format":"int64","minimum":0}}},"OrganizationItem":{"type":"object","required":["organization_id","name","plan_id"],"properties":{"organization_id":{"type":"string"},"name":{"type":"string"},"role":{"type":["string","null"],"description":"User membership role; null for API keys, which are not organization members."},"plan_id":{"type":"string"}}},"PermissionLevel":{"type":"string","enum":["admin","read_write","write_only","read_only"]},"PostgresConnectorSettings":{"type":"object","required":["host","database","user","publication","slot"],"properties":{"host":{"type":"string","description":"Hostname or IP address of the PostgreSQL server."},"port":{"type":"integer","format":"int32","minimum":0},"database":{"type":"string"},"user":{"type":"string"},"password":{"type":["string","null"],"writeOnly":true},"publication":{"type":"string","description":"Publication to capture. It must already exist; the connector never creates one."},"slot":{"type":"string","description":"Replication slot name: lowercase letters, digits and underscores."},"create_slot_if_missing":{"type":"boolean","description":"Create the slot on first run if it does not exist. A slot the platform created this way\nis dropped again when the connector is deleted or moved to another slot (see\n`slot_owned`); a slot that already existed belongs to whoever made it and is never\ndropped."},"batch":{"$ref":"#/components/schemas/ConnectorBatchSettings"}},"additionalProperties":false},"PreviewRequest":{"type":"object","required":["databases"],"properties":{"databases":{"type":"array","items":{"type":"string"}},"table_filter":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TableFilter"}]}},"additionalProperties":false},"PreviewResponse":{"type":"object","required":["tables"],"properties":{"tables":{"type":"array","items":{"$ref":"#/components/schemas/PreviewTable"}}}},"PreviewTable":{"type":"object","required":["database","table","included"],"properties":{"database":{"type":"string"},"table":{"type":"string"},"included":{"type":"boolean"}}},"PrincipalType":{"type":"string","enum":["user","service_account"]},"QueryFormatRequest":{"type":"object","required":["sql"],"properties":{"sql":{"type":"string","description":"Complete SQL to format. Statements are parsed, never executed."}},"additionalProperties":false},"QueryFormatResponse":{"type":"object","required":["formatted"],"properties":{"formatted":{"type":"string"}}},"QueryRequest":{"type":"object","required":["sql"],"properties":{"sql":{"type":"string"},"query_id":{"type":["string","null"]},"format":{"type":["string","null"],"description":"Optional ClickHouse output format. Defaults to JSON.\nJSONEachRowWithProgress streams read-query records; errors after headers\nare reported in the body and clients must consume the complete stream."}}},"QueryResponse":{"type":"object","required":["meta","data","rows","statistics"],"properties":{"meta":{"type":"array","items":{"$ref":"#/components/schemas/QueryResponseColumnMeta"}},"data":{"type":"array","items":{}},"rows":{"type":"integer","format":"int64","minimum":0},"statistics":{"$ref":"#/components/schemas/QueryResponseStatistics"},"hints":{"type":["array","null"],"items":{"type":"string"}}}},"QueryResponseColumnMeta":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string"},"type":{"type":"string"}}},"QueryResponseStatistics":{"type":"object","required":["elapsed","rows_read","bytes_read"],"properties":{"elapsed":{"type":"number","format":"double"},"rows_read":{"type":"integer","format":"int64","minimum":0},"bytes_read":{"type":"integer","format":"int64","minimum":0},"written_rows":{"type":["integer","null"],"format":"int64","description":"Rows written by INSERT queries.","minimum":0}}},"Region":{"type":"object","required":["id","name","cloud_region","enabled","created_at","updated_at"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"cloud_region":{"type":"string"},"organization_id":{"type":["string","null"],"description":"NULL means public; otherwise this region belongs exclusively to that organization."},"deployment_id":{"type":["string","null"]},"account_id":{"type":["string","null"]},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"RuleConfiguration":{"type":"object","required":["name","issuer_id","allowed_audiences","claim_conditions","principal_type","principal_id","database","enabled"],"properties":{"name":{"type":"string"},"description":{"type":["string","null"]},"issuer_id":{"type":"string","format":"uuid"},"allowed_audiences":{"type":"array","items":{"type":"string"},"description":"At least one exact audience. A future token must match one entry."},"claim_conditions":{"type":"object","description":"Exact, top-level string claims. All conditions must match; no expressions or wildcards.","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"principal_type":{"$ref":"#/components/schemas/PrincipalType"},"principal_id":{"type":"string","format":"uuid"},"permission":{"type":["string","null"],"description":"Exactly one of permission or database_roles is required, as for API keys."},"database_roles":{"type":["array","null"],"items":{"type":"string"}},"database":{"type":"string","description":"Default database, not a restriction on database-role grants."},"enabled":{"type":"boolean","description":"Stored policy state only. This iteration does not enable authentication."}},"additionalProperties":false},"S3AccessVerification":{"type":"object","required":["verified","message"],"properties":{"verified":{"type":"boolean"},"message":{"type":"string"}}},"S3StorageAccess":{"type":"object","required":["external_id","resource_tag"],"properties":{"external_id":{"type":"string"},"resource_tag":{"type":"string","description":"Value of the fixed AWS resource tag key rawtree.com/cluster."}}},"S3StorageAccessInput":{"type":"object","description":"Creation-only overrides for the cluster's immutable S3 storage access identity.","properties":{"external_id":{"type":["string","null"],"description":"Generated when omitted for managed storage; required for custom S3 and verification."},"resource_tag":{"type":["string","null"],"description":"Value of rawtree.com/cluster. Generated when omitted."}},"additionalProperties":false},"S3StorageDestinationInput":{"type":"object","required":["bucket"],"properties":{"bucket":{"type":"string"},"path":{"type":"string"}},"additionalProperties":false},"S3StorageDestinationMetadata":{"type":"object","required":["bucket","path"],"properties":{"bucket":{"type":"string"},"path":{"type":"string"}}},"S3StorageInput":{"type":"object","required":["data","backups","role_arn"],"properties":{"data":{"$ref":"#/components/schemas/S3StorageDestinationInput"},"backups":{"$ref":"#/components/schemas/S3StorageDestinationInput"},"role_arn":{"type":"string"}},"additionalProperties":false},"S3StorageMetadata":{"type":"object","required":["data","backups"],"properties":{"data":{"$ref":"#/components/schemas/S3StorageDestinationMetadata"},"backups":{"$ref":"#/components/schemas/S3StorageDestinationMetadata"}}},"SampleTable":{"type":"object","required":["database","table","columns"],"properties":{"database":{"type":"string"},"table":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"SampleValues":{"type":"object","required":["values_per_column","tables"],"properties":{"values_per_column":{"type":"integer","minimum":0},"tables":{"type":"array","items":{"$ref":"#/components/schemas/SampleTable"}}},"additionalProperties":false},"SavedSearch":{"type":"object","required":["id","database","name","description","spl","earliest","latest","visibility","visualization","visualization_span_minutes","show_table","visualization_config","created_at","updated_at"],"properties":{"id":{"type":"string"},"database":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"spl":{"type":"string"},"earliest":{"type":"string"},"latest":{"type":"string"},"visibility":{"$ref":"#/components/schemas/SavedSearchVisibility"},"visualization":{"$ref":"#/components/schemas/SavedSearchVisualization"},"visualization_span_minutes":{"type":"integer","format":"int32"},"show_table":{"type":"boolean"},"visualization_config":{"$ref":"#/components/schemas/SavedSearchVisualizationConfig"},"created_by":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SavedSearchCreator"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"SavedSearchCreator":{"type":"object","required":["id","email"],"properties":{"id":{"type":"string"},"email":{"type":"string"}}},"SavedSearchResponse":{"type":"object","required":["search"],"properties":{"search":{"$ref":"#/components/schemas/SavedSearch"}}},"SavedSearchSummary":{"type":"object","required":["id","database","name","description","visibility","created_at","updated_at"],"properties":{"id":{"type":"string"},"database":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"visibility":{"$ref":"#/components/schemas/SavedSearchVisibility"},"created_by":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SavedSearchCreator"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"SavedSearchVisibility":{"type":"string","enum":["private","shared"]},"SavedSearchVisualization":{"type":"string","enum":["table","time-series","bar","area","pie","single-value"]},"SavedSearchVisualizationConfig":{"type":"object","properties":{"category_field":{"type":["string","null"],"default":null},"value_field":{"type":["string","null"],"default":null},"series_fields":{"type":"array","items":{"type":"string"},"default":[]},"show_legend":{"type":"boolean","default":true}},"additionalProperties":false},"ScheduleItem":{"type":"object","required":["cron","enabled"],"properties":{"cron":{"type":"string","example":"*/30 * * * * *"},"enabled":{"type":"boolean","description":"False while automatic runs are paused."},"next_run_at":{"type":["string","null"],"format":"date-time","description":"Next scheduled evaluation from Temporal; null while paused."}}},"ServiceAccount":{"type":"object","required":["id","organization_id","name","role"],"properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Immutable name, unique within the organization."},"description":{"type":["string","null"]},"role":{"$ref":"#/components/schemas/ServiceAccountRole"}}},"ServiceAccountRole":{"type":"string","enum":["member","admin"]},"Settings":{"type":"object","required":["gms_url","platform_instance","environment","databases","interval_minutes"],"properties":{"gms_url":{"type":"string"},"frontend_url":{"type":["string","null"]},"platform_instance":{"type":"string","description":"Stable identity shared with the rawtree-datahub ingestion source."},"environment":{"type":"string"},"databases":{"type":"array","items":{"type":"string"}},"interval_minutes":{"type":"integer","format":"int32"},"table_filter":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TableFilter"}]},"sample_values":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SampleValues","description":"Absent means metadata-only: no record values are read or exported."}]}},"additionalProperties":false},"SinkDelivery":{"type":"object","required":["sink_id","status"],"properties":{"sink_id":{"type":"string"},"status":{"$ref":"#/components/schemas/SinkDeliveryStatus"}}},"SinkDeliveryStatus":{"type":"string","enum":["delivering","delivered","failed","delivery_unknown"]},"SinkInput":{"oneOf":[{"type":"object","required":["type"],"properties":{"id":{"type":["string","null"],"description":"Existing sink ID. Omit when adding a sink."},"settings":{"$ref":"#/components/schemas/HttpSinkSettingsInput","description":"Omit on update to preserve the configured URL and headers."},"type":{"type":"string","enum":["http"]}}},{"type":"object","required":["settings","type"],"properties":{"id":{"type":["string","null"],"description":"Existing sink ID. Omit when adding a sink."},"settings":{"$ref":"#/components/schemas/TableSinkSettings"},"type":{"type":"string","enum":["table"]}}},{"type":"object","required":["settings","type"],"properties":{"id":{"type":["string","null"],"description":"Existing sink ID. Omit when adding a sink."},"settings":{"$ref":"#/components/schemas/SlackSinkSettingsInput"},"type":{"type":"string","enum":["slack"]}}}]},"SinkPatch":{"type":"object","description":"Changes to one sink. Settings omitted here keep their stored values.","required":["settings"],"properties":{"type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SinkType","description":"The sink's type. Optional; a sink's type cannot change."}]},"settings":{"oneOf":[{"$ref":"#/components/schemas/HttpSinkSettingsInput"},{"$ref":"#/components/schemas/TableSinkSettingsPatch"},{"$ref":"#/components/schemas/SlackSinkSettingsPatch"}]}},"additionalProperties":false},"SinkType":{"type":"string","enum":["http","table","slack"]},"SinkView":{"oneOf":[{"type":"object","required":["id","settings","type"],"properties":{"id":{"type":"string"},"settings":{"$ref":"#/components/schemas/HttpSinkSettingsView"},"type":{"type":"string","enum":["http"]}}},{"type":"object","required":["id","settings","type"],"properties":{"id":{"type":"string"},"settings":{"$ref":"#/components/schemas/TableSinkSettings"},"type":{"type":"string","enum":["table"]}}},{"type":"object","required":["id","settings","type"],"properties":{"id":{"type":"string"},"settings":{"$ref":"#/components/schemas/SlackSinkSettings"},"type":{"type":"string","enum":["slack"]}}}]},"SlackSinkSettings":{"type":"object","description":"A saved Slack sink, as stored and returned by the API.","required":["integration_id","channel_id","channel_name"],"properties":{"integration_id":{"type":"string"},"channel_id":{"type":"string"},"channel_name":{"type":"string","description":"Channel name resolved from Slack when the sink was saved."}}},"SlackSinkSettingsInput":{"type":"object","description":"Where a Slack sink posts: a channel ID, or a channel name that is resolved\nto its ID when the sink is saved. The RawTree app must be a member of\nprivate channels.","required":["integration_id"],"properties":{"integration_id":{"type":"string","description":"A Slack integration connected to the workflow's organization."},"channel_id":{"type":["string","null"],"description":"Slack channel ID, such as `C0123456789`. Set this or `channel_name`."},"channel_name":{"type":["string","null"],"description":"Slack channel name, such as `alerts` or `#alerts`. Set this or\n`channel_id`. The sink converts the name to an ID when it is saved."}},"additionalProperties":false},"SlackSinkSettingsPatch":{"type":"object","description":"Changes to a Slack sink. A new `channel_id` or `channel_name` replaces the\nchannel; omitted fields keep their stored values.","properties":{"integration_id":{"type":["string","null"]},"channel_id":{"type":["string","null"]},"channel_name":{"type":["string","null"]}},"additionalProperties":false},"SnapshotPresentation":{"type":"object","required":["active_tab","active_view","visualization_span","show_table","visualization_config"],"properties":{"active_tab":{"$ref":"#/components/schemas/SnapshotTab"},"active_view":{"$ref":"#/components/schemas/SavedSearchVisualization"},"visualization":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SavedSearchVisualization"}]},"visualization_span":{"type":"string"},"show_table":{"type":"boolean"},"visualization_config":{"$ref":"#/components/schemas/SavedSearchVisualizationConfig"}},"additionalProperties":false},"SnapshotQuery":{"type":"object","required":["database","earliest","latest","executed_at","completed_at"],"properties":{"database":{"type":"string"},"earliest":{"type":"string"},"latest":{"type":"string"},"executed_at":{"type":"string","description":"Time the captured execution started, supplied with the completed result."},"completed_at":{"type":"string"}},"additionalProperties":false},"SnapshotResponse":{"type":"object","required":["snapshot","document"],"properties":{"snapshot":{"$ref":"#/components/schemas/SnapshotSummary"},"document":{"$ref":"#/components/schemas/SplunkRenderDocument"}}},"SnapshotSummary":{"type":"object","required":["id","name","visibility","created_at","document_size_bytes"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"visibility":{"$ref":"#/components/schemas/SavedSearchVisibility"},"source_name":{"type":["string","null"]},"source_description":{"type":["string","null"]},"search_id":{"type":["string","null"]},"created_at":{"type":"string"},"document_size_bytes":{"type":"integer","format":"int64"}}},"SnapshotTab":{"type":"string","enum":["raw-events","results"]},"SplBuiltinFieldCapability":{"type":"object","required":["name","detail"],"properties":{"name":{"type":"string"},"detail":{"type":"string"}}},"SplCapabilitiesResponse":{"type":"object","required":["schema_version","language_version","commands","functions","comparison_operators","boolean_operators","keywords","literals","timechart_span_units","builtin_fields","limits"],"properties":{"schema_version":{"type":"integer","format":"int32","minimum":0},"language_version":{"type":"string"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/SplCommandCapability"}},"functions":{"type":"array","items":{"$ref":"#/components/schemas/SplFunctionCapability"}},"comparison_operators":{"type":"array","items":{"type":"string"}},"boolean_operators":{"type":"array","items":{"type":"string"}},"keywords":{"type":"array","items":{"type":"string"}},"literals":{"type":"array","items":{"type":"string"}},"timechart_span_units":{"type":"array","items":{"type":"string"}},"builtin_fields":{"type":"array","items":{"$ref":"#/components/schemas/SplBuiltinFieldCapability"}},"limits":{"$ref":"#/components/schemas/SplCapabilityLimits"}}},"SplCapabilityLimits":{"type":"object","required":["max_pipeline_stages","max_result_rows","max_head_rows"],"properties":{"max_pipeline_stages":{"type":"integer","minimum":0},"max_result_rows":{"type":"integer","minimum":0},"max_head_rows":{"type":"integer","minimum":0}}},"SplCommandCapability":{"type":"object","required":["name","positions","syntax"],"properties":{"name":{"type":"string"},"positions":{"type":"array","items":{"$ref":"#/components/schemas/SplCommandPosition"}},"syntax":{"type":"string"}}},"SplCommandPosition":{"type":"string","enum":["first_stage","pipeline"]},"SplFieldArgument":{"type":"string","enum":["none","optional","required"]},"SplFieldStatistic":{"type":"object","required":["name","type","total_rows","value_count","unique_value_count","coverage","common_values","found_in_tables"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"total_rows":{"type":"integer","format":"int64","minimum":0},"value_count":{"type":"integer","format":"int64","minimum":0},"unique_value_count":{"type":"integer","format":"int64","minimum":0},"coverage":{"type":"number","format":"double"},"common_values":{"type":"array","items":{"$ref":"#/components/schemas/SplFieldValueCount"}},"found_in_tables":{"type":"array","items":{"$ref":"#/components/schemas/SplFieldValueCount"}}}},"SplFieldValueCount":{"type":"object","required":["value","count"],"properties":{"value":{"type":"string"},"count":{"type":"integer","format":"int64","minimum":0}}},"SplFunctionCapability":{"type":"object","required":["name","kind","syntax","field_argument"],"properties":{"name":{"type":"string"},"kind":{"$ref":"#/components/schemas/SplFunctionKind"},"syntax":{"type":"string"},"field_argument":{"$ref":"#/components/schemas/SplFieldArgument"},"arity":{"type":["integer","null"],"format":"int32","minimum":0}}},"SplFunctionKind":{"type":"string","enum":["aggregate","eval"]},"SplResultFormat":{"type":"string","enum":["native_columns"]},"SplResultKind":{"type":"string","enum":["events","statistics"]},"SplSearchDataset":{"type":"object","required":["meta","data","rows","statistics","truncated"],"properties":{"meta":{"type":"array","items":{"$ref":"#/components/schemas/QueryResponseColumnMeta"}},"data":{"type":"array","items":{}},"rows":{"type":"integer","format":"int64","minimum":0},"statistics":{"$ref":"#/components/schemas/QueryResponseStatistics"},"hints":{"type":["array","null"],"items":{"type":"string"}},"truncated":{"type":"boolean"}}},"SplSearchRequest":{"type":"object","required":["spl"],"properties":{"spl":{"type":"string"},"query_id":{"type":["string","null"]},"earliest":{"type":["string","null"]},"latest":{"type":["string","null"]},"include_field_statistics":{"type":"boolean"}}},"SplSearchResponse":{"type":"object","required":["meta","data","rows","statistics","spl","stages","timeline","result_kind","truncated"],"properties":{"result_format":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SplResultFormat"}]},"meta":{"type":"array","items":{"$ref":"#/components/schemas/QueryResponseColumnMeta"}},"data":{"type":"array","items":{}},"rows":{"type":"integer","format":"int64","minimum":0},"statistics":{"$ref":"#/components/schemas/QueryResponseStatistics"},"hints":{"type":["array","null"],"items":{"type":"string"}},"spl":{"type":"string"},"stages":{"type":"array","items":{"$ref":"#/components/schemas/SplSearchStage"}},"timeline":{"type":"array","items":{"$ref":"#/components/schemas/SplTimelinePoint"}},"result_kind":{"$ref":"#/components/schemas/SplResultKind"},"truncated":{"type":"boolean"},"field_statistics":{"type":["array","null"],"items":{"$ref":"#/components/schemas/SplFieldStatistic"}},"raw_events":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SplSearchDataset"}]}}},"SplSearchStage":{"type":"object","required":["command","expression","truncated"],"properties":{"command":{"type":"string"},"expression":{"type":"string"},"output_rows":{"type":["integer","null"],"format":"int64","minimum":0},"truncated":{"type":"boolean"}}},"SplTimelinePoint":{"type":"object","required":["time","count"],"properties":{"time":{"type":"number","format":"double"},"count":{"type":"integer","format":"int64","minimum":0}}},"SplunkRenderDocument":{"type":"object","required":["schema_version","renderer_version","query","result","presentation"],"properties":{"schema_version":{"type":"integer","format":"int32","minimum":0},"renderer_version":{"type":"integer","format":"int32","minimum":0},"query":{"$ref":"#/components/schemas/SnapshotQuery"},"result":{"$ref":"#/components/schemas/SplSearchResponse"},"presentation":{"$ref":"#/components/schemas/SnapshotPresentation"}},"additionalProperties":false},"SubmitFeedback":{"type":"object","required":["message","category","actor_type"],"properties":{"message":{"type":"string","description":"Nonblank feedback, limited to 16 KiB of UTF-8 text."},"category":{"$ref":"#/components/schemas/Category"},"actor_type":{"$ref":"#/components/schemas/ActorType","description":"Caller-declared author of the feedback; independent of authenticated identity."},"organization_id":{"type":["string","null"],"format":"uuid","description":"Defaults to the credential scope or the supplied cluster's organization."},"cluster_id":{"type":["string","null"],"format":"uuid","description":"Defaults to the credential's cluster for API keys and workload tokens."},"extra":{"type":["object","null"],"description":"Additional JSON fields, including nested objects and arrays.","additionalProperties":{},"propertyNames":{"type":"string"}}},"additionalProperties":false},"SyncStatus":{"type":"object","required":["state","tables_synced","columns_synced"],"properties":{"state":{"type":"string"},"last_started_at":{"type":["string","null"]},"last_finished_at":{"type":["string","null"]},"last_success_at":{"type":["string","null"]},"next_sync_at":{"type":["string","null"]},"error":{"type":["string","null"]},"tables_synced":{"type":"integer","format":"int32"},"columns_synced":{"type":"integer","format":"int32"}}},"TableFilter":{"oneOf":[{"type":"object","required":["exclude","mode"],"properties":{"exclude":{"type":"array","items":{"type":"string"}},"mode":{"type":"string","enum":["all"]}}},{"type":"object","required":["tables","exclude","mode"],"properties":{"tables":{"type":"array","items":{"$ref":"#/components/schemas/TableName"}},"exclude":{"type":"array","items":{"type":"string"}},"mode":{"type":"string","enum":["selected"]}}},{"type":"object","required":["include","exclude","mode"],"properties":{"include":{"type":"array","items":{"type":"string"}},"exclude":{"type":"array","items":{"type":"string"}},"mode":{"type":"string","enum":["patterns"]}}}]},"TableInfo":{"type":"object","required":["name","created_at","total_rows","total_bytes"],"properties":{"name":{"type":"string"},"created_at":{"type":"string"},"total_rows":{"type":"integer","format":"int64","minimum":0},"total_bytes":{"type":"integer","format":"int64","minimum":0}}},"TableName":{"type":"object","required":["database","table"],"properties":{"database":{"type":"string"},"table":{"type":"string"}},"additionalProperties":false},"TableS3DestinationResponse":{"type":"object","required":["bucket","path"],"properties":{"bucket":{"type":"string"},"path":{"type":"string"}}},"TableSinkSettings":{"type":"object","required":["database","table"],"properties":{"database":{"type":"string"},"table":{"type":"string"}},"additionalProperties":false},"TableSinkSettingsPatch":{"type":"object","properties":{"database":{"type":["string","null"]},"table":{"type":["string","null"]}},"additionalProperties":false},"TableStorageResponse":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["default"]}}},{"type":"object","required":["data","backups","type"],"properties":{"data":{"$ref":"#/components/schemas/TableS3DestinationResponse"},"backups":{"$ref":"#/components/schemas/TableS3DestinationResponse"},"type":{"type":"string","enum":["s3"]}}}]},"TablesResponse":{"type":"object","required":["tables"],"properties":{"tables":{"type":"array","items":{"$ref":"#/components/schemas/TableInfo"}}}},"UpdateClusterRequest":{"type":"object","properties":{"name":{"type":["string","null"]},"idle_timeout_minutes":{"type":["integer","null"],"format":"int64","minimum":0}},"additionalProperties":false},"UpdateConnectorRequest":{"type":"object","properties":{"name":{"type":["string","null"]},"destinations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ConnectorDestinationRequest"}},"settings":{"type":["object","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConnectorStatus"}]}},"additionalProperties":false},"UpdateSavedSearchRequest":{"type":"object","properties":{"database":{"type":["string","null"]},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"spl":{"type":["string","null"]},"earliest":{"type":["string","null"]},"latest":{"type":["string","null"]},"visibility":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SavedSearchVisibility"}]},"visualization":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SavedSearchVisualization"}]},"visualization_span_minutes":{"type":["integer","null"],"format":"int32"},"show_table":{"type":["boolean","null"]},"visualization_config":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SavedSearchVisualizationConfig"}]}},"additionalProperties":false},"UpdateSnapshotRequest":{"type":"object","required":["visibility"],"properties":{"visibility":{"$ref":"#/components/schemas/SavedSearchVisibility"}},"additionalProperties":false},"UpdateTableRequest":{"type":"object","properties":{"sorting_key":{"type":["string","null"],"description":"Comma-separated SQL expressions for the custom sorting key."}},"additionalProperties":false},"UpdateTableResponse":{"type":"object","required":["database","table","sorting_key"],"properties":{"database":{"type":"string"},"table":{"type":"string"},"sorting_key":{"type":"string"}}},"UpdateWorkflow":{"type":"object","properties":{"name":{"type":["string","null"]},"description":{"type":["string","null"],"description":"Omit to preserve the description; null or blank text clears it.","maxLength":1000},"query":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UpdateWorkflowQuery"}]},"schedule":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UpdateWorkflowSchedule","description":"Omit to preserve the schedule; null selects manual-only execution."}]},"sinks":{"type":["array","null"],"items":{"$ref":"#/components/schemas/SinkInput"}}},"additionalProperties":false},"UpdateWorkflowQuery":{"type":"object","properties":{"database":{"type":["string","null"]},"sql":{"type":["string","null"]}},"additionalProperties":false},"UpdateWorkflowSchedule":{"type":"object","description":"Omitted fields keep their current values. `cron` is required when\nscheduling a manual-only workflow.","properties":{"cron":{"type":["string","null"],"example":"*/30 * * * * *"},"enabled":{"type":["boolean","null"]}},"additionalProperties":false},"VerifyS3AccessRequest":{"type":"object","required":["s3_storage_access","s3_storage"],"properties":{"s3_storage_access":{"$ref":"#/components/schemas/S3StorageAccessInput","description":"The proposed identity; external_id must match the customer IAM trust policy."},"s3_storage":{"$ref":"#/components/schemas/S3StorageInput"}},"additionalProperties":false},"WorkflowDefinition":{"type":"object","required":["name","query"],"properties":{"name":{"type":"string"},"description":{"type":["string","null"],"description":"Optional free-form text. Surrounding whitespace is trimmed and blank values are stored as null.","maxLength":1000},"query":{"$ref":"#/components/schemas/WorkflowQuery"},"schedule":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/WorkflowSchedule","description":"Automatic execution. Null means manual-only execution"}],"default":{"cron":"* * * * * *","enabled":true}},"sinks":{"type":"array","items":{"$ref":"#/components/schemas/SinkInput"}}},"additionalProperties":false},"WorkflowItem":{"type":"object","required":["sinks","id","name","query","revision","created_at","updated_at"],"properties":{"sinks":{"type":"array","items":{"$ref":"#/components/schemas/SinkView"}},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"query":{"$ref":"#/components/schemas/WorkflowQuery"},"schedule":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ScheduleItem","description":"Automatic execution; null for manual-only workflows."}]},"revision":{"type":"integer","format":"int64"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"WorkflowLog":{"type":"object","required":["event_id","event_type","timestamp_ms","workflow_revision","outcome"],"properties":{"event_id":{"type":"string"},"event_type":{"type":"string"},"timestamp_ms":{"type":"integer","format":"int64"},"workflow_revision":{"type":"integer","format":"int64"},"outcome":{"type":"string"},"run_id":{"type":["string","null"]},"match_event_id":{"type":["string","null"]},"attempt_id":{"type":["string","null"]},"sink_id":{"type":["string","null"]},"sink_type":{"type":["string","null"]},"status_code":{"type":["integer","null"],"format":"int32","minimum":0},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]},"duration_ms":{"type":["integer","null"],"format":"int64","minimum":0},"match_count":{"type":["integer","null"],"format":"int64","minimum":0},"read_rows":{"type":["integer","null"],"format":"int64","minimum":0},"written_rows":{"type":["integer","null"],"format":"int64","minimum":0},"query_duration_ms":{"type":["integer","null"],"format":"int64","minimum":0},"row_data":{},"payload_omitted":{"type":"boolean"}}},"WorkflowLogs":{"type":"object","required":["logs","from","to"],"properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowLog"}},"next_cursor":{"type":["string","null"]},"from":{"type":"integer","format":"int64"},"to":{"type":"integer","format":"int64"}}},"WorkflowQuery":{"type":"object","required":["database","sql"],"properties":{"database":{"type":"string"},"sql":{"type":"string"}},"additionalProperties":false},"WorkflowRun":{"type":"object","required":["id","workflow_id","query_id","source","status","started_at","deliveries"],"properties":{"id":{"type":"string"},"workflow_id":{"type":"string"},"query_id":{"type":"string"},"source":{"$ref":"#/components/schemas/ListedWorkflowRunSource"},"status":{"$ref":"#/components/schemas/WorkflowRunStatus"},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/SinkDelivery"},"description":"One entry per sink the run handed rows to, ordered by sink ID."}}},"WorkflowRunSource":{"type":"string","enum":["manual"]},"WorkflowRunStatus":{"type":"string","enum":["running","completed","failed","canceled","terminated","continued_as_new","timed_out","paused"]},"WorkflowRuns":{"type":"object","required":["runs"],"properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRun"}},"next_cursor":{"type":["string","null"]}}},"WorkflowSchedule":{"type":"object","required":["cron"],"properties":{"cron":{"type":"string","example":"*/30 * * * * *"},"enabled":{"type":"boolean"}},"additionalProperties":false},"WorkloadFederationIssuer":{"type":"object","required":["id","organization_id","name","issuer_url","jwks_source","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"issuer_url":{"type":"string","description":"Exact expected token issuer. Stored without URL normalization."},"jwks_source":{"$ref":"#/components/schemas/JwksSource"},"jwks_url":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"WorkloadFederationRule":{"allOf":[{"$ref":"#/components/schemas/RuleConfiguration"},{"type":"object","required":["id","organization_id","cluster_id","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"cluster_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}]}},"securitySchemes":{"apiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"APIKey","description":"Cluster-wide API key (rt_<hex>) sent as Authorization: Bearer rt_<hex>. Obtain from POST /v1/keys."},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"User JWT sent as Authorization: Bearer <jwt>."},"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://api.rawtree.com/oauth/authorize","tokenUrl":"https://api.rawtree.com/oauth/token","scopes":{"full_access":"Full agent access except billing, payments, identity/security administration, OAuth grant management, and staff routes."}}},"description":"Public OAuth clients must use Authorization Code with PKCE (S256). Register clients at POST /oauth/register."}}},"tags":[{"name":"Health"},{"name":"Data"},{"name":"API Keys"},{"name":"Service accounts"},{"name":"Databases"},{"name":"Clusters"},{"name":"Metrics"},{"name":"Apps"},{"name":"Connectors"},{"name":"Workflows"},{"name":"Feedback"}]}