{"components":{"parameters":{"APIKeySlugParam":{"description":"Slug of the API key","in":"path","name":"api_key_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"APIKeysFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"api_key_created_at","enum":["api_key_created_at","api_key_updated_at","api_key_name"],"example":"api_key_created_at","type":"string"}},"AlertDeliveryAttemptFieldParam":{"description":"Field to sort alert delivery attempts by","in":"query","name":"sort_by","schema":{"default":"alert_delivery_attempt_created_at","enum":["alert_delivery_attempt_created_at"],"example":"alert_delivery_attempt_created_at","type":"string"}},"AlertDestinationFieldParam":{"description":"Field to sort alert destinations by","in":"query","name":"sort_by","schema":{"default":"alert_destination_created_at","enum":["alert_destination_created_at"],"example":"alert_destination_created_at","type":"string"}},"AlertDestinationSlugParam":{"description":"Slug of the alert destination","in":"path","name":"alert_destination_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"AlertPolicyFieldParam":{"description":"Field to sort alert policies by","in":"query","name":"sort_by","schema":{"default":"alert_policy_created_at","enum":["alert_policy_created_at"],"example":"alert_policy_created_at","type":"string"}},"AlertPolicySlugParam":{"description":"Slug of the alert policy","in":"path","name":"alert_policy_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"ContractSlugParam":{"in":"path","name":"contract_slug","required":true,"schema":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}},"CursorParam":{"description":"Cursor for pagination (from previous response's next_cursor). Format depends on sort_by parameter.","in":"query","name":"cursor","schema":{"example":"2025-10-04T12:34:56Z_987e6543-e21b-34c5-d678-123456789abc","type":"string"}},"DataSourceRefSlugParam":{"description":"Slug of the logical data source ref","in":"path","name":"data_source_ref_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"DataSourceSlugParam":{"description":"Slug of the data source","in":"path","name":"ds_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"DataSourcesFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"data_source_created_at","enum":["data_source_created_at","data_source_updated_at","data_source_name"],"example":"data_source_created_at","type":"string"}},"EnvironmentSecretKeyParam":{"description":"Environment secret key. Keys are referenced in pipeline specs as `{{runtime.secrets.KEY}}`.","in":"path","name":"environment_secret_key","required":true,"schema":{"example":"API_TOKEN","maxLength":100,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"}},"EnvironmentSlugParam":{"description":"Slug of the environment","in":"path","name":"environment_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"EnvironmentSlugQueryParam":{"description":"Environment slug used to constrain query results.","in":"query","name":"environment_slug","schema":{"$ref":"#/components/schemas/Slug"}},"EnvironmentsFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"environment_created_at","enum":["environment_created_at","environment_updated_at","environment_name"],"example":"environment_created_at","type":"string"}},"EventActionFilterParam":{"description":"Filter by event action","in":"query","name":"action","schema":{"$ref":"#/components/schemas/EventAction"}},"EventActorSlugFilterParam":{"description":"Filter by actor slug","in":"query","name":"actor_slug","schema":{"$ref":"#/components/schemas/Slug"}},"EventActorTypeFilterParam":{"description":"Filter by actor type","in":"query","name":"actor_type","schema":{"$ref":"#/components/schemas/EventActorType"}},"EventEntitySlugFilterParam":{"description":"Filter by affected entity slug","in":"query","name":"entity_slug","schema":{"$ref":"#/components/schemas/Slug"}},"EventEntityTypeFilterParam":{"description":"Filter by affected entity type","in":"query","name":"entity_type","schema":{"$ref":"#/components/schemas/EventEntityType"}},"EventFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"event_occurred_at","enum":["event_occurred_at"],"example":"event_occurred_at","type":"string"}},"EventOccurredBeforeFilterParam":{"description":"Include events occurring strictly before this timestamp","in":"query","name":"occurred_before","schema":{"format":"date-time","type":"string"}},"EventOccurredFromFilterParam":{"description":"Include events occurring at or after this timestamp","in":"query","name":"occurred_from","schema":{"format":"date-time","type":"string"}},"EventRequestIdFilterParam":{"description":"Filter by the request correlation identifier recorded with the event","in":"query","name":"request_id","schema":{"maxLength":255,"minLength":1,"type":"string"}},"InvitationSlugParam":{"description":"Slug of the member invitation","in":"path","name":"invitation_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"LimitParam":{"description":"Maximum number of items to return (default 20, max 100)","in":"query","name":"limit","schema":{"default":20,"example":20,"format":"int32","maximum":100,"minimum":1,"type":"integer"}},"LimitPerNotificationParam":{"description":"Maximum number of recent alert delivery attempts to return per notification.","in":"query","name":"limit_per_notification","schema":{"default":5,"example":5,"maximum":10,"minimum":1,"type":"integer"}},"MemberInvitationStatusParam":{"description":"Optional invitation lifecycle status filter applied before pagination","in":"query","name":"status","schema":{"$ref":"#/components/schemas/MemberInvitationStatus"}},"MemberInvitationsFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"invitation_created_at","enum":["invitation_created_at","invitation_updated_at","invitation_email","invitation_expires_at"],"example":"invitation_created_at","type":"string"}},"MembersFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"member_created_at","enum":["member_created_at","member_updated_at","member_email"],"example":"member_created_at","type":"string"}},"NotificationFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"notification_last_seen_at","enum":["notification_last_seen_at"],"example":"notification_last_seen_at","type":"string"}},"NotificationSlugParam":{"description":"Slug of the notification record","in":"path","name":"notification_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"NotificationSlugsParam":{"description":"Notification record slugs for a bounded bulk diagnostics read.","explode":false,"in":"query","name":"notification_slugs","required":true,"schema":{"example":["pipeline-run-failed","warehouse-sync-degraded"],"items":{"$ref":"#/components/schemas/Slug"},"maxItems":50,"minItems":1,"type":"array"},"style":"form"},"OrderParam":{"description":"Sort order (asc for ascending, desc for descending)","in":"query","name":"order","schema":{"default":"desc","enum":["asc","desc"],"example":"desc","type":"string","x-enum-varnames":["Asc","Desc"]}},"OrganizationsFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"organization_created_at","enum":["organization_created_at","organization_updated_at","organization_name"],"example":"organization_created_at","type":"string"}},"PATSlugParam":{"description":"Slug of the personal access token","in":"path","name":"pat_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"PageDirectionParam":{"description":"Page direction (next for forward navigation, prev for backward navigation)","in":"query","name":"direction","schema":{"default":"next","enum":["next","prev"],"example":"next","type":"string","x-enum-varnames":["Next","Prev"]}},"PersonalAccessTokensFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"personal_access_token_created_at","enum":["personal_access_token_created_at","personal_access_token_updated_at","personal_access_token_name"],"example":"personal_access_token_created_at","type":"string"}},"PipelineSlugParam":{"description":"Slug of the pipeline","in":"path","name":"pipeline_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"PipelineTriggerSlugParam":{"description":"Slug of the pipeline trigger","in":"path","name":"pipeline_trigger_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"PipelineVersionIdParam":{"description":"Full immutable spec hash or unique short hash prefix for the persisted pipeline version spec.","in":"path","name":"spec_hash","required":true,"schema":{"example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","minLength":1,"type":"string"}},"PipelineWebhookDeliveryIDParam":{"description":"Sender-provided delivery identity covered by the verified signature.","in":"path","name":"delivery_id","required":true,"schema":{"maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._:-]+$","type":"string"}},"ProjectSlugParam":{"description":"Slug of the project","in":"path","name":"project_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"ProjectSlugQueryParam":{"description":"Project slug used to constrain query results.","in":"query","name":"project_slug","schema":{"$ref":"#/components/schemas/Slug"}},"ProjectsFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"project_created_at","enum":["project_created_at","project_updated_at","project_name"],"example":"project_created_at","type":"string"}},"ProofObservationSlugParam":{"in":"path","name":"observation_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"ProofReceiptSlugParam":{"description":"Slug of the immutable Proof Preview receipt","in":"path","name":"receipt_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"ProtectedEnvironmentConfirmationParam":{"description":"Exact environment slug required when mutating a protected runtime environment.","in":"query","name":"protected_environment_confirmation","schema":{"$ref":"#/components/schemas/Slug"}},"QueryExecutionFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"query_execution_executed_at","enum":["query_execution_executed_at"],"example":"query_execution_executed_at","type":"string"}},"QueryExecutionSlugParam":{"description":"Slug of the query execution","in":"path","name":"execution_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"QueryFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"query_created_at","enum":["query_created_at","query_updated_at","query_name"],"example":"query_created_at","type":"string"}},"QuerySlugParam":{"description":"Slug of the query","in":"path","name":"query_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"RevisionSlugParam":{"in":"path","name":"revision_slug","required":true,"schema":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}},"RoleSlugParam":{"description":"Slug of the role","in":"path","name":"role_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"RolesFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"role_created_at","enum":["role_created_at","role_updated_at","role_name"],"example":"role_created_at","type":"string"}},"RunFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"run_created_at","enum":["run_created_at"],"example":"run_created_at","type":"string"}},"RunSlugParam":{"description":"Run slug of the pipeline execution","in":"path","name":"run_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"RuntimeVariableKeyParam":{"description":"Runtime variable key. Keys are referenced in pipeline specs as `{{runtime.env.key}}`.","in":"path","name":"runtime_variable_key","required":true,"schema":{"example":"s3_prefix","maxLength":100,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"}},"SecurityAuditEventFieldParam":{"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"event_occurred_at","enum":["event_occurred_at"],"example":"event_occurred_at","type":"string","x-enum-varnames":["SecurityAuditEventOccurredAt"]}},"SecurityAuditEventOrderParam":{"description":"Sort order","in":"query","name":"order","schema":{"default":"desc","enum":["asc","desc"],"example":"desc","type":"string","x-enum-varnames":["SecurityAuditEventOrderAsc","SecurityAuditEventOrderDesc"]}},"SecurityAuditEventPageDirectionParam":{"description":"Page direction","in":"query","name":"direction","schema":{"default":"next","enum":["next","prev"],"example":"next","type":"string","x-enum-varnames":["SecurityAuditEventPageNext","SecurityAuditEventPagePrev"]}},"SlugParam":{"description":"Organization slug","in":"path","name":"slug","required":true,"schema":{"example":"acme-corp","maxLength":100,"minLength":1,"type":"string"}},"UserSlugParam":{"description":"Slug of the user","in":"path","name":"user_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"ValidationSlugParam":{"description":"Slug of the pipeline validation result","in":"path","name":"validation_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}}},"schemas":{"APIKey":{"properties":{"can_manage_api_keys":{"description":"Whether this key may manage organization API keys when its role grants the requested action.","type":"boolean"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"created_by_user_slug":{"$ref":"#/components/schemas/NullableSlug"},"description":{"example":"Used by the nightly workflow sync","type":"string"},"expires_at":{"$ref":"#/components/schemas/NullableTimestamp"},"last_used_at":{"$ref":"#/components/schemas/NullableTimestamp"},"name":{"$ref":"#/components/schemas/Name"},"revoked_at":{"$ref":"#/components/schemas/NullableTimestamp"},"role":{"$ref":"#/components/schemas/MemberRole"},"slug":{"$ref":"#/components/schemas/Slug"},"token_prefix":{"description":"Safe token prefix for identifying the key without exposing the secret.","example":"xto_12345678","type":"string"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","name","token_prefix","role","can_manage_api_keys","expires_at","revoked_at","last_used_at","created_at","updated_at"],"type":"object"},"APIKeyListResponse":{"description":"Paginated list of API keys","properties":{"api_keys":{"items":{"$ref":"#/components/schemas/APIKey"},"type":"array"},"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-02-15T10:30:00Z_abc123","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-02-15T10:10:00Z_xyz789","nullable":true,"type":"string"}},"required":["api_keys","has_more"],"type":"object"},"APIKeyWithToken":{"allOf":[{"$ref":"#/components/schemas/APIKey"},{"properties":{"token":{"description":"Raw API key token. Returned only once on create.","example":"xto_live_0123456789abcdef0123456789abcdef","type":"string"}},"required":["token"],"type":"object"}]},"AccountDeletionConfirmation":{"additionalProperties":false,"properties":{"confirmation":{"enum":["DELETE MY ACCOUNT"],"type":"string"}},"required":["confirmation"],"type":"object"},"AccountDeletionRequest":{"additionalProperties":false,"properties":{"completed_at":{"format":"date-time","type":"string"},"organization_removal_required":{"description":"Organizations where the requester is the only active member; explicitly remove them before deleting the account.","items":{"$ref":"#/components/schemas/Slug"},"type":"array"},"ownership_required":{"items":{"$ref":"#/components/schemas/Slug"},"type":"array"},"requested_at":{"format":"date-time","type":"string"},"slug":{"$ref":"#/components/schemas/Slug"},"state":{"enum":["pending","completed","failed","ownership_required"],"type":"string"}},"required":["slug","state","requested_at","ownership_required","organization_removal_required"],"type":"object"},"AlertDeliveryAttempt":{"additionalProperties":false,"description":"Alert-owned delivery attempt diagnostic row for one notification and destination. Provider response metadata is sanitized and must not contain raw provider responses or secret material.","properties":{"alert_policy_slug":{"$ref":"#/components/schemas/NullableSlug"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"destination_name":{"example":"Operations Email","nullable":true,"type":"string"},"destination_slug":{"$ref":"#/components/schemas/NullableSlug"},"destination_type":{"$ref":"#/components/schemas/AlertDestinationType"},"error_category":{"example":"EMAIL_DELIVERY_FAILED","nullable":true,"type":"string"},"error_message":{"example":"SMTP delivery failed","nullable":true,"type":"string"},"failed_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"notification_record_slug":{"$ref":"#/components/schemas/Slug"},"provider_attempt":{"example":1,"minimum":1,"type":"integer"},"provider_response_metadata":{"additionalProperties":true,"description":"Sanitized provider execution metadata safe for API and UI display.","type":"object"},"queued_at":{"$ref":"#/components/schemas/Timestamp"},"sent_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"slug":{"$ref":"#/components/schemas/Slug"},"status":{"$ref":"#/components/schemas/AlertDeliveryAttemptStatus"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","notification_record_slug","alert_policy_slug","destination_slug","destination_name","destination_type","status","provider_attempt","provider_response_metadata","error_category","error_message","queued_at","sent_at","failed_at","created_at","updated_at"],"type":"object"},"AlertDeliveryAttemptListResponse":{"additionalProperties":false,"description":"Paginated list of alert delivery attempt diagnostics","properties":{"alert_delivery_attempts":{"items":{"$ref":"#/components/schemas/AlertDeliveryAttempt"},"type":"array"},"has_more":{"example":false,"type":"boolean"},"next_cursor":{"example":"2026-03-16T18:40:00Z_alert-delivery-abc123","nullable":true,"type":"string"},"prev_cursor":{"example":"2026-03-16T18:20:00Z_alert-delivery-xyz789","nullable":true,"type":"string"}},"required":["alert_delivery_attempts","has_more"],"type":"object"},"AlertDeliveryAttemptStatus":{"description":"Alert delivery attempt execution state","enum":["unknown","queued","sent","failed"],"example":"sent","type":"string"},"AlertDestination":{"additionalProperties":false,"description":"Alert delivery destination safe for operator display.","properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"enabled":{"example":true,"type":"boolean"},"name":{"$ref":"#/components/schemas/Name"},"non_secret_config":{"$ref":"#/components/schemas/AlertDestinationConfig"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"$ref":"#/components/schemas/AlertDestinationType"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","name","type","non_secret_config","enabled","created_at","updated_at"],"type":"object"},"AlertDestinationConfig":{"description":"Non-secret alert destination adapter configuration. The destination type selects the matching config shape.","oneOf":[{"$ref":"#/components/schemas/EmailAlertDestinationConfig"}]},"AlertDestinationListResponse":{"additionalProperties":false,"description":"Paginated list of alert destinations","properties":{"alert_destinations":{"items":{"$ref":"#/components/schemas/AlertDestination"},"type":"array"},"has_more":{"example":false,"type":"boolean"},"next_cursor":{"example":"2026-03-16T18:40:00Z_ops-email","nullable":true,"type":"string"},"prev_cursor":{"example":"2026-03-16T18:20:00Z_platform-email","nullable":true,"type":"string"}},"required":["alert_destinations","has_more"],"type":"object"},"AlertDestinationTestJob":{"additionalProperties":false,"description":"Safe queue metadata for one enqueued test delivery job.","properties":{"kind":{"example":"email_send","type":"string"},"queue":{"example":"email","type":"string"},"state":{"example":"queued","type":"string"}},"required":["kind","queue","state"],"type":"object"},"AlertDestinationTestResponse":{"additionalProperties":false,"description":"Result returned after an alert destination test is accepted for asynchronous delivery.","properties":{"destination_slug":{"$ref":"#/components/schemas/Slug"},"destination_type":{"$ref":"#/components/schemas/AlertDestinationType"},"diagnostics_persisted":{"description":"False for the current ephemeral test path; no notification record or alert delivery attempt is created.","example":false,"type":"boolean"},"enqueued_jobs":{"items":{"$ref":"#/components/schemas/AlertDestinationTestJob"},"type":"array"},"recipient_count":{"example":2,"minimum":1,"type":"integer"},"status":{"description":"Test request acceptance state. Provider execution is asynchronous.","example":"accepted","type":"string"}},"required":["status","destination_slug","destination_type","recipient_count","diagnostics_persisted","enqueued_jobs"],"type":"object"},"AlertDestinationType":{"description":"Alert destination adapter type","enum":["unknown","email"],"example":"email","type":"string"},"AlertPolicy":{"additionalProperties":false,"description":"Alert policy that selects notification records and binds delivery destinations.","properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"destination_slugs":{"items":{"$ref":"#/components/schemas/Slug"},"minItems":1,"type":"array"},"enabled":{"example":true,"type":"boolean"},"environment_slug":{"$ref":"#/components/schemas/NullableSlug"},"lifecycle_state":{"$ref":"#/components/schemas/AlertPolicyLifecycleState"},"name":{"$ref":"#/components/schemas/Name"},"notification_type":{"$ref":"#/components/schemas/AlertPolicyNotificationType"},"project_slug":{"$ref":"#/components/schemas/NullableSlug"},"scope":{"$ref":"#/components/schemas/AlertPolicyScope"},"severity":{"$ref":"#/components/schemas/AlertPolicySeverity"},"slug":{"$ref":"#/components/schemas/Slug"},"source_action":{"$ref":"#/components/schemas/AlertPolicySourceAction"},"source_kind":{"$ref":"#/components/schemas/AlertPolicySourceKind"},"source_ref":{"$ref":"#/components/schemas/AlertPolicySourceRef"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","name","scope","project_slug","environment_slug","notification_type","severity","lifecycle_state","source_kind","source_action","source_ref","destination_slugs","enabled","created_at","updated_at"],"type":"object"},"AlertPolicyLifecycleState":{"allOf":[{"$ref":"#/components/schemas/NotificationLifecycleState"}],"description":"Optional lifecycle selector. Null or omitted matches any lifecycle state.","example":"open","nullable":true},"AlertPolicyListResponse":{"additionalProperties":false,"description":"Paginated list of alert policies","properties":{"alert_policies":{"items":{"$ref":"#/components/schemas/AlertPolicy"},"type":"array"},"has_more":{"example":false,"type":"boolean"},"next_cursor":{"example":"2026-03-16T18:40:00Z_pipeline-critical-email","nullable":true,"type":"string"},"prev_cursor":{"example":"2026-03-16T18:20:00Z_platform-warning-email","nullable":true,"type":"string"}},"required":["alert_policies","has_more"],"type":"object"},"AlertPolicyNotificationType":{"allOf":[{"$ref":"#/components/schemas/NotificationType"}],"description":"Optional notification type selector. Null or omitted matches any notification type.","example":"pipeline.retry_exhausted","nullable":true},"AlertPolicyOrganizationScopeWithEnvironment":{"description":"Validation-only shape rejected because organization-scoped alert policies must not include environment_slug.","properties":{"scope":{"enum":["organization"],"type":"string","x-enum-varnames":["AlertPolicyOrganizationScopeWithEnvironmentScopeOrganization"]}},"required":["scope","environment_slug"],"type":"object"},"AlertPolicyOrganizationScopeWithProject":{"description":"Validation-only shape rejected because organization-scoped alert policies must not include project_slug.","properties":{"scope":{"enum":["organization"],"type":"string","x-enum-varnames":["AlertPolicyOrganizationScopeWithProjectScopeOrganization"]}},"required":["scope","project_slug"],"type":"object"},"AlertPolicyProjectEnvironmentScopeWithoutEnvironment":{"description":"Validation-only shape rejected because project-environment alert policies require environment_slug.","not":{"required":["environment_slug"]},"properties":{"scope":{"enum":["project_environment"],"type":"string","x-enum-varnames":["AlertPolicyProjectEnvironmentScopeWithoutEnvironmentScopeProjectEnvironment"]}},"required":["scope"],"type":"object"},"AlertPolicyProjectEnvironmentScopeWithoutProject":{"description":"Validation-only shape rejected because project-environment alert policies require project_slug.","not":{"required":["project_slug"]},"properties":{"scope":{"enum":["project_environment"],"type":"string","x-enum-varnames":["AlertPolicyProjectEnvironmentScopeWithoutProjectScopeProjectEnvironment"]}},"required":["scope"],"type":"object"},"AlertPolicyProjectScopeWithEnvironment":{"description":"Validation-only shape rejected because project-scoped alert policies must not include environment_slug.","properties":{"scope":{"enum":["project"],"type":"string","x-enum-varnames":["AlertPolicyProjectScopeWithEnvironmentScopeProject"]}},"required":["scope","environment_slug"],"type":"object"},"AlertPolicyProjectScopeWithoutProject":{"description":"Validation-only shape rejected because project-scoped alert policies require project_slug.","not":{"required":["project_slug"]},"properties":{"scope":{"enum":["project"],"type":"string","x-enum-varnames":["AlertPolicyProjectScopeWithoutProjectScopeProject"]}},"required":["scope"],"type":"object"},"AlertPolicyScope":{"description":"Scope where an alert policy selects notifications","enum":["unknown","organization","project","project_environment"],"example":"project_environment","type":"string"},"AlertPolicySeverity":{"allOf":[{"$ref":"#/components/schemas/NotificationSeverity"}],"description":"Optional severity selector. Null or omitted matches any severity.","example":"critical","nullable":true},"AlertPolicySourceAction":{"allOf":[{"$ref":"#/components/schemas/EventAction"}],"description":"Optional notification source action selector. Null or omitted matches any source action.","example":"execute","nullable":true},"AlertPolicySourceKind":{"allOf":[{"$ref":"#/components/schemas/EventEntityType"}],"description":"Optional notification source entity selector. Null or omitted matches any source entity. Source refs match the candidate's generic `source_refs.source_ref` value; pipeline-run notifications also expose pipeline slug refs.","example":"pipeline_run","nullable":true},"AlertPolicySourceMetadata":{"additionalProperties":false,"description":"Supported event source entity and action choices for alert policies.","properties":{"source_actions":{"items":{"$ref":"#/components/schemas/EventAction"},"minItems":1,"type":"array"},"source_kind":{"$ref":"#/components/schemas/EventEntityType"}},"required":["source_kind","source_actions"],"type":"object"},"AlertPolicySourceMetadataResponse":{"additionalProperties":false,"description":"API-discoverable source selector metadata for alert policies.","properties":{"source_refs":{"items":{"$ref":"#/components/schemas/AlertPolicySourceRefOption"},"type":"array"},"sources":{"items":{"$ref":"#/components/schemas/AlertPolicySourceMetadata"},"type":"array"}},"required":["sources","source_refs"],"type":"object"},"AlertPolicySourceRef":{"description":"Optional selector for the selected source entity/action. Null or omitted matches any source ref.","example":"daily-ledger","maxLength":100,"minLength":1,"nullable":true,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"AlertPolicySourceRefOption":{"additionalProperties":false,"description":"Scoped source-ref selector option derived from event metadata.","properties":{"label":{"example":"Daily ledger","maxLength":255,"minLength":1,"type":"string"},"value":{"$ref":"#/components/schemas/Slug"}},"required":["value","label"],"type":"object"},"BigQueryConfig":{"additionalProperties":false,"description":"Google BigQuery connection configuration (no credentials)","properties":{"default_dataset":{"description":"Optional BigQuery dataset namespace used when an operation omits dataset. Tables live inside datasets, and fully qualified tables use project.dataset.table.","example":"analytics","minLength":1,"type":"string"},"location":{"description":"Optional BigQuery job location, such as US or EU. Set this when datasets are regional or multi-regional so query jobs and paged result reads run in the same location.","example":"EU","minLength":1,"type":"string"},"maximum_bytes_billed":{"description":"Per-job BigQuery maximumBytesBilled cost guard. BigQuery bills query jobs by bytes processed/scanned, so this caps provider-side query cost rather than response size.","example":1000000000,"format":"int64","minimum":1,"type":"integer"},"project_id":{"description":"BigQuery project used for jobs, dataset discovery, and writes","example":"analytics-prod","minLength":1,"type":"string"},"timeout_seconds":{"default":5,"description":"Request/job timeout in seconds, capped by configured execution limits","example":30,"maximum":300,"minimum":1,"type":"integer"}},"required":["project_id"],"type":"object"},"BigQueryCredentials":{"additionalProperties":false,"description":"BigQuery service-account credentials (write-only, never returned). The service-account JSON is encrypted at rest and never returned in data source responses.","properties":{"service_account_json":{"description":"Google service-account JSON with BigQuery job and table access","example":"{\"type\":\"service_account\",\"project_id\":\"analytics-prod\",\"client_email\":\"braidplane@analytics-prod.iam.gserviceaccount.com\",\"private_key\":\"-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n\",\"token_uri\":\"https://oauth2.googleapis.com/token\"}","minLength":1,"type":"string"}},"required":["service_account_json"],"type":"object"},"BigQueryStatement":{"additionalProperties":false,"description":"Braidplane BigQuery operation statement. Query operations use GoogleSQL with {{paramName}} placeholders that are converted to BigQuery named parameters. The insert_rows operation is BigQuery-specific and consumes Braidplane row payloads before sending BigQuery insertAll rows.","oneOf":[{"properties":{"operation":{"enum":["query"],"type":"string","x-enum-varnames":["BigQueryQueryStatementOperationQuery"]}},"required":["type","operation","sql"],"title":"BigQueryQueryStatement"},{"properties":{"operation":{"enum":["insert_rows"],"type":"string","x-enum-varnames":["BigQueryInsertRowsStatementOperationInsertRows"]}},"required":["type","operation","table","rows"],"title":"BigQueryInsertRowsStatement"}],"properties":{"dataset":{"description":"Target BigQuery dataset namespace for insert_rows; falls back to the connector default dataset when omitted. In project.dataset.table, this is the dataset segment.","example":"analytics","minLength":1,"type":"string"},"insert_id_prefix":{"description":"Optional prefix for BigQuery insertAll insertId values. insertId is BigQuery's best-effort duplicate suppression key for streaming inserts; omitted values send rows without insertIds. Supports safe runtime placeholders such as {{runtime.run_slug}}.","example":"{{runtime.run_slug}}","type":"string"},"maximum_bytes_billed":{"description":"Operation-local BigQuery maximumBytesBilled cost guard, capped by connector execution limits. This limits provider-side bytes processed/scanned, not response size.","example":1000000000,"format":"int64","minimum":1,"type":"integer"},"operation":{"description":"BigQuery-specific Braidplane operation mode. BigQuery itself receives jobs.query or insertAll requests; this field tells Braidplane which provider operation to call.","enum":["query","insert_rows"],"example":"query","type":"string"},"rows":{"description":"Braidplane row payload consumed by the BigQuery-specific insert_rows operation. Usually {{input}} for pipeline sinks; exact placeholders can resolve to native arrays of row objects before Braidplane sends BigQuery insertAll rows.","example":"{{input}}","oneOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"string"}]},"sql":{"description":"GoogleSQL statement with {{paramName}} placeholders. Required for query operations.","example":"SELECT * FROM `analytics.orders` WHERE region = {{region}}","minLength":1,"type":"string"},"table":{"description":"Target BigQuery table inside the dataset for insert_rows. In project.dataset.table, this is the table segment.","example":"orders","minLength":1,"type":"string"},"timeout_seconds":{"description":"Operation-local timeout in seconds, capped by connector execution limits","example":30,"maximum":300,"minimum":1,"type":"integer"},"type":{"description":"Data source type discriminator","enum":["bigquery"],"type":"string","x-enum-varnames":["BigQueryStatementTypeBigquery"]}},"required":["type"],"type":"object"},"BillingAddress":{"additionalProperties":false,"description":"User-level billing address","properties":{"city":{"example":"Warsaw","maxLength":120,"type":"string"},"country":{"description":"ISO 3166-1 alpha-2 country code","example":"PL","maxLength":2,"minLength":2,"type":"string"},"line1":{"example":"1 Main Street","maxLength":255,"type":"string"},"line2":{"example":"Suite 200","maxLength":255,"type":"string"},"postal_code":{"example":"00-001","maxLength":32,"type":"string"},"region":{"example":"Mazowieckie","maxLength":120,"type":"string"}},"type":"object"},"BillingProfile":{"description":"Billing source of truth for a user-owned or organization-owned subscription","properties":{"address":{"$ref":"#/components/schemas/BillingProfileAddress"},"billing_email":{"$ref":"#/components/schemas/Email"},"billing_name":{"example":"Acme Corp Sp. z o.o.","type":"string"},"country":{"example":"PL","maxLength":2,"minLength":2,"type":"string"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"owner_slug":{"$ref":"#/components/schemas/Slug"},"owner_type":{"$ref":"#/components/schemas/BillingProfileOwnerType"},"tax_id":{"example":"PL1234567890","nullable":true,"type":"string"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["owner_type","owner_slug","billing_name","billing_email","address","country","created_at","updated_at"],"type":"object"},"BillingProfileAddress":{"additionalProperties":false,"description":"Invoice address fields stored on the billing profile","properties":{"city":{"example":"Warsaw","maxLength":120,"type":"string"},"line1":{"example":"1 Main Street","maxLength":255,"type":"string"},"line2":{"example":"Suite 200","maxLength":255,"type":"string"},"postal_code":{"example":"00-001","maxLength":32,"type":"string"},"region":{"example":"Mazowieckie","maxLength":120,"type":"string"}},"type":"object"},"BillingProfileOwnerType":{"description":"Billing profile owner type. User-owned profiles are session-user scoped; organization-owned profiles are organization-admin scoped.","enum":["user","organization"],"type":"string"},"CollectionInfo":{"description":"Schema information for a MongoDB collection","properties":{"fields":{"description":"List of fields in the collection (inferred from samples)","items":{"$ref":"#/components/schemas/FieldInfo"},"type":"array"},"name":{"description":"Collection name","example":"users","type":"string"}},"required":["name","fields"],"type":"object"},"ColumnInfo":{"description":"Schema information for a database column","properties":{"name":{"description":"Column name","example":"email","type":"string"},"type":{"description":"Column data type","example":"varchar","type":"string"}},"required":["name","type"],"type":"object"},"CompileObservedProofReceiptInput":{"additionalProperties":false,"properties":{"candidate_slug":{"$ref":"#/components/schemas/Slug"},"observation_slugs":{"items":{"$ref":"#/components/schemas/Slug"},"maxItems":2,"minItems":1,"type":"array","uniqueItems":true}},"required":["candidate_slug","observation_slugs"],"type":"object"},"CreateBigQueryDataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/BigQueryConfig"},"credentials":{"$ref":"#/components/schemas/BigQueryCredentials"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":false,"description":"Whether the data source is read-only.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"enum":["bigquery"],"type":"string","x-enum-varnames":["CreateBigQueryDataSourceRequestTypeBigquery"]}},"required":["name","type","config","credentials"],"type":"object"},"CreateDataSourceRequest":{"description":"Request to create a new data source","discriminator":{"mapping":{"bigquery":"#/components/schemas/CreateBigQueryDataSourceRequest","ftp":"#/components/schemas/CreateFTPDataSourceRequest","git":"#/components/schemas/CreateGitDataSourceRequest","github":"#/components/schemas/CreateGitHubDataSourceRequest","gitlab":"#/components/schemas/CreateGitLabDataSourceRequest","http":"#/components/schemas/CreateHTTPDataSourceRequest","hubspot":"#/components/schemas/CreateHubSpotDataSourceRequest","mongodb":"#/components/schemas/CreateMongoDBDataSourceRequest","mysql":"#/components/schemas/CreateMySQLDataSourceRequest","postgres":"#/components/schemas/CreatePostgresDataSourceRequest","s3":"#/components/schemas/CreateS3DataSourceRequest","snowflake":"#/components/schemas/CreateSnowflakeDataSourceRequest"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CreatePostgresDataSourceRequest"},{"$ref":"#/components/schemas/CreateMySQLDataSourceRequest"},{"$ref":"#/components/schemas/CreateBigQueryDataSourceRequest"},{"$ref":"#/components/schemas/CreateSnowflakeDataSourceRequest"},{"$ref":"#/components/schemas/CreateHTTPDataSourceRequest"},{"$ref":"#/components/schemas/CreateHubSpotDataSourceRequest"},{"$ref":"#/components/schemas/CreateMongoDBDataSourceRequest"},{"$ref":"#/components/schemas/CreateFTPDataSourceRequest"},{"$ref":"#/components/schemas/CreateGitDataSourceRequest"},{"$ref":"#/components/schemas/CreateGitHubDataSourceRequest"},{"$ref":"#/components/schemas/CreateGitLabDataSourceRequest"},{"$ref":"#/components/schemas/CreateS3DataSourceRequest"}]},"CreateFTPDataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/FTPConfig"},"credentials":{"$ref":"#/components/schemas/FTPCredentials"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":false,"description":"Whether the data source is read-only.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"enum":["ftp"],"type":"string","x-enum-varnames":["CreateFTPDataSourceRequestTypeFtp"]}},"required":["name","type","config","credentials"],"type":"object"},"CreateGitDataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/GitConfig"},"credentials":{"$ref":"#/components/schemas/GitCredentials"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":false,"description":"Whether the data source is read-only.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"enum":["git"],"type":"string","x-enum-varnames":["CreateGitDataSourceRequestTypeGit"]}},"required":["name","type","config","credentials"],"type":"object"},"CreateGitHubDataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/GitHubRepositoryConfig"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":false,"description":"Whether the data source is read-only.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"enum":["github"],"type":"string","x-enum-varnames":["CreateGitHubDataSourceRequestTypeGithub"]}},"required":["name","type","config"],"type":"object"},"CreateGitLabDataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/GitLabRepositoryConfig"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":false,"description":"Whether the data source is read-only.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"enum":["gitlab"],"type":"string","x-enum-varnames":["CreateGitLabDataSourceRequestTypeGitlab"]}},"required":["name","type","config"],"type":"object"},"CreateHTTPDataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/HTTPConfig"},"credentials":{"$ref":"#/components/schemas/HTTPCredentials"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":false,"description":"Whether the data source is read-only.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"enum":["http"],"type":"string","x-enum-varnames":["CreateHTTPDataSourceRequestTypeHttp"]}},"required":["name","type","config","credentials"],"type":"object"},"CreateHubSpotDataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/HubSpotConfig"},"credentials":{"$ref":"#/components/schemas/HubSpotCredentials"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":true,"description":"Whether direct mutating operations and pipeline sink use are blocked for this data source.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"enum":["hubspot"],"type":"string","x-enum-varnames":["CreateHubSpotDataSourceRequestTypeHubspot"]}},"required":["name","type","config","credentials"],"type":"object"},"CreateMongoDBDataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/MongoDBConfig"},"credentials":{"$ref":"#/components/schemas/MongoDBCredentials"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":false,"description":"Whether the data source is read-only.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"enum":["mongodb"],"type":"string","x-enum-varnames":["CreateMongoDBDataSourceRequestTypeMongodb"]}},"required":["name","type","config","credentials"],"type":"object"},"CreateMySQLDataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/MySQLConfig"},"credentials":{"$ref":"#/components/schemas/MySQLCredentials"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":false,"description":"Whether the data source is read-only.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"enum":["mysql"],"type":"string","x-enum-varnames":["CreateMySQLDataSourceRequestTypeMysql"]}},"required":["name","type","config","credentials"],"type":"object"},"CreatePostgresDataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/PostgresConfig"},"credentials":{"$ref":"#/components/schemas/PostgresCredentials"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":false,"description":"Whether the data source is read-only.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"enum":["postgres"],"type":"string","x-enum-varnames":["CreatePostgresDataSourceRequestTypePostgres"]}},"required":["name","type","config","credentials"],"type":"object"},"CreateS3DataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/S3Config"},"credentials":{"$ref":"#/components/schemas/S3Credentials"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":false,"description":"Whether the data source is read-only.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"enum":["s3"],"type":"string","x-enum-varnames":["CreateS3DataSourceRequestTypeS3"]}},"required":["name","type","config","credentials"],"type":"object"},"CreateSnowflakeDataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/SnowflakeConfig"},"credentials":{"$ref":"#/components/schemas/SnowflakeCredentials"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":false,"type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"enum":["snowflake"],"type":"string"}},"required":["name","type","config","credentials"],"type":"object"},"CredentialKind":{"description":"Credential storage and runtime resolution kind","enum":["static_secret","oauth2_grant"],"example":"oauth2_grant","type":"string"},"CredentialMetadata":{"additionalProperties":false,"description":"Safe, non-secret credential metadata only. Plaintext secrets, OAuth codes, state values, token hashes, encrypted blobs, raw provider headers, and raw provider responses are never returned.","properties":{"kind":{"$ref":"#/components/schemas/CredentialKind"},"oauth":{"$ref":"#/components/schemas/CredentialOAuthMetadata"},"status":{"$ref":"#/components/schemas/CredentialStatus"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["kind","status","updated_at"],"type":"object"},"CredentialOAuthMetadata":{"additionalProperties":false,"description":"Safe OAuth2 provider grant metadata","properties":{"access_token_expires_at":{"description":"Access-token expiry. The token value is never returned.","format":"date-time","nullable":true,"type":"string"},"account":{"$ref":"#/components/schemas/OAuthProviderAccount"},"failure_code":{"description":"Safe machine-readable provider grant failure code","example":"invalid_grant","nullable":true,"type":"string"},"failure_message":{"description":"Safe operator-facing provider grant failure summary","example":"Provider grant was revoked","nullable":true,"type":"string"},"last_refreshed_at":{"description":"Last successful refresh timestamp","format":"date-time","nullable":true,"type":"string"},"provider":{"$ref":"#/components/schemas/ProviderKey"},"revoked_at":{"description":"Provider grant revocation timestamp","format":"date-time","nullable":true,"type":"string"},"scopes":{"description":"Granted provider scope names","example":["contacts.read"],"items":{"type":"string"},"type":"array"}},"required":["provider","scopes"],"type":"object"},"CredentialStatus":{"description":"Safe credential lifecycle state","enum":["pending","active","failed","revoked","rotated"],"example":"active","type":"string"},"DataSource":{"description":"Data source entity. Secret credential material is never returned; the credential property may include safe, non-sensitive metadata. Detail responses may include cache-only schema status and cached schema metadata; retrieving a data source never performs live provider schema introspection.","properties":{"config":{"oneOf":[{"$ref":"#/components/schemas/PostgresConfig"},{"$ref":"#/components/schemas/MySQLConfig"},{"$ref":"#/components/schemas/BigQueryConfig"},{"$ref":"#/components/schemas/GoogleWorkspaceConfig"},{"$ref":"#/components/schemas/SnowflakeConfig"},{"$ref":"#/components/schemas/HTTPConfig"},{"$ref":"#/components/schemas/HubSpotConfig"},{"$ref":"#/components/schemas/MongoDBConfig"},{"$ref":"#/components/schemas/FTPConfig"},{"$ref":"#/components/schemas/GitConfig"},{"$ref":"#/components/schemas/ProviderGitConfig"},{"$ref":"#/components/schemas/S3Config"}]},"connection_revision":{"description":"Revision bound to selection and consent; changes invalidate old requests.","format":"int64","type":"integer"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"credential":{"$ref":"#/components/schemas/CredentialMetadata"},"is_active":{"description":"Whether the data source is active","example":true,"type":"boolean"},"last_tested_at":{"description":"Timestamp of the last connection test","example":"2025-10-04T10:30:00Z","format":"date-time","nullable":true,"type":"string"},"name":{"$ref":"#/components/schemas/Name"},"organization_gitlab_connection":{"description":"This source explicitly uses the shared organization GitLab OAuth connection.","type":"boolean"},"read_only":{"description":"Whether the data source is read-only. Read-only data sources cannot be used as pipeline sinks.","example":false,"type":"boolean"},"schema":{"$ref":"#/components/schemas/IntrospectSchemaResponse"},"schema_diagnostic":{"$ref":"#/components/schemas/DataSourceSchemaDiagnostic"},"schema_status":{"$ref":"#/components/schemas/DataSourceSchemaStatus"},"slug":{"$ref":"#/components/schemas/Slug"},"test_error":{"description":"Error message from the last connection test (null if successful)","nullable":true,"type":"string"},"type":{"$ref":"#/components/schemas/DataSourceType"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["organization_gitlab_connection","slug","name","type","config","is_active","read_only","schema_status","schema","created_at","updated_at"],"type":"object"},"DataSourceBinding":{"description":"Environment-specific binding from a pipeline-scoped logical data source ref to a concrete data source.","properties":{"bound_at":{"$ref":"#/components/schemas/Timestamp"},"data_source_active":{"description":"Whether the bound concrete data source is active.","type":"boolean"},"data_source_name":{"$ref":"#/components/schemas/Name"},"data_source_read_only":{"description":"Whether the bound concrete data source is read-only.","type":"boolean"},"data_source_ref_name":{"$ref":"#/components/schemas/Name"},"data_source_ref_slug":{"$ref":"#/components/schemas/Slug"},"data_source_slug":{"$ref":"#/components/schemas/Slug"},"data_source_type":{"$ref":"#/components/schemas/DataSourceType"},"environment_slug":{"$ref":"#/components/schemas/Slug"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["pipeline_slug","data_source_ref_slug","data_source_ref_name","environment_slug","data_source_slug","data_source_name","data_source_type","data_source_active","data_source_read_only","bound_at","updated_at"],"type":"object"},"DataSourceBindingListResponse":{"description":"Paginated list of environment-specific data source bindings.","properties":{"data_source_bindings":{"items":{"$ref":"#/components/schemas/DataSourceBinding"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","nullable":true,"type":"string"}},"required":["data_source_bindings","has_more"],"type":"object"},"DataSourceBranch":{"additionalProperties":false,"description":"Remote branch visible from a git-compatible data source.","properties":{"is_default":{"description":"Whether this branch is the remote or configured default branch.","example":true,"type":"boolean"},"name":{"description":"Branch name without the refs/heads/ prefix.","example":"main","minLength":1,"type":"string"}},"required":["name","is_default"],"type":"object"},"DataSourceBranchListResponse":{"additionalProperties":false,"description":"List of remote branches for a git-compatible data source.","properties":{"branches":{"items":{"$ref":"#/components/schemas/DataSourceBranch"},"type":"array"}},"required":["branches"],"type":"object"},"DataSourceConfig":{"anyOf":[{"$ref":"#/components/schemas/PostgresConfig"},{"$ref":"#/components/schemas/MySQLConfig"},{"$ref":"#/components/schemas/BigQueryConfig"},{"$ref":"#/components/schemas/GoogleWorkspaceConfig"},{"$ref":"#/components/schemas/GoogleWorkspacePendingInstallConfig"},{"$ref":"#/components/schemas/SnowflakeConfig"},{"$ref":"#/components/schemas/HTTPConfig"},{"$ref":"#/components/schemas/HubSpotConfig"},{"$ref":"#/components/schemas/MongoDBConfig"},{"$ref":"#/components/schemas/FTPConfig"},{"$ref":"#/components/schemas/GitConfig"},{"$ref":"#/components/schemas/ProviderGitConfig"},{"$ref":"#/components/schemas/S3Config"}]},"DataSourceCredentials":{"anyOf":[{"$ref":"#/components/schemas/PostgresCredentials"},{"$ref":"#/components/schemas/MySQLCredentials"},{"$ref":"#/components/schemas/BigQueryCredentials"},{"$ref":"#/components/schemas/SnowflakeCredentials"},{"$ref":"#/components/schemas/HTTPCredentials"},{"$ref":"#/components/schemas/HubSpotCredentials"},{"$ref":"#/components/schemas/MongoDBCredentials"},{"$ref":"#/components/schemas/FTPCredentials"},{"$ref":"#/components/schemas/GitCredentials"},{"$ref":"#/components/schemas/S3Credentials"}]},"DataSourceListResponse":{"description":"Paginated list of data sources","properties":{"data_sources":{"items":{"$ref":"#/components/schemas/DataSource"},"type":"array"},"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-02-15T10:30:00Z_abc123","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-02-15T10:10:00Z_xyz789","nullable":true,"type":"string"}},"required":["data_sources","has_more"],"type":"object"},"DataSourceProofConfiguration":{"properties":{"available_targets":{"items":{"$ref":"#/components/schemas/ProofTargetContext"},"type":"array"},"data_source_slug":{"$ref":"#/components/schemas/Slug"},"enabled":{"type":"boolean"},"name":{"type":"string"},"provider":{"type":"string"},"publish_checks":{"type":"boolean"},"repository_id":{"type":"string"},"status":{"description":"Actionable explanation of eligibility or missing setup.","type":"string"},"targets":{"items":{"$ref":"#/components/schemas/ProofAssessmentTarget"},"type":"array"},"webhook_setup_required":{"description":"Enabled GitLab configuration needs webhook setup retried.","type":"boolean"}},"required":["data_source_slug","name","provider","repository_id","enabled","publish_checks","webhook_setup_required","status","targets","available_targets"],"type":"object"},"DataSourceProofSettings":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"expected_repository_id":{"description":"Must match the data source's current repository when enabling Proof; may be empty when disabling. Does not change it.","maxLength":255,"type":"string"},"publish_checks":{"type":"boolean"},"targets":{"items":{"$ref":"#/components/schemas/ProofAssessmentTarget"},"maxItems":100,"type":"array"}},"required":["enabled","publish_checks","expected_repository_id","targets"],"type":"object"},"DataSourceRef":{"description":"Pipeline-scoped logical data source reference used by portable pipeline specs.","properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"data_source_type":{"allOf":[{"$ref":"#/components/schemas/DataSourceType"}],"description":"Concrete data-source type required by this ref, or null when the ref was synced from a pipeline spec whose operation type maps to multiple connector families.","nullable":true},"name":{"$ref":"#/components/schemas/Name"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"required_capabilities":{"items":{"$ref":"#/components/schemas/DataSourceRefCapability"},"type":"array"},"slug":{"$ref":"#/components/schemas/Slug"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["pipeline_slug","slug","name","data_source_type","required_capabilities","created_at","updated_at"],"type":"object"},"DataSourceRefCapability":{"description":"Required behavior a concrete data source must support to satisfy a logical ref.","enum":["pipeline_source","pipeline_sink"],"example":"pipeline_source","type":"string","x-enum-varnames":["DataSourceRefCapabilityPipelineSource","DataSourceRefCapabilityPipelineSink"]},"DataSourceRefListResponse":{"description":"Paginated aggregate list of pipeline-scoped logical data source references in a project.","properties":{"data_source_refs":{"items":{"$ref":"#/components/schemas/DataSourceRef"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","nullable":true,"type":"string"}},"required":["data_source_refs","has_more"],"type":"object"},"DataSourceSchemaDiagnostic":{"description":"Safe operator-facing schema diagnostic from a failed import or local cached-schema rendering failure. Credentials and secret material must not be included.","properties":{"code":{"description":"Stable diagnostic code. Current schema diagnostic codes are documented in DATA_SOURCES.md.","example":"INVALID_OPENAPI","type":"string"},"message":{"description":"Sanitized failure message safe to show in the API, UI, and CLI.","example":"failed to parse OpenAPI spec","type":"string"}},"required":["code","message"],"type":"object"},"DataSourceSchemaImportJob":{"description":"Queue acceptance metadata for a schema import request.","properties":{"kind":{"example":"data_source_schema_import","type":"string"},"queue":{"example":"data_source_schema_import","type":"string"},"state":{"description":"Schema import enqueue outcome for this request.","enum":["queued","skipped_duplicate"],"example":"queued","type":"string"}},"required":["kind","queue","state"],"type":"object"},"DataSourceSchemaImportResponse":{"description":"Durable schema import state after a refresh/import request.","properties":{"data_source_slug":{"$ref":"#/components/schemas/Slug"},"enqueued":{"description":"True when this request inserted or accepted a new queue job; false when an import was already in flight.","example":true,"type":"boolean"},"finished_at":{"description":"Time the last terminal import state was recorded, when one exists.","format":"date-time","nullable":true,"type":"string"},"job":{"allOf":[{"$ref":"#/components/schemas/DataSourceSchemaImportJob"}],"nullable":true},"schema_diagnostic":{"$ref":"#/components/schemas/DataSourceSchemaDiagnostic"},"schema_status":{"$ref":"#/components/schemas/DataSourceSchemaStatus"},"started_at":{"description":"Time the current import attempt started, when one exists.","format":"date-time","nullable":true,"type":"string"}},"required":["data_source_slug","schema_status","enqueued"],"type":"object"},"DataSourceSchemaStatus":{"description":"Cache/import state for schema metadata. Detail reads are cache-only; refresh/import operations move the data source toward ready or return failure diagnostics.","enum":["not_imported","importing","failed","ready"],"example":"ready","type":"string","x-enum-varnames":["DataSourceSchemaStatusNotImported","DataSourceSchemaStatusImporting","DataSourceSchemaStatusFailed","DataSourceSchemaStatusReady"]},"DataSourceType":{"description":"Type of the data source","enum":["postgres","mysql","bigquery","google_workspace","snowflake","http","hubspot","mongodb","ftp","git","github","gitlab","s3"],"example":"postgres","type":"string"},"DocumentSchemaResponse":{"description":"Document database schema introspection result (MongoDB, etc.)","properties":{"collections":{"description":"List of collections in the database","items":{"$ref":"#/components/schemas/CollectionInfo"},"type":"array"},"schema_type":{"description":"Schema category identifier","enum":["document"],"example":"document","type":"string","x-enum-varnames":["DocumentSchemaResponseSchemaTypeDocument"]},"type":{"description":"Document database vendor type","enum":["mongodb"],"example":"mongodb","type":"string"}},"required":["schema_type","type","collections"],"type":"object"},"DriftImpactChange":{"properties":{"after":{"$ref":"#/components/schemas/DriftImpactValue"},"before":{"$ref":"#/components/schemas/DriftImpactValue"},"kind":{"type":"string"},"path":{"type":"string"},"reason_code":{"type":"string"},"severity":{"$ref":"#/components/schemas/DriftImpactReportSeverity"}},"required":["kind","path","before","after","severity","reason_code"],"type":"object"},"DriftImpactImpact":{"properties":{"edge_slug":{"type":"string"},"kind":{"enum":["pipeline","step","edge","sink","run","unknown_consumer"],"type":"string"},"message":{"type":"string"},"pipeline_slug":{"$ref":"#/components/schemas/NullableSlug"},"severity":{"$ref":"#/components/schemas/DriftImpactReportSeverity"},"step_slug":{"$ref":"#/components/schemas/NullableSlug"}},"required":["kind","severity","message"],"type":"object"},"DriftImpactReport":{"description":"Persisted schema drift or contract impact report.","oneOf":[{"required":["pipeline_slug"]},{"required":["data_source_slug"]}],"properties":{"changes":{"items":{"$ref":"#/components/schemas/DriftImpactChange"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"data_source_slug":{"$ref":"#/components/schemas/Slug"},"impacts":{"items":{"$ref":"#/components/schemas/DriftImpactImpact"},"type":"array"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"project_slug":{"$ref":"#/components/schemas/Slug"},"report_type":{"enum":["contract_impact","source_schema"],"type":"string"},"severity":{"$ref":"#/components/schemas/DriftImpactReportSeverity"},"slug":{"$ref":"#/components/schemas/Slug"},"status":{"$ref":"#/components/schemas/DriftImpactReportStatus"},"summary":{"type":"string"},"superseded_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["slug","report_type","status","severity","summary","changes","impacts","project_slug","created_at"],"type":"object"},"DriftImpactReportListResponse":{"properties":{"reports":{"items":{"$ref":"#/components/schemas/DriftImpactReport"},"type":"array"}},"required":["reports"],"type":"object"},"DriftImpactReportPreview":{"description":"Validation-only drift or impact preview that is not persisted.","properties":{"changes":{"items":{"$ref":"#/components/schemas/DriftImpactChange"},"type":"array"},"impacts":{"items":{"$ref":"#/components/schemas/DriftImpactImpact"},"type":"array"},"severity":{"$ref":"#/components/schemas/DriftImpactReportSeverity"},"summary":{"type":"string"}},"required":["severity","summary","changes","impacts"],"type":"object"},"DriftImpactReportSeverity":{"enum":["safe","warning","breaking"],"type":"string","x-enum-varnames":["DriftImpactReportSeveritySafe","DriftImpactReportSeverityWarning","DriftImpactReportSeverityBreaking"]},"DriftImpactReportStatus":{"enum":["open","superseded"],"type":"string","x-enum-varnames":["DriftImpactReportStatusOpen","DriftImpactReportStatusSuperseded"]},"DriftImpactValue":{"nullable":true,"oneOf":[{"type":"string"},{"type":"integer"},{"format":"double","type":"number"},{"type":"boolean"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}]},"Email":{"example":"john.doe@example.com","format":"email","maxLength":255,"minLength":3,"type":"string"},"EmailAlertDestinationConfig":{"additionalProperties":false,"description":"Non-secret email destination configuration safe for API and UI display.","properties":{"recipients":{"description":"Email recipients that receive alert-triggered notification deliveries.","example":["ops@example.com"],"items":{"$ref":"#/components/schemas/Email"},"minItems":1,"type":"array"}},"required":["recipients"],"type":"object"},"EmailVerificationRequest":{"additionalProperties":false,"properties":{"token":{"description":"The verification token sent to the user's email","example":"abc123-secure-token-xyz789","type":"string"}},"required":["token"],"type":"object"},"EnableProjectEnvironmentRequest":{"additionalProperties":false,"description":"Request to enable an environment for a project.","properties":{"is_default":{"default":false,"description":"Whether this environment should become the project's default environment.","example":true,"type":"boolean"},"protected_environment_confirmation":{"$ref":"#/components/schemas/NullableSlug"}},"type":"object"},"Environment":{"description":"Organization-owned runtime target catalog entry.","properties":{"color":{"$ref":"#/components/schemas/EnvironmentColor"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"delete_reason":{"example":"Superseded by prod","maxLength":2000,"nullable":true,"type":"string"},"deleted_at":{"$ref":"#/components/schemas/NullableTimestamp"},"description":{"allOf":[{"$ref":"#/components/schemas/EnvironmentDescription"}],"nullable":true},"name":{"$ref":"#/components/schemas/Name"},"protected":{"description":"Whether protected runtime-changing operations require explicit confirmation.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","name","description","color","protected","deleted_at","delete_reason","created_at","updated_at"],"type":"object"},"EnvironmentColor":{"description":"Controlled visual palette color for runtime environment identity.","enum":["blue","amber","red","green","purple","gray"],"example":"blue","type":"string","x-enum-varnames":["EnvironmentColorBlue","EnvironmentColorAmber","EnvironmentColorRed","EnvironmentColorGreen","EnvironmentColorPurple","EnvironmentColorGray"]},"EnvironmentDescription":{"description":"Optional environment description for operators.","example":"Protected production runtime target","maxLength":2000,"type":"string"},"EnvironmentListResponse":{"description":"Paginated list of environments","properties":{"environments":{"items":{"$ref":"#/components/schemas/Environment"},"type":"array"},"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-05-25T10:30:00Z_prod","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-05-25T10:10:00Z_dev","nullable":true,"type":"string"}},"required":["environments","has_more"],"type":"object"},"EnvironmentSecret":{"description":"Safe metadata for a write-only environment secret scoped to one organization runtime environment. Plaintext values are never returned.","properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"description":{"allOf":[{"$ref":"#/components/schemas/EnvironmentSecretDescription"}],"nullable":true},"environment_slug":{"$ref":"#/components/schemas/Slug"},"key":{"$ref":"#/components/schemas/EnvironmentSecretKey"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["environment_slug","key","description","created_at","updated_at"],"type":"object"},"EnvironmentSecretDescription":{"description":"Optional operator description for a write-only environment secret.","example":"API token used by this runtime environment","maxLength":2000,"type":"string"},"EnvironmentSecretKey":{"description":"Environment secret key referenced as `{{runtime.secrets.KEY}}` in pipeline specs.","example":"API_TOKEN","maxLength":100,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"EnvironmentSecretListResponse":{"description":"Paginated list of organization runtime environment secret metadata","properties":{"environment_secrets":{"items":{"$ref":"#/components/schemas/EnvironmentSecret"},"type":"array"},"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-05-25T10:30:00Z_API_TOKEN","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-05-25T10:10:00Z_WEBHOOK_SECRET","nullable":true,"type":"string"}},"required":["environment_secrets","has_more"],"type":"object"},"Error":{"description":"Structured error information with i18n support","properties":{"code":{"description":"Machine-readable error code for i18n translation","example":"ENTITY_NAME_INVALID","type":"string"},"detailed_error":{"description":"Optional sanitized supplemental detail included only when explicitly marked safe to disclose","example":"Invalid credentials format. Provide either a bearer token or both username and password.","type":"string"},"message":{"description":"Human-readable error message (fallback for untranslated codes)","example":"Entity name must be between 1 and 100 characters","type":"string"},"request_id":{"description":"Request ID for debugging and log correlation","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string"},"validation_errors":{"description":"Field-level validation errors for forms","items":{"$ref":"#/components/schemas/ValidationError"},"type":"array"}},"required":["code","message"],"type":"object"},"ErrorResponse":{"description":"Standard error response wrapper","properties":{"error":{"$ref":"#/components/schemas/Error"}},"required":["error"],"type":"object"},"EventAction":{"enum":["unknown","create","update","delete","restore","purge","execute","refresh","test_connection","rotate","revoke","reconcile","deploy","publish","enable","disable","accept","decline","expire","auto_accept","acknowledge","resolve","read"],"example":"update","type":"string"},"EventActorType":{"enum":["unknown","user","api_key","system","external"],"example":"user","type":"string"},"EventClass":{"enum":["unknown","activity","security_audit"],"example":"activity","type":"string","x-enum-varnames":["EventClassUnknown","EventClassActivity","EventClassSecurityAudit"]},"EventEntityType":{"enum":["unknown","organization","member","member_invitation","role","api_key","data_source","data_source_ref","data_source_binding","project","environment","project_environment","query","query_execution","pipeline","pipeline_deployment","pipeline_version","pipeline_run","pipeline_checkpoint","pipeline_trigger","notification"],"example":"pipeline","type":"string"},"EventListResponse":{"description":"Paginated list of durable event records","properties":{"event_log_retention_days":{"description":"Current online event-history retention boundary. Present on security-audit list responses.","maximum":30,"minimum":1,"nullable":true,"type":"integer"},"events":{"items":{"$ref":"#/components/schemas/EventRecord"},"type":"array"},"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-03-16T18:40:00Z_event-abc123","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-03-16T18:20:00Z_event-xyz789","nullable":true,"type":"string"}},"required":["events","has_more"],"type":"object"},"EventRecord":{"description":"Durable event record for organization activity or security-audit history.","properties":{"action":{"$ref":"#/components/schemas/EventAction"},"actor_slug":{"$ref":"#/components/schemas/NullableSlug"},"actor_type":{"$ref":"#/components/schemas/EventActorType"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"entity_slug":{"$ref":"#/components/schemas/NullableSlug"},"entity_type":{"$ref":"#/components/schemas/EventEntityType"},"event_class":{"$ref":"#/components/schemas/EventClass"},"metadata":{"additionalProperties":true,"description":"Sanitized event metadata safe for display.","type":"object"},"occurred_at":{"$ref":"#/components/schemas/Timestamp"},"request_id":{"description":"Request correlation identifier when the event originated from a correlated request.","nullable":true,"type":"string"},"schema_version":{"description":"Version of the stable event record contract.","format":"int32","minimum":1,"type":"integer"},"slug":{"$ref":"#/components/schemas/Slug"}},"required":["schema_version","event_class","slug","actor_type","actor_slug","entity_type","entity_slug","action","request_id","occurred_at","metadata","created_at"],"type":"object"},"ExecutePipelineRequest":{"additionalProperties":false,"description":"Request body for executing a pipeline. Input values are non-secret per-run values that pipeline specs can reference as `{{runtime.input.key}}`, including from query parameters in connector operations; run records expose only input key names.","properties":{"input":{"additionalProperties":true,"description":"Non-secret per-run input values keyed by names matching `[A-Za-z_][A-Za-z0-9_]*`. Values are available to this run as `{{runtime.input.key}}` and are never stored in run records, events, logs, or UI.","example":{"customer_id":"cus_123","dry_run":true},"type":"object"},"protected_environment_confirmation":{"$ref":"#/components/schemas/NullableSlug"},"run_slug":{"$ref":"#/components/schemas/Slug"}},"type":"object"},"ExecuteQueryRequest":{"additionalProperties":false,"description":"Request body for executing a query","properties":{"parameters":{"additionalProperties":true,"description":"Parameter values for the query (map of parameter name to value)","example":{"is_active":true,"limit":50},"type":"object"}},"required":["parameters"],"type":"object"},"ExecutionResultResultType":{"description":"Type discriminator for query execution results","enum":["sql","mongodb","http","object_rows","ftp","git","s3","workspace_file"],"example":"http","type":"string"},"FTPConfig":{"additionalProperties":false,"description":"FTP connection configuration (no credentials)","properties":{"allow_private_hosts":{"description":"Allow connections to private, loopback, or internal network hosts when private host access is available for the deployment.","example":false,"type":"boolean"},"base_path":{"description":"Optional base path used to resolve relative query paths","example":"/exports","type":"string"},"connect_timeout":{"description":"Connection timeout in seconds (optional, defaults to 5)","example":10,"maximum":300,"minimum":1,"type":"integer"},"host":{"description":"FTP server hostname or IP address","example":"ftp.example.com","minLength":1,"type":"string"},"port":{"default":21,"description":"FTP server port","example":21,"maximum":65535,"minimum":1,"type":"integer"}},"required":["host","port"],"type":"object"},"FTPCredentials":{"additionalProperties":false,"description":"FTP credentials (write-only, never returned)","properties":{"password":{"description":"FTP password","example":"SecurePass123!","minLength":1,"type":"string"},"username":{"description":"FTP username","example":"ftp_user","minLength":1,"type":"string"}},"required":["username","password"],"type":"object"},"FTPExecutionResult":{"description":"Result of FTP file operation execution","properties":{"duration_ms":{"description":"Execution duration in milliseconds","example":88,"type":"integer"},"error":{"description":"Error message (only present if success is false)","example":"FTP file not found","type":"string"},"payload":{"description":"FTP-specific result data","properties":{"column_names":{"description":"Parsed field names (read operation)","example":["col_0","col_1"],"items":{"type":"string"},"type":"array"},"file":{"allOf":[{"$ref":"#/components/schemas/FilePayloadMetadata"}],"nullable":true},"format":{"description":"Detected, selected, or serialized file format","enum":["csv","json","file","spreadsheet"],"example":"spreadsheet","type":"string"},"is_headless_csv":{"description":"Whether parsed CSV had no header row and synthetic column names were used","example":true,"type":"boolean"},"is_headless_spreadsheet":{"description":"Whether parsed spreadsheet data had no header row and synthetic column names were used","example":true,"type":"boolean"},"operation":{"description":"Executed FTP operation","enum":["read","write"],"example":"read","type":"string"},"range":{"description":"Selected spreadsheet A1 range when supplied","example":"A1:D200","type":"string"},"row_count":{"description":"Number of parsed rows (read operation)","example":2,"type":"integer"},"rows":{"description":"Parsed data rows (read operation)","items":{"additionalProperties":true,"type":"object"},"type":"array"},"sheet":{"description":"Selected spreadsheet sheet name when format is spreadsheet","example":"Orders","type":"string"},"target_path":{"description":"Resolved FTP target path used for the operation","example":"/exports/users-2026-03-21.csv","type":"string"},"written_bytes":{"description":"Number of bytes written (write operation)","example":128,"type":"integer"},"written_rows":{"description":"Number of rows written when serializing tabular content (write operation)","example":2,"type":"integer"}},"required":["operation","format"],"type":"object"},"result_type":{"allOf":[{"$ref":"#/components/schemas/ExecutionResultResultType"},{"enum":["ftp"],"type":"string"}],"description":"Type discriminator for FTP results","example":"ftp"},"success":{"description":"Whether execution succeeded","example":true,"type":"boolean"},"type":{"description":"Vendor type (always ftp)","example":"ftp","type":"string"}},"required":["result_type","type","payload","duration_ms","success"],"type":"object"},"FTPStatement":{"description":"FTP file operation statement with {{paramName}} placeholders","properties":{"content":{"description":"Content to write when operation is write. Supports JSON values, arrays, objects, raw CSV string, spreadsheet rows, or raw file content when format is file.","example":[{"email":"alice@example.com","id":1}],"oneOf":[{"additionalProperties":true,"type":"object"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"string"}]},"delimiter":{"description":"Optional CSV delimiter (single character)","example":",","maxLength":1,"minLength":1,"type":"string"},"format":{"default":"auto","description":"Optional parser override. Use file for native opaque file/blob payloads. Spreadsheet mode supports Excel workbook files and normalizes the selected sheet/range to rows.","enum":["auto","csv","json","file","spreadsheet"],"example":"spreadsheet","type":"string"},"has_header":{"description":"Optional CSV/spreadsheet header override","example":true,"type":"boolean"},"operation":{"default":"read","description":"FTP operation mode","enum":["read","write"],"example":"read","type":"string"},"overwrite":{"default":true,"description":"Whether to overwrite an existing target file when operation is write","example":true,"type":"boolean"},"path":{"description":"FTP file path with {{paramName}} placeholders","example":"users-{{date}}.xlsx","minLength":1,"type":"string"},"range":{"description":"Optional spreadsheet A1 range within the selected sheet. Sheet names must be supplied through `sheet`.","example":"A1:D200","minLength":1,"type":"string"},"sheet":{"description":"Optional spreadsheet sheet name. If omitted for reads, the first workbook sheet is used.","example":"Orders","minLength":1,"type":"string"},"type":{"description":"Data source type discriminator","enum":["ftp"],"type":"string"}},"required":["type","path"],"type":"object"},"FieldInfo":{"description":"Schema information for a MongoDB field","properties":{"name":{"description":"Field name","example":"_id","type":"string"},"type":{"description":"Inferred field type","example":"objectid","type":"string"}},"required":["name","type"],"type":"object"},"FileInfo":{"description":"Schema information for a file-backed dataset","properties":{"fields":{"description":"Parsed fields available in the file","items":{"$ref":"#/components/schemas/FieldInfo"},"type":"array"},"mime_type":{"type":"string"},"name":{"description":"File name or logical dataset identifier","example":"users.csv","type":"string"},"resource_id":{"description":"Stable provider resource ID when filenames are not unique.","type":"string"}},"required":["name","fields"],"type":"object"},"FilePayloadMetadata":{"description":"Safe metadata for native file/blob payloads. Raw bytes are never included in API responses, run metadata, or diagnostics.","properties":{"digest":{"description":"Hex-encoded digest of the file payload bytes.","example":"9b74c9897bac770ffc029102a200c5de","type":"string"},"digest_algorithm":{"description":"Digest algorithm used for the digest value.","example":"sha256","type":"string"},"filename":{"description":"Best-effort file name without path context, when supplied by the source.","example":"users.pdf","type":"string"},"mime_type":{"description":"Normalized media type for the file payload.","example":"application/pdf","type":"string"},"size_bytes":{"description":"Exact file payload size in bytes.","example":2048,"format":"int64","type":"integer"}},"required":["mime_type","size_bytes","digest_algorithm","digest"],"type":"object"},"FileSchemaDiagnostic":{"description":"Non-fatal file schema sampling diagnostic.","properties":{"code":{"description":"Stable diagnostic code for the sampling outcome.","example":"parse_failed","type":"string"},"message":{"description":"Human-readable safe diagnostic summary.","example":"Skipped file because fields could not be inferred from the sample.","type":"string"},"name":{"description":"Listed file name or logical dataset identifier.","example":"users.csv","type":"string"},"severity":{"description":"Diagnostic severity.","example":"warning","type":"string"},"target":{"description":"Provider target that was sampled.","example":"imports/users.csv","type":"string"}},"required":["name","target","severity","code","message"],"type":"object"},"FileSchemaResponse":{"description":"File data source schema introspection result (FTP, storage, etc.)","properties":{"diagnostics":{"description":"Non-fatal diagnostics for listed files that could not be sampled or parsed.","items":{"$ref":"#/components/schemas/FileSchemaDiagnostic"},"type":"array"},"files":{"description":"List of discovered files or datasets","items":{"$ref":"#/components/schemas/FileInfo"},"type":"array"},"schema_type":{"description":"Schema category identifier","enum":["file"],"example":"file","type":"string","x-enum-varnames":["File"]},"type":{"description":"File source vendor type","enum":["ftp","git","github","gitlab","s3","google_workspace"],"example":"git","type":"string"}},"required":["schema_type","type","files"],"type":"object"},"GitConfig":{"additionalProperties":false,"description":"Git repository connection configuration (no credentials)","properties":{"allow_private_hosts":{"description":"Allow connections to private, loopback, or internal network hosts when private host access is available for the deployment.","example":false,"type":"boolean"},"base_path":{"description":"Optional base path within the repository for resolving relative file paths","example":"data","type":"string"},"default_branch":{"description":"Default branch to use when none is specified","example":"main","minLength":1,"type":"string"},"repo_url":{"description":"Repository URL (HTTPS or SSH only; plain HTTP unsupported)","example":"https://github.com/example/repo.git","minLength":1,"type":"string"}},"required":["repo_url"],"type":"object"},"GitCredentials":{"additionalProperties":false,"description":"Git authentication credentials (write-only, never returned)","properties":{"auth_type":{"description":"Authentication method","enum":["https","ssh"],"example":"ssh","type":"string"},"ssh_known_hosts":{"description":"OpenSSH known_hosts entries trusted for SSH host key verification (required for SSH authentication, write-only)","example":"github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA...","minLength":1,"type":"string"},"ssh_passphrase":{"description":"Optional passphrase for the SSH private key (write-only)","example":"keypassphrase","minLength":1,"type":"string"},"ssh_private_key":{"description":"PEM-encoded SSH private key (write-only)","example":"-----BEGIN OPENSSH PRIVATE KEY-----\n...","minLength":1,"type":"string"},"token":{"description":"Personal access token for HTTPS authentication (write-only)","example":"ghp_xxxx","minLength":1,"type":"string"},"username":{"description":"Username for HTTPS authentication","example":"git-user","minLength":1,"type":"string"}},"required":["auth_type"],"type":"object"},"GitExecutionResult":{"description":"Result of Git file operation execution","properties":{"duration_ms":{"description":"Execution duration in milliseconds","example":120,"type":"integer"},"error":{"description":"Error message (only present if success is false)","example":"git file not found","type":"string"},"payload":{"description":"Git-specific result data","properties":{"column_names":{"description":"Parsed field names (read operation)","example":["id","email"],"items":{"type":"string"},"type":"array"},"file":{"allOf":[{"$ref":"#/components/schemas/FilePayloadMetadata"}],"nullable":true},"format":{"description":"Detected, selected, or serialized file format","enum":["csv","json","file","spreadsheet"],"example":"spreadsheet","type":"string"},"is_headless_csv":{"description":"Whether parsed CSV had no header row and synthetic column names were used","example":true,"type":"boolean"},"is_headless_spreadsheet":{"description":"Whether parsed spreadsheet data had no header row and synthetic column names were used","example":true,"type":"boolean"},"operation":{"description":"Executed Git operation","enum":["read","write"],"example":"read","type":"string"},"range":{"description":"Selected spreadsheet A1 range when supplied","example":"A1:D200","type":"string"},"row_count":{"description":"Number of parsed rows (read operation)","example":10,"type":"integer"},"rows":{"description":"Parsed data rows (read operation)","items":{"additionalProperties":true,"type":"object"},"type":"array"},"sheet":{"description":"Selected spreadsheet sheet name when format is spreadsheet","example":"Orders","type":"string"},"target_path":{"description":"Resolved repository-relative path used for the operation","example":"data/2026-04-01/users.csv","type":"string"},"written_bytes":{"description":"Number of bytes written (write operation)","example":128,"type":"integer"},"written_rows":{"description":"Number of rows written when serializing tabular content (write operation)","example":2,"type":"integer"}},"required":["operation","format"],"type":"object"},"result_type":{"allOf":[{"$ref":"#/components/schemas/ExecutionResultResultType"},{"enum":["git"],"type":"string"}],"description":"Type discriminator for Git results","example":"git"},"success":{"description":"Whether execution succeeded","example":true,"type":"boolean"},"type":{"description":"Vendor type (always git)","example":"git","type":"string"}},"required":["result_type","type","payload","duration_ms","success"],"type":"object"},"GitHubAppConnection":{"additionalProperties":false,"properties":{"account_id":{"format":"int64","minimum":1,"type":"integer"},"account_login":{"maxLength":100,"minLength":1,"type":"string"},"account_type":{"maxLength":50,"minLength":1,"type":"string"},"deleted_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"installation_id":{"format":"int64","minimum":1,"type":"integer"},"organization_slug":{"$ref":"#/components/schemas/Slug"},"repositories":{"items":{"$ref":"#/components/schemas/GitHubAppRepository"},"maxItems":1000,"type":"array"},"repository_selection":{"enum":["all","selected"],"type":"string"},"suspended_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true}},"required":["organization_slug","installation_id","account_id","account_login","account_type","repository_selection","repositories"],"type":"object"},"GitHubAppInstallStart":{"additionalProperties":false,"properties":{"authorization_url":{"format":"uri","type":"string"}},"required":["authorization_url"],"type":"object"},"GitHubAppRepository":{"additionalProperties":false,"properties":{"full_name":{"maxLength":256,"minLength":3,"type":"string"},"id":{"format":"int64","minimum":1,"type":"integer"},"name":{"maxLength":100,"minLength":1,"type":"string"},"owner_login":{"maxLength":100,"minLength":1,"type":"string"}},"required":["id","full_name","owner_login","name"],"type":"object"},"GitHubRepositoryConfig":{"additionalProperties":false,"description":"Organization GitHub App repository selection. Repository metadata and clone credentials are resolved by Braidplane.","properties":{"base_path":{"description":"Optional base path within the repository for resolving relative file paths","example":"data","type":"string"},"repository_id":{"description":"Stable GitHub repository ID from the organization GitHub App connection","example":"123456","minLength":1,"type":"string"}},"required":["repository_id"],"type":"object"},"GitLabRepositoryConfig":{"additionalProperties":false,"description":"Organization GitLab OAuth repository selection. The project ID is verified with the shared connection before persistence.","properties":{"base_path":{"description":"Optional base path within the repository for resolving relative file paths","example":"data","type":"string"},"project_id":{"description":"Stable numeric GitLab project ID","example":"123456","minLength":1,"type":"string"}},"required":["project_id"],"type":"object"},"GitStatement":{"description":"Git file read/write statement with {{paramName}} placeholders","properties":{"branch":{"description":"Optional git ref (branch, tag, or commit SHA) to read from or push to","example":"main","type":"string"},"content":{"description":"Content to write when operation is write. Supports JSON values, arrays of objects, raw CSV string, spreadsheet rows, or raw file content when format is file.","example":[{"email":"alice@example.com","id":1},{"email":"bob@example.com","id":2}],"oneOf":[{"additionalProperties":true,"type":"object"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"string"}]},"delimiter":{"description":"Optional CSV delimiter (single character); applies when format is CSV","example":",","maxLength":1,"minLength":1,"type":"string"},"format":{"default":"auto","description":"Optional file format override. Use file for native opaque file/blob payloads. Spreadsheet mode supports Excel workbook files and normalizes the selected sheet/range to rows.","enum":["auto","csv","json","file","spreadsheet"],"example":"spreadsheet","type":"string","x-enum-varnames":["GitStatementFormatAuto","GitStatementFormatCsv","GitStatementFormatJson","GitStatementFormatFile","GitStatementFormatSpreadsheet"]},"has_header":{"description":"Optional CSV/spreadsheet header override; if not specified, header presence is auto-detected","example":true,"type":"boolean"},"message":{"description":"Optional commit message for write operations","example":"add user records","type":"string"},"operation":{"default":"read","description":"Git file operation","enum":["read","write"],"example":"read","type":"string"},"path":{"description":"File path within the repository with {{paramName}} placeholders","example":"data/{{date}}/users.xlsx","minLength":1,"type":"string"},"range":{"description":"Optional spreadsheet A1 range within the selected sheet. Sheet names must be supplied through `sheet`.","example":"A1:D200","minLength":1,"type":"string"},"sheet":{"description":"Optional spreadsheet sheet name. If omitted for reads, the first workbook sheet is used.","example":"Orders","minLength":1,"type":"string"},"type":{"description":"Data source type discriminator","enum":["git"],"type":"string"}},"required":["type","path"],"type":"object"},"GoogleWorkspaceAccessMode":{"description":"Files explicitly authorized to Braidplane or created by it, through drive.file. Braidplane enforces read_only independently of Google permission.","enum":["selected_files"],"type":"string","x-enum-varnames":["GoogleWorkspaceAccessModeSelectedFiles"]},"GoogleWorkspaceConfig":{"additionalProperties":false,"description":"Connected Google account with managed OAuth credentials. Resource targets belong to statements.","properties":{"access_mode":{"$ref":"#/components/schemas/GoogleWorkspaceAccessMode"}},"type":"object"},"GoogleWorkspaceFile":{"additionalProperties":false,"properties":{"can_add_children":{"type":"boolean"},"can_download":{"type":"boolean"},"can_edit":{"type":"boolean"},"drive_id":{"type":"string"},"file_id":{"type":"string"},"mime_type":{"type":"string"},"name":{"type":"string"}},"required":["file_id","name","mime_type"],"type":"object"},"GoogleWorkspaceFileDiscovery":{"additionalProperties":false,"properties":{"files":{"items":{"$ref":"#/components/schemas/GoogleWorkspaceFile"},"type":"array"},"next_page_token":{"type":"string"}},"required":["files"],"type":"object"},"GoogleWorkspacePendingInstallConfig":{"additionalProperties":false,"properties":{"access_mode":{"$ref":"#/components/schemas/GoogleWorkspaceAccessMode"}},"type":"object"},"GoogleWorkspacePicker":{"additionalProperties":false,"properties":{"account_email":{"description":"Account hint; backend file verification remains authoritative.","type":"string"},"app_id":{"description":"Google Cloud project number containing the Workspace OAuth client.","type":"string"},"client_id":{"type":"string"},"developer_key":{"description":"Browser API key restricted by API and HTTP referrer; not an OAuth credential.","type":"string"},"expected_revision":{"format":"int64","type":"integer"}},"required":["client_id","developer_key","app_id","account_email","expected_revision"],"type":"object"},"GoogleWorkspaceSchemaResponse":{"additionalProperties":false,"properties":{"spreadsheet_id":{"type":"string"},"title":{"type":"string"},"worksheets":{"items":{"$ref":"#/components/schemas/GoogleWorkspaceWorksheet"},"type":"array"}},"required":["spreadsheet_id","title","worksheets"],"type":"object"},"GoogleWorkspaceStatement":{"additionalProperties":false,"description":"Per-operation spreadsheet or Drive file target. Creates make a new file; updates use a stable file ID. Writes are not automatically retried. Native document editing/export and filename upsert are unsupported.","oneOf":[{"properties":{"operation":{"enum":["read"]},"resource":{"enum":["spreadsheet"]}},"required":["spreadsheet_id","worksheet_id","range"]},{"properties":{"operation":{"enum":["update"]},"resource":{"enum":["spreadsheet"]}},"required":["spreadsheet_id","worksheet_id","range","columns","rows"]},{"properties":{"operation":{"enum":["list"]},"resource":{"enum":["file"]}}},{"properties":{"operation":{"enum":["read"]},"resource":{"enum":["file"]}},"required":["file_id","format"]},{"properties":{"operation":{"enum":["create"]},"resource":{"enum":["file"]}},"required":["folder_id","name","format","content"]},{"properties":{"operation":{"enum":["update"]},"resource":{"enum":["file"]}},"required":["file_id","format","content"]}],"properties":{"columns":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array","uniqueItems":true},"content":{"description":"Inline content or the exact {{input}} binding for pipeline writes.","oneOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}]},"delimiter":{"maxLength":1,"type":"string"},"drive_id":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"file_id":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"folder_id":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"format":{"enum":["json","csv","file"],"type":"string"},"has_header":{"type":"boolean"},"mime_type":{"maxLength":256,"type":"string"},"name":{"maxLength":256,"minLength":1,"type":"string"},"operation":{"enum":["list","read","create","update"],"type":"string"},"page_token":{"maxLength":2048,"type":"string"},"range":{"maxLength":64,"pattern":"^[A-Z]+[1-9][0-9]*:[A-Z]+[1-9][0-9]*$","type":"string"},"resource":{"enum":["spreadsheet","file"],"type":"string"},"rows":{"oneOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"enum":["{{input}}"],"type":"string"}]},"spreadsheet_id":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"type":{"enum":["google_workspace"],"type":"string"},"worksheet_id":{"minimum":0,"type":"integer"}},"required":["type","resource","operation"],"type":"object"},"GoogleWorkspaceVerificationRequest":{"additionalProperties":false,"properties":{"expected_revision":{"format":"int64","minimum":0,"type":"integer"},"file_ids":{"items":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"maxItems":100,"minItems":1,"type":"array","uniqueItems":true}},"required":["file_ids","expected_revision"],"type":"object"},"GoogleWorkspaceWorksheet":{"additionalProperties":false,"description":"Grid worksheet metadata. Statements use worksheet_id and resolve the current title at execution.","properties":{"column_count":{"minimum":1,"type":"integer"},"row_count":{"minimum":1,"type":"integer"},"title":{"type":"string"},"worksheet_id":{"minimum":0,"type":"integer"}},"required":["worksheet_id","title","row_count","column_count"],"type":"object"},"HTTPConfig":{"additionalProperties":false,"description":"HTTP endpoint configuration for connection checks","properties":{"allow_private_hosts":{"description":"Allow connections to private, loopback, or internal network hosts when private host access is available for the deployment.","example":false,"type":"boolean"},"base_url":{"description":"Base URL of the HTTP service","example":"https://api.example.com","format":"uri","minLength":1,"type":"string"},"health_path":{"description":"Health endpoint path (defaults to /)","example":"/health","minLength":1,"type":"string"},"openapi_fetch_timeout_seconds":{"description":"OpenAPI document fetch timeout in seconds (optional, defaults to 10)","example":10,"maximum":60,"minimum":1,"type":"integer"},"openapi_url":{"description":"Optional OpenAPI document URL used for schema import","example":"https://api.example.com/openapi.json","format":"uri","minLength":1,"type":"string"},"timeout_seconds":{"description":"Request timeout in seconds (optional, defaults to 5)","example":10,"maximum":300,"minimum":1,"type":"integer"}},"required":["base_url"],"type":"object"},"HTTPCredentials":{"additionalProperties":false,"description":"HTTP authentication credentials (write-only, optional)","properties":{"bearer_token":{"description":"Bearer token used as Authorization header","example":"token-123","minLength":1,"type":"string"},"password":{"description":"Password for HTTP basic authentication","example":"secret","minLength":1,"type":"string"},"username":{"description":"Username for HTTP basic authentication","example":"api_user","minLength":1,"type":"string"}},"type":"object"},"HTTPExecutionResult":{"description":"Result of HTTP API request execution","properties":{"duration_ms":{"description":"Execution duration in milliseconds","example":1523,"type":"integer"},"error":{"description":"Error message (only present if success is false)","example":"HTTP request failed: connection refused","type":"string"},"payload":{"description":"HTTP-specific result data","properties":{"body":{"description":"JSON-safe HTTP response body for JSON/text/CSV responses. Native file responses omit raw bytes and use file metadata instead.","example":{"data":{"users":152},"message":"Success"},"nullable":true},"file":{"allOf":[{"$ref":"#/components/schemas/FilePayloadMetadata"}],"nullable":true},"headers":{"additionalProperties":{"type":"string"},"description":"HTTP response headers","example":{"Content-Type":"application/json","X-RateLimit-Remaining":"42"},"type":"object"},"status_code":{"description":"HTTP response status code","example":200,"type":"integer"}},"required":["status_code"],"type":"object"},"result_type":{"allOf":[{"$ref":"#/components/schemas/ExecutionResultResultType"},{"enum":["http"],"type":"string"}],"description":"Type discriminator for HTTP results","example":"http"},"success":{"description":"Whether execution succeeded","example":true,"type":"boolean"},"type":{"description":"Vendor type (always http)","example":"http","type":"string"}},"required":["result_type","type","payload","duration_ms","success"],"type":"object"},"HTTPSchemaResponse":{"description":"HTTP/OpenAPI schema introspection result","properties":{"operations":{"description":"List of API operations from OpenAPI spec","items":{"$ref":"#/components/schemas/OperationInfo"},"type":"array"},"schema_type":{"description":"Schema category identifier","enum":["http"],"example":"http","type":"string"}},"required":["schema_type","operations"],"type":"object"},"HTTPStatement":{"description":"HTTP API request statement with {{paramName}} placeholders","properties":{"body":{"description":"Request body (JSON object or {{paramName}} placeholders)","example":{"filter":"{{filter}}"}},"headers":{"additionalProperties":{"type":"string"},"description":"HTTP headers (supports {{paramName}} placeholders in values)","example":{"Authorization":"Bearer {{token}}"},"type":"object"},"method":{"description":"HTTP method","enum":["GET","POST","PUT","DELETE","PATCH","HEAD"],"example":"GET","type":"string"},"path":{"description":"API endpoint path with {{paramName}} placeholders","example":"/users/{{user_id}}/posts","minLength":1,"type":"string"},"query_params":{"additionalProperties":true,"description":"Query string parameters (supports {{paramName}} placeholders in values)","example":{"limit":"{{limit}}","offset":"{{offset}}"},"type":"object"},"type":{"description":"Data source type discriminator","enum":["http"],"type":"string"}},"required":["type","method","path"],"type":"object"},"HubSpotConfig":{"additionalProperties":false,"description":"HubSpot API configuration (base URL is fixed by the provider)","properties":{"timeout_seconds":{"description":"Request timeout in seconds (optional, defaults to 5)","example":10,"maximum":300,"minimum":1,"type":"integer"}},"type":"object"},"HubSpotCredentials":{"additionalProperties":false,"description":"HubSpot private app credentials (write-only, never returned)","properties":{"private_app_token":{"description":"HubSpot private app token","example":"pat-na1-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","minLength":1,"type":"string"}},"required":["private_app_token"],"type":"object"},"HubSpotFilter":{"additionalProperties":false,"description":"HubSpot CRM search filter","properties":{"high_value":{"description":"Secondary value used for BETWEEN filters. Supports {{paramName}} placeholders."},"operator":{"description":"HubSpot search operator","enum":["EQ","NEQ","LT","LTE","GT","GTE","BETWEEN","IN","NOT_IN","HAS_PROPERTY","NOT_HAS_PROPERTY","CONTAINS_TOKEN"],"example":"EQ","type":"string"},"property_name":{"description":"HubSpot property name to filter on","example":"email","minLength":1,"type":"string"},"value":{"description":"Primary filter value. Supports {{paramName}} placeholders."},"values":{"description":"Multi-value payload used by IN and NOT_IN filters. Supports {{paramName}} placeholders in values.","items":{},"type":"array"}},"required":["property_name","operator"],"type":"object"},"HubSpotFilterGroup":{"additionalProperties":false,"description":"HubSpot CRM search filter group","properties":{"filters":{"items":{"$ref":"#/components/schemas/HubSpotFilter"},"type":"array"}},"required":["filters"],"type":"object"},"HubSpotStatement":{"additionalProperties":false,"description":"HubSpot CRM read or idempotent upsert operation with {{paramName}} placeholders","oneOf":[{"properties":{"operation":{"enum":["list","search"],"type":"string"}},"required":["type","object_type"],"title":"HubSpotReadStatement"},{"properties":{"operation":{"enum":["upsert"],"type":"string"}},"required":["type","object_type","operation","id_property","property_mapping","rows"],"title":"HubSpotUpsertStatement"}],"properties":{"after":{"description":"Pagination cursor used to fetch the next page","example":"1024","type":"string"},"filter_groups":{"description":"Optional HubSpot filter groups","items":{"$ref":"#/components/schemas/HubSpotFilterGroup"},"type":"array"},"id_property":{"description":"HubSpot property with a unique-value constraint used as the stable upsert key","example":"external_customer_id","minLength":1,"type":"string"},"limit":{"description":"Maximum rows to return in a page","example":100,"maximum":200,"minimum":1,"type":"integer"},"object_type":{"description":"Supported HubSpot CRM object name or discovered custom objectTypeId","example":"contacts","pattern":"^(contacts|companies|deals|2-[1-9][0-9]*)$","type":"string"},"operation":{"default":"search","description":"HubSpot CRM operation","enum":["list","search","upsert"],"example":"search","type":"string"},"properties":{"description":"Properties to project into the result rows","example":["firstname","lastname","email"],"items":{"type":"string"},"type":"array"},"property_mapping":{"additionalProperties":{"minLength":1,"type":"string"},"description":"Explicit mapping from input row fields to writable HubSpot properties. One target must equal id_property.","example":{"company":"company","customer_id":"external_customer_id","email":"email"},"minProperties":1,"type":"object"},"query":{"description":"Optional HubSpot free-text search query","example":"acme","type":"string"},"rows":{"description":"Braidplane row payload consumed by upsert. Usually {{input}} for pipeline sinks; exact placeholders resolve to native arrays of row objects.","example":"{{input}}","oneOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"string"}]},"sorts":{"description":"Optional HubSpot sort expressions","example":["-createdate"],"items":{"type":"string"},"type":"array"},"type":{"description":"Data source type discriminator","enum":["hubspot"],"type":"string"}},"required":["type","object_type"],"type":"object"},"IntrospectSchemaResponse":{"discriminator":{"mapping":{"document":"#/components/schemas/DocumentSchemaResponse","file":"#/components/schemas/FileSchemaResponse","http":"#/components/schemas/HTTPSchemaResponse","object_api":"#/components/schemas/ObjectAPISchemaResponse","sql":"#/components/schemas/SQLSchemaResponse"},"propertyName":"schema_type"},"oneOf":[{"$ref":"#/components/schemas/SQLSchemaResponse"},{"$ref":"#/components/schemas/HTTPSchemaResponse"},{"$ref":"#/components/schemas/ObjectAPISchemaResponse"},{"$ref":"#/components/schemas/DocumentSchemaResponse"},{"$ref":"#/components/schemas/FileSchemaResponse"}]},"MFAChallenge":{"additionalProperties":false,"properties":{"challenge_token":{"description":"Opaque one-time token identifying the pending MFA challenge","example":"mfa_1234567890abcdef","minLength":1,"type":"string"},"expires_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["challenge_token","expires_at"],"type":"object"},"MFAVerification":{"additionalProperties":false,"properties":{"challenge_token":{"description":"Opaque one-time token returned by the login challenge","example":"mfa_1234567890abcdef","minLength":1,"type":"string"},"code":{"description":"Six-digit email MFA code","example":"123456","maxLength":6,"minLength":6,"pattern":"^[0-9]{6}$","type":"string"}},"required":["challenge_token","code"],"type":"object"},"Member":{"properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"email":{"$ref":"#/components/schemas/Email"},"role":{"$ref":"#/components/schemas/MemberRole"},"updated_at":{"$ref":"#/components/schemas/Timestamp"},"user_slug":{"$ref":"#/components/schemas/Slug"}},"required":["user_slug","email","role","created_at","updated_at"],"type":"object"},"MemberInvitation":{"description":"Organization member invitation. Raw invitation tokens are never included in this response.","properties":{"accepted_at":{"$ref":"#/components/schemas/NullableTimestamp"},"accepted_user_slug":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"nullable":true},"created_at":{"$ref":"#/components/schemas/Timestamp"},"declined_at":{"$ref":"#/components/schemas/NullableTimestamp"},"email":{"$ref":"#/components/schemas/Email"},"expired_at":{"$ref":"#/components/schemas/NullableTimestamp"},"expires_at":{"$ref":"#/components/schemas/Timestamp"},"invited_by_user_slug":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"nullable":true},"last_sent_at":{"$ref":"#/components/schemas/Timestamp"},"organization_slug":{"$ref":"#/components/schemas/Slug"},"revoked_at":{"$ref":"#/components/schemas/NullableTimestamp"},"role":{"$ref":"#/components/schemas/MemberRole"},"slug":{"$ref":"#/components/schemas/Slug"},"status":{"$ref":"#/components/schemas/MemberInvitationStatus"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","organization_slug","email","role","status","invited_by_user_slug","accepted_user_slug","expires_at","last_sent_at","accepted_at","declined_at","revoked_at","expired_at","created_at","updated_at"],"type":"object"},"MemberInvitationAcceptance":{"description":"Accepted invitation and the member created by acceptance","properties":{"invitation":{"$ref":"#/components/schemas/MemberInvitation"},"member":{"$ref":"#/components/schemas/Member"}},"required":["invitation","member"],"type":"object"},"MemberInvitationAcceptanceTokenRequest":{"additionalProperties":false,"description":"One-time invitation token and explicit legal acceptance received out of band","properties":{"terms_accepted":{"description":"Explicit confirmation that the displayed terms and privacy notice were accepted.","enum":[true],"type":"boolean"},"terms_document_version":{"description":"Version identifier displayed when acceptance was collected.","example":"pre-alpha-2026-07-19","minLength":1,"type":"string"},"token":{"description":"Raw invitation token from the email link. This value is never returned by API responses.","example":"invitation-token-abc123","minLength":1,"type":"string"}},"required":["token","terms_accepted","terms_document_version"],"type":"object"},"MemberInvitationListResponse":{"description":"Paginated list of member invitations","properties":{"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"invitations":{"items":{"$ref":"#/components/schemas/MemberInvitation"},"type":"array"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-02-15T10:30:00Z_abc123","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-02-15T10:10:00Z_xyz789","nullable":true,"type":"string"}},"required":["invitations","has_more"],"type":"object"},"MemberInvitationStatus":{"description":"Lifecycle state for an organization member invitation","enum":["pending","accepted","declined","revoked","expired"],"example":"pending","type":"string","x-enum-varnames":["MemberInvitationStatusPending","MemberInvitationStatusAccepted","MemberInvitationStatusDeclined","MemberInvitationStatusRevoked","MemberInvitationStatusExpired"]},"MemberInvitationTokenRequest":{"additionalProperties":false,"description":"One-time invitation token received out of band","properties":{"token":{"description":"Raw invitation token from the email link. This value is never returned by API responses.","example":"invitation-token-abc123","minLength":1,"type":"string"}},"required":["token"],"type":"object"},"MemberListResponse":{"description":"Paginated list of members","properties":{"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"members":{"items":{"$ref":"#/components/schemas/Member"},"type":"array"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-02-15T10:30:00Z_abc123","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-02-15T10:10:00Z_xyz789","nullable":true,"type":"string"}},"required":["members","has_more"],"type":"object"},"MemberRole":{"description":"Slug of the member's role within the organization. Default roles are 'admin' (full access) and 'viewer' (read-only).","example":"viewer","maxLength":100,"minLength":1,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"MongoDBConfig":{"additionalProperties":false,"description":"MongoDB connection configuration (no credentials)","properties":{"allow_private_hosts":{"description":"Allow connections to private, loopback, or internal network hosts when private host access is available for the deployment.","example":false,"type":"boolean"},"auth_database":{"description":"Authentication database (optional, defaults to admin)","example":"admin","minLength":1,"type":"string"},"connect_timeout":{"description":"Connection timeout in seconds (optional, defaults to 5)","example":10,"maximum":300,"minimum":1,"type":"integer"},"database":{"description":"Database name","example":"app_data","minLength":1,"type":"string"},"host":{"description":"MongoDB server hostname or IP address","example":"mongodb.example.com","minLength":1,"type":"string"},"port":{"default":27017,"description":"MongoDB server port","example":27017,"maximum":65535,"minimum":1,"type":"integer"}},"required":["host","port","database"],"type":"object"},"MongoDBCredentials":{"additionalProperties":false,"description":"MongoDB credentials (write-only, never returned)","properties":{"password":{"description":"MongoDB password","example":"SecurePass789!","minLength":1,"type":"string"},"username":{"description":"MongoDB username","example":"app_user","minLength":1,"type":"string"}},"required":["username","password"],"type":"object"},"MongoDBExecutionResult":{"description":"Result of MongoDB operation execution","properties":{"duration_ms":{"description":"Execution duration in milliseconds","example":125,"type":"integer"},"error":{"description":"Error message (only present if success is false)","example":"Connection to MongoDB lost","type":"string"},"payload":{"description":"MongoDB-specific result data","properties":{"deleted_count":{"description":"Number of documents deleted (for delete operations)","example":3,"format":"int64","type":"integer"},"document_count":{"description":"Document count (for count_documents operation)","example":42,"type":"integer"},"documents":{"description":"Result documents (for find/aggregate operations)","example":[{"_id":"507f1f77bcf86cd799439011","email":"alice@example.com","name":"Alice"}],"items":{"additionalProperties":true,"type":"object"},"type":"array"},"inserted_id":{"description":"Inserted document ID (for insert_one operation)","example":"507f1f77bcf86cd799439011"},"matched_count":{"description":"Number of documents matched (for update operations)","example":1,"format":"int64","type":"integer"},"modified_count":{"description":"Number of documents modified (for update operations)","example":1,"format":"int64","type":"integer"},"operation_type":{"description":"MongoDB operation that was executed","enum":["find","aggregate","count_documents","insert_one","update_one","delete_one","update_many","delete_many"],"example":"find","type":"string"},"upserted_count":{"description":"Number of documents upserted (for update operations)","example":0,"format":"int64","type":"integer"},"upserted_id":{"description":"Upserted document ID (for update operations with upsert)"}},"required":["operation_type"],"type":"object"},"result_type":{"allOf":[{"$ref":"#/components/schemas/ExecutionResultResultType"},{"enum":["mongodb"],"type":"string"}],"description":"Type discriminator for MongoDB results","example":"mongodb"},"success":{"description":"Whether execution succeeded","example":true,"type":"boolean"},"type":{"description":"Vendor type (mongodb)","example":"mongodb","type":"string"}},"required":["result_type","type","payload","duration_ms","success"],"type":"object"},"MongoDBStatement":{"description":"MongoDB query statement with native structure and {{paramName}} placeholders","properties":{"collection":{"description":"MongoDB collection name","example":"users","minLength":1,"type":"string"},"document":{"additionalProperties":true,"description":"Document to insert or update (supports {{paramName}} placeholders in values).\nOnly used for write operations (insert_one, update_one, update_many, delete_one, delete_many).\nFor find and aggregate operations, this field is ignored.\n","example":{"email":"value","full_name":"value","is_active":true},"type":"object"},"filter":{"additionalProperties":true,"description":"MongoDB query filter (supports {{paramName}} placeholders in values)","example":{"_id":"{{user_id}}"},"type":"object"},"limit_value":{"description":"Maximum documents to return","example":100,"minimum":1,"type":"integer"},"operation":{"description":"MongoDB operation type","enum":["find","aggregate","count_documents","insert_one","update_one","delete_one","update_many","delete_many"],"example":"find","type":"string"},"projection":{"additionalProperties":{"enum":[0,1],"type":"integer"},"description":"MongoDB field projection","example":{"_id":1,"email":1},"type":"object"},"sort":{"additionalProperties":{"enum":[1,-1],"type":"integer"},"description":"MongoDB sort specification","example":{"created_at":-1},"type":"object"},"type":{"description":"Data source type discriminator","enum":["mongodb"],"type":"string"}},"required":["type","collection","operation"],"type":"object"},"MySQLConfig":{"additionalProperties":false,"description":"MySQL connection configuration (no credentials)","properties":{"allow_private_hosts":{"description":"Allow connections to private, loopback, or internal network hosts when private host access is available for the deployment.","example":false,"type":"boolean"},"connect_timeout":{"description":"Connection timeout in seconds (optional, defaults to 5)","example":10,"maximum":300,"minimum":1,"type":"integer"},"database":{"description":"Database name","example":"analytics","minLength":1,"type":"string"},"host":{"description":"MySQL server hostname or IP address","example":"mysql.example.com","minLength":1,"type":"string"},"port":{"default":3306,"description":"MySQL server port","example":3306,"maximum":65535,"minimum":1,"type":"integer"}},"required":["host","port","database"],"type":"object"},"MySQLCredentials":{"additionalProperties":false,"description":"MySQL credentials (write-only, never returned)","properties":{"password":{"description":"MySQL password; use an empty string only for an account configured without a password","example":"SecurePass456!","type":"string"},"username":{"description":"MySQL username","example":"analytics_user","minLength":1,"type":"string"}},"required":["username","password"],"type":"object"},"MySQLStatement":{"description":"MySQL query statement with {{paramName}} placeholders","properties":{"sql":{"description":"MySQL SQL statement with {{paramName}} placeholders","example":"SELECT * FROM users WHERE id = {{user_id}} LIMIT {{limit}}","minLength":1,"type":"string"},"type":{"description":"Data source type discriminator","enum":["mysql"],"type":"string"}},"required":["type","sql"],"type":"object"},"Name":{"description":"Human-readable display name","example":"Acme Corp","maxLength":255,"minLength":1,"type":"string"},"NewAPIKey":{"additionalProperties":false,"properties":{"can_manage_api_keys":{"default":false,"description":"Whether this key may manage organization API keys when its role also grants the requested api_keys action. Only a session-authenticated authorized user may enable this capability.","type":"boolean"},"description":{"example":"Used by the nightly workflow sync","maxLength":1000,"type":"string"},"expires_at":{"$ref":"#/components/schemas/NullableTimestamp"},"name":{"$ref":"#/components/schemas/Name"},"role":{"$ref":"#/components/schemas/MemberRole"},"slug":{"$ref":"#/components/schemas/Slug"}},"required":["name","role"],"type":"object"},"NewAlertDestination":{"additionalProperties":false,"description":"Request to create an alert destination.","properties":{"name":{"$ref":"#/components/schemas/Name"},"non_secret_config":{"$ref":"#/components/schemas/AlertDestinationConfig"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"$ref":"#/components/schemas/AlertDestinationType"}},"required":["name","type","non_secret_config"],"type":"object"},"NewAlertPolicy":{"additionalProperties":false,"description":"Request to create an alert policy and destination bindings.","not":{"anyOf":[{"$ref":"#/components/schemas/AlertPolicyOrganizationScopeWithProject"},{"$ref":"#/components/schemas/AlertPolicyOrganizationScopeWithEnvironment"},{"$ref":"#/components/schemas/AlertPolicyProjectScopeWithoutProject"},{"$ref":"#/components/schemas/AlertPolicyProjectScopeWithEnvironment"},{"$ref":"#/components/schemas/AlertPolicyProjectEnvironmentScopeWithoutProject"},{"$ref":"#/components/schemas/AlertPolicyProjectEnvironmentScopeWithoutEnvironment"}]},"properties":{"destination_slugs":{"items":{"$ref":"#/components/schemas/Slug"},"minItems":1,"type":"array"},"environment_slug":{"$ref":"#/components/schemas/NullableSlug"},"lifecycle_state":{"$ref":"#/components/schemas/AlertPolicyLifecycleState"},"name":{"$ref":"#/components/schemas/Name"},"notification_type":{"$ref":"#/components/schemas/AlertPolicyNotificationType"},"project_slug":{"$ref":"#/components/schemas/NullableSlug"},"scope":{"$ref":"#/components/schemas/AlertPolicyScope"},"severity":{"$ref":"#/components/schemas/AlertPolicySeverity"},"slug":{"$ref":"#/components/schemas/Slug"},"source_action":{"$ref":"#/components/schemas/AlertPolicySourceAction"},"source_kind":{"$ref":"#/components/schemas/AlertPolicySourceKind"},"source_ref":{"$ref":"#/components/schemas/AlertPolicySourceRef"}},"required":["name","scope","destination_slugs"],"type":"object"},"NewDataSourceRef":{"additionalProperties":false,"description":"Request to create a pipeline-scoped logical data source reference.","properties":{"data_source_type":{"$ref":"#/components/schemas/DataSourceType"},"name":{"$ref":"#/components/schemas/Name"},"required_capabilities":{"items":{"$ref":"#/components/schemas/DataSourceRefCapability"},"minItems":1,"type":"array","uniqueItems":true},"slug":{"$ref":"#/components/schemas/Slug"}},"required":["name","data_source_type","required_capabilities"],"type":"object"},"NewEnvironment":{"additionalProperties":false,"description":"Request to create a new runtime environment catalog entry.","properties":{"color":{"$ref":"#/components/schemas/EnvironmentColor"},"description":{"$ref":"#/components/schemas/EnvironmentDescription"},"name":{"$ref":"#/components/schemas/Name"},"protected":{"default":false,"description":"Whether this catalog environment requires explicit confirmation before protected runtime-changing operations.","example":true,"type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"}},"required":["name","color"],"type":"object"},"NewMember":{"additionalProperties":false,"properties":{"role":{"$ref":"#/components/schemas/MemberRole"},"user_slug":{"$ref":"#/components/schemas/Slug"}},"required":["user_slug","role"],"type":"object"},"NewMemberInvitation":{"additionalProperties":false,"description":"Request to invite an email address to an organization role","properties":{"email":{"$ref":"#/components/schemas/Email"},"role":{"$ref":"#/components/schemas/MemberRole"}},"required":["email","role"],"type":"object"},"NewODCSContract":{"additionalProperties":false,"properties":{"name":{"maxLength":255,"minLength":1,"type":"string"},"odcs_id":{"maxLength":255,"minLength":1,"type":"string"},"slug":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}},"required":["slug","name","odcs_id"],"type":"object"},"NewODCSRevision":{"additionalProperties":false,"properties":{"document":{"additionalProperties":true,"description":"Inert ODCS v3.2.0 document, validated on admission and preserved as canonical JSON under catalog resource and content restrictions. Recording does not establish execution eligibility.","type":"object","x-go-type":"json.RawMessage"},"slug":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}},"required":["slug","document"],"type":"object"},"NewOrgRole":{"additionalProperties":false,"properties":{"name":{"$ref":"#/components/schemas/Name"},"permissions":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array"},"slug":{"$ref":"#/components/schemas/Slug"}},"required":["name","permissions"],"type":"object"},"NewOrganization":{"additionalProperties":false,"description":"Request to create a new organization","properties":{"name":{"$ref":"#/components/schemas/Name"},"slug":{"$ref":"#/components/schemas/Slug"}},"required":["name"],"type":"object"},"NewPersonalAccessToken":{"additionalProperties":false,"properties":{"can_manage_personal_access_tokens":{"default":false,"description":"Whether this PAT may manage personal access tokens owned by the same user. Only a session-authenticated user may enable this capability.","type":"boolean"},"description":{"example":"Used by the CLI for draft workflows","maxLength":1000,"type":"string"},"expires_at":{"$ref":"#/components/schemas/NullableTimestamp"},"name":{"$ref":"#/components/schemas/Name"},"slug":{"$ref":"#/components/schemas/Slug"}},"required":["name"],"type":"object"},"NewPipelineTrigger":{"additionalProperties":false,"description":"Request to create an environment-scoped schedule or webhook trigger definition.","not":{"anyOf":[{"$ref":"#/components/schemas/PipelineTriggerScheduleWithoutScheduleConfig"},{"$ref":"#/components/schemas/PipelineTriggerWebhookWithoutWebhookConfig"},{"$ref":"#/components/schemas/PipelineTriggerScheduleWithWebhookConfig"},{"$ref":"#/components/schemas/PipelineTriggerWebhookWithScheduleConfig"}]},"properties":{"enabled":{"description":"Whether the trigger can submit future runs. Enabling requires a valid target version policy.","example":true,"type":"boolean"},"name":{"$ref":"#/components/schemas/Name"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"retry_policy":{"$ref":"#/components/schemas/PipelineTriggerRetryPolicy"},"runtime_input_keys":{"description":"Safe per-run input keys this trigger may provide. Runtime input values are never persisted on the trigger.","example":["tenant_id","dry_run"],"items":{"maxLength":100,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"type":"array","uniqueItems":true},"schedule":{"$ref":"#/components/schemas/PipelineTriggerScheduleConfig"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"$ref":"#/components/schemas/PipelineTriggerType"},"version_policy":{"$ref":"#/components/schemas/PipelineTriggerVersionPolicy"},"webhook":{"$ref":"#/components/schemas/PipelineWebhookConfigInput"}},"required":["name","type","enabled","pipeline_slug","version_policy","runtime_input_keys","retry_policy"],"type":"object"},"NewProject":{"additionalProperties":false,"description":"Request to create a new project","properties":{"name":{"$ref":"#/components/schemas/Name"},"slug":{"$ref":"#/components/schemas/Slug"}},"required":["name"],"type":"object"},"NewQuery":{"additionalProperties":false,"description":"Request body for creating a new query","properties":{"description":{"description":"Optional description of what the query does","example":"Fetch all users who logged in within the last 30 days","type":"string"},"expected_input_contract":{"$ref":"#/components/schemas/PipelineSchemaContract"},"name":{"description":"Human-readable name of the query","example":"Get Active Users","maxLength":255,"minLength":1,"type":"string"},"parameters":{"default":[],"description":"Parameter definitions for the query","items":{"$ref":"#/components/schemas/QueryParameter"},"type":"array"},"query_statement":{"$ref":"#/components/schemas/QueryStatement"},"row_limit":{"default":1000,"description":"Maximum number of result rows, capped by the server limit. HTTP top-level JSON array elements each count as one row; objects and scalar/text responses count as one document, while null and opaque files have no JSON rows. Exceeding the effective limit fails with EXECUTION_ROW_LIMIT_EXCEEDED; response-byte limits apply independently.","example":1000,"maximum":10000,"minimum":1,"type":"integer"},"slug":{"$ref":"#/components/schemas/Slug"},"timeout_seconds":{"default":30,"description":"Query execution timeout in seconds","example":30,"maximum":300,"minimum":1,"type":"integer"}},"required":["name","query_statement"],"type":"object"},"NewSession":{"additionalProperties":false,"properties":{"email":{"$ref":"#/components/schemas/Email"},"password":{"$ref":"#/components/schemas/Password"}},"required":["email","password"],"type":"object"},"NewUser":{"additionalProperties":false,"properties":{"email":{"$ref":"#/components/schemas/Email"},"full_name":{"$ref":"#/components/schemas/Name"},"password":{"$ref":"#/components/schemas/Password"},"terms_acceptance":{"$ref":"#/components/schemas/TermsAcceptanceRequest"}},"required":["terms_acceptance","full_name","email","password"],"type":"object"},"NotificationDispatchStatus":{"description":"Notification-owned dispatch handoff status for a destination","enum":["unknown","queued"],"example":"queued","type":"string"},"NotificationDispatchSummary":{"additionalProperties":false,"description":"Renderable notification dispatch handoff state for one destination. It never includes provider delivery outcomes, raw provider responses, or secret material.","properties":{"destination_slug":{"$ref":"#/components/schemas/Slug"},"queued_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"status":{"$ref":"#/components/schemas/NotificationDispatchStatus"}},"required":["destination_slug","status","queued_at"],"type":"object"},"NotificationLifecycleState":{"description":"Notification lifecycle state","enum":["unknown","open","acknowledged","resolved"],"example":"open","type":"string","x-enum-varnames":["NotificationLifecycleStateUnknown","NotificationLifecycleStateOpen","NotificationLifecycleStateAcknowledged","NotificationLifecycleStateResolved"]},"NotificationListResponse":{"description":"Paginated list of generic notification records","properties":{"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-03-16T18:40:00Z_notification-abc123","nullable":true,"type":"string"},"notifications":{"items":{"$ref":"#/components/schemas/NotificationRecord"},"type":"array"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-03-16T18:20:00Z_notification-xyz789","nullable":true,"type":"string"}},"required":["notifications","has_more"],"type":"object"},"NotificationRecord":{"description":"Generic notification record safe for operator display. Dedupe fingerprints and raw source payloads are intentionally not exposed.","properties":{"acknowledged_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"created_at":{"$ref":"#/components/schemas/Timestamp"},"dispatch_statuses":{"items":{"$ref":"#/components/schemas/NotificationDispatchSummary"},"type":"array"},"first_seen_at":{"$ref":"#/components/schemas/Timestamp"},"last_occurrence_at":{"$ref":"#/components/schemas/Timestamp"},"last_seen_at":{"$ref":"#/components/schemas/Timestamp"},"lifecycle_state":{"$ref":"#/components/schemas/NotificationLifecycleState"},"notification_type":{"$ref":"#/components/schemas/NotificationType"},"occurrence_count":{"example":3,"minimum":1,"type":"integer"},"resolved_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"safe_metadata":{"additionalProperties":true,"description":"Sanitized display metadata safe for operator review.","type":"object"},"severity":{"$ref":"#/components/schemas/NotificationSeverity"},"slug":{"$ref":"#/components/schemas/Slug"},"source_action":{"$ref":"#/components/schemas/EventAction"},"source_entity_type":{"$ref":"#/components/schemas/EventEntityType"},"source_event_slug":{"$ref":"#/components/schemas/NullableSlug"},"source_refs":{"additionalProperties":{"type":"string"},"description":"Safe source references used to link to related evidence.","type":"object"},"summary":{"description":"Short safe operator-facing summary.","example":"Pipeline users-sync failed in production","type":"string"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","notification_type","severity","lifecycle_state","summary","source_event_slug","source_entity_type","source_action","source_refs","safe_metadata","occurrence_count","first_seen_at","last_seen_at","last_occurrence_at","dispatch_statuses","acknowledged_at","resolved_at","created_at","updated_at"],"type":"object"},"NotificationSeverity":{"description":"Operator-facing notification severity","enum":["unknown","info","warning","critical"],"example":"critical","type":"string","x-enum-varnames":["NotificationSeverityUnknown","NotificationSeverityInfo","NotificationSeverityWarning","NotificationSeverityCritical"]},"NotificationType":{"description":"Generic notification type","enum":["unknown","pipeline.run_failed","pipeline.retry_exhausted","pipeline.scheduled_run_delayed","pipeline.scheduled_run_missing","pipeline.freshness_sla_breached","pipeline.contract_failure"],"example":"pipeline.retry_exhausted","type":"string","x-enum-varnames":["NotificationTypeUnknown","NotificationTypePipelineRunFailed","NotificationTypePipelineRetryExhausted","NotificationTypePipelineScheduledRunDelayed","NotificationTypePipelineScheduledRunMissing","NotificationTypePipelineFreshnessSLABreached","NotificationTypePipelineContractFailure"]},"NullableSlug":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"nullable":true},"NullableTimestamp":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"OAuthProviderAccount":{"additionalProperties":false,"description":"Safe provider account metadata. This object must not contain credential values, OAuth codes, state values, provider headers, or raw provider responses.","properties":{"email":{"description":"Provider account email when safe to expose","example":"ops@example.com","format":"email","type":"string"},"id":{"description":"Provider account identifier when the provider exposes one as safe metadata","example":"acct-123","type":"string"},"name":{"description":"Provider account display name when safe to expose","example":"Acme CRM","type":"string"}},"type":"object"},"ODCSConsumerImpact":{"properties":{"comparison":{"enum":["supported","unsupported","other_revision"],"type":"string"},"diagnostics":{"items":{"$ref":"#/components/schemas/ODCSImpactDiagnostic"},"type":"array"},"environment_slug":{"type":"string"},"impact":{"$ref":"#/components/schemas/DriftImpactReportPreview"},"origin":{"enum":["deployed","candidate","draft"],"type":"string"},"pipeline_slug":{"type":"string"},"port":{"enum":["input","output"],"type":"string"},"project_slug":{"type":"string"},"revision_slug":{"type":"string"},"schema_object_id":{"type":"string"},"spec_hash":{"type":"string"},"step_slug":{"type":"string"}},"required":["project_slug","pipeline_slug","origin","spec_hash","step_slug","port","revision_slug","schema_object_id","comparison","diagnostics"],"type":"object"},"ODCSContract":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"odcs_id":{"type":"string"},"slug":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"status":{"enum":["active","archived"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["slug","name","odcs_id","status","created_at","updated_at"],"type":"object"},"ODCSContractListResponse":{"additionalProperties":false,"properties":{"contracts":{"items":{"$ref":"#/components/schemas/ODCSContract"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"},"prev_cursor":{"nullable":true,"type":"string"}},"required":["contracts","has_more"],"type":"object"},"ODCSImpactChange":{"properties":{"after":{"type":"string"},"after_property_id":{"type":"string"},"before":{"type":"string"},"before_property_id":{"type":"string"},"kind":{"type":"string"},"path":{"type":"string"},"reason_code":{"type":"string"},"severity":{"$ref":"#/components/schemas/DriftImpactReportSeverity"}},"required":["kind","path","before","after","severity","reason_code"],"type":"object"},"ODCSImpactDiagnostic":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"property_id":{"type":"string"},"revision_slug":{"type":"string"}},"required":["revision_slug","code","path","message"],"type":"object"},"ODCSObjectImpact":{"properties":{"changes":{"items":{"$ref":"#/components/schemas/ODCSImpactChange"},"type":"array"},"comparison":{"enum":["supported","unsupported"],"type":"string"},"diagnostics":{"items":{"$ref":"#/components/schemas/ODCSImpactDiagnostic"},"type":"array"},"schema_object_id":{"type":"string"}},"required":["schema_object_id","comparison","changes","diagnostics"],"type":"object"},"ODCSRevision":{"allOf":[{"$ref":"#/components/schemas/ODCSRevisionMetadata"},{"properties":{"document":{"additionalProperties":true,"type":"object","x-go-type":"json.RawMessage"}},"required":["document"],"type":"object"}]},"ODCSRevisionImpact":{"properties":{"consumers":{"items":{"$ref":"#/components/schemas/ODCSConsumerImpact"},"type":"array"},"contract_slug":{"type":"string"},"external_consumers":{"enum":["unknown"],"type":"string"},"from_digest":{"type":"string"},"from_revision_slug":{"type":"string"},"objects":{"items":{"$ref":"#/components/schemas/ODCSObjectImpact"},"type":"array"},"project_slug":{"type":"string"},"to_digest":{"type":"string"},"to_revision_slug":{"type":"string"}},"required":["project_slug","contract_slug","from_revision_slug","to_revision_slug","from_digest","to_digest","external_consumers","objects","consumers"],"type":"object"},"ODCSRevisionImpactRequest":{"additionalProperties":false,"properties":{"from_revision_slug":{"$ref":"#/components/schemas/Slug"},"to_revision_slug":{"$ref":"#/components/schemas/Slug"}},"required":["from_revision_slug","to_revision_slug"],"type":"object"},"ODCSRevisionListResponse":{"additionalProperties":false,"properties":{"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"},"prev_cursor":{"nullable":true,"type":"string"},"revisions":{"items":{"$ref":"#/components/schemas/ODCSRevisionMetadata"},"type":"array"}},"required":["revisions","has_more"],"type":"object"},"ODCSRevisionMetadata":{"properties":{"created_at":{"format":"date-time","type":"string"},"declared_status":{"type":"string"},"digest":{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"},"document_version":{"type":"string"},"odcs_version":{"enum":["v3.2.0"],"type":"string"},"schema_objects":{"description":"Index of explicitly identified schema objects. ID-less objects remain in the document and cannot be selected by an executable reference.","items":{"$ref":"#/components/schemas/ODCSSchemaObject"},"type":"array"},"slug":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"status":{"enum":["recorded"],"type":"string"}},"required":["slug","digest","odcs_version","document_version","declared_status","status","schema_objects","created_at"],"type":"object"},"ODCSSchemaObject":{"additionalProperties":false,"properties":{"id":{"minLength":1,"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"ObjectAPIFieldInfo":{"description":"Schema information for an object/API field or property","properties":{"label":{"description":"Human-readable property label","example":"Email","type":"string"},"name":{"description":"Provider field or property API name","example":"email","type":"string"},"provider_metadata":{"additionalProperties":true,"description":"Provider-safe field metadata for diagnostics. Credentials, tokens, and secret values are never included.","type":"object"},"type":{"description":"Provider field or property type","example":"string","type":"string"}},"required":["name","type"],"type":"object"},"ObjectAPIObjectInfo":{"description":"Schema information for an object/API object","properties":{"fields":{"description":"Introspected object fields or properties","items":{"$ref":"#/components/schemas/ObjectAPIFieldInfo"},"type":"array"},"label":{"description":"Human-readable object label","example":"Contacts","type":"string"},"name":{"description":"Provider object API name","example":"contacts","type":"string"},"operations":{"description":"Operations supported for this object by the connector adapter","items":{"$ref":"#/components/schemas/ObjectAPIOperationInfo"},"type":"array"},"provider_metadata":{"additionalProperties":true,"description":"Provider-safe object metadata for diagnostics. Credentials, tokens, and secret values are never included.","type":"object"}},"required":["name","fields"],"type":"object"},"ObjectAPIOperationInfo":{"description":"Supported operation for an object/API object","properties":{"label":{"description":"Human-readable operation label","example":"Search","type":"string"},"name":{"description":"Operation API name","example":"search","type":"string"},"provider_metadata":{"additionalProperties":true,"description":"Provider-safe operation metadata for diagnostics. Credentials, tokens, and secret values are never included.","type":"object"}},"required":["name"],"type":"object"},"ObjectAPISchemaResponse":{"description":"Object/API schema introspection result","properties":{"objects":{"description":"List of introspected provider objects","items":{"$ref":"#/components/schemas/ObjectAPIObjectInfo"},"type":"array"},"schema_type":{"description":"Schema category identifier","enum":["object_api"],"example":"object_api","type":"string"},"type":{"description":"Object/API connector vendor type","example":"hubspot","type":"string"}},"required":["schema_type","type","objects"],"type":"object"},"ObjectRowsExecutionResult":{"description":"Result of a row-normalized object/API operation","properties":{"duration_ms":{"description":"Execution duration in milliseconds","example":310,"type":"integer"},"error":{"description":"Error message (only present if success is false)","example":"HubSpot rate limit exceeded","type":"string"},"payload":{"description":"Object-row result data","properties":{"column_names":{"description":"Column names present in the rows","example":["hs_object_id","email","firstname"],"items":{"type":"string"},"type":"array"},"has_more":{"description":"Whether another page is available","example":true,"type":"boolean"},"next_cursor":{"description":"Opaque provider cursor or next token for the next page, when available","example":"1024","nullable":true,"type":"string"},"object_type":{"description":"Provider object API name","example":"contacts","type":"string"},"operation":{"description":"Connector operation that produced the object rows","example":"search","type":"string"},"provider_metadata":{"additionalProperties":true,"description":"Provider-safe execution metadata for diagnostics. Credentials, tokens, and secret values are never included.","type":"object"},"row_count":{"description":"Number of rows returned in this page","example":2,"type":"integer"},"rows":{"description":"Normalized result rows","example":[{"email":"alice@example.com","firstname":"Alice","hs_object_id":"123"},{"email":"bob@example.com","firstname":"Bob","hs_object_id":"456"}],"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["object_type","rows","row_count","column_names","next_cursor","has_more"],"type":"object"},"result_type":{"allOf":[{"$ref":"#/components/schemas/ExecutionResultResultType"},{"enum":["object_rows"],"type":"string"}],"description":"Type discriminator for object-row results","example":"object_rows"},"success":{"description":"Whether execution succeeded","example":true,"type":"boolean"},"type":{"description":"Object/API connector vendor type","example":"hubspot","type":"string"}},"required":["result_type","type","payload","duration_ms","success"],"type":"object"},"OperationInfo":{"description":"Schema information for an HTTP API operation","properties":{"description":{"description":"Operation description","example":"List all users","type":"string"},"id":{"description":"Operation ID from OpenAPI spec","example":"listUsers","type":"string"},"method":{"description":"HTTP method","enum":["GET","POST","PUT","DELETE","PATCH"],"example":"GET","type":"string"},"path":{"description":"API endpoint path","example":"/users","type":"string"},"request_body":{"$ref":"#/components/schemas/OperationRequestBodyInfo"},"responses":{"additionalProperties":{"$ref":"#/components/schemas/OperationResponseInfo"},"description":"Response metadata indexed by HTTP status code","type":"object"}},"required":["id","path","method"],"type":"object"},"OperationRequestBodyInfo":{"description":"Request body metadata for an HTTP API operation","properties":{"content":{"additionalProperties":{"$ref":"#/components/schemas/OperationResponseContentInfo"},"description":"Request body content metadata indexed by media type","type":"object"},"description":{"description":"Request body description from OpenAPI specification","example":"Data source payload","type":"string"},"required":{"description":"Whether the request body is required","example":true,"type":"boolean"}},"type":"object"},"OperationResponseContentInfo":{"description":"Response body metadata for a specific content type","properties":{"schema_summary":{"additionalProperties":true,"description":"Best-effort JSON schema summary for this response body","type":"object"}},"type":"object"},"OperationResponseInfo":{"description":"Response metadata for a specific HTTP status code","properties":{"content":{"additionalProperties":{"$ref":"#/components/schemas/OperationResponseContentInfo"},"description":"Response content metadata indexed by media type","type":"object"},"description":{"description":"Response description from OpenAPI specification","example":"Successful response","type":"string"}},"type":"object"},"OrgRole":{"properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"deleted_at":{"$ref":"#/components/schemas/NullableTimestamp"},"is_default":{"description":"Whether this role is a system default role","example":false,"type":"boolean"},"name":{"$ref":"#/components/schemas/Name"},"permissions":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array"},"slug":{"$ref":"#/components/schemas/Slug"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","name","is_default","permissions","deleted_at","created_at","updated_at"],"type":"object"},"OrgRoleList":{"items":{"$ref":"#/components/schemas/OrgRole"},"type":"array"},"Organization":{"properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"entitlement":{"$ref":"#/components/schemas/OrganizationEntitlement"},"name":{"$ref":"#/components/schemas/Name"},"slug":{"$ref":"#/components/schemas/Slug"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["name","slug","created_at","updated_at","entitlement"],"type":"object"},"OrganizationEntitlement":{"description":"Current organization access plan. Paid plan codes remain intentionally undefined until packaging is selected.","properties":{"activated_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"expires_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"limits":{"$ref":"#/components/schemas/OrganizationEntitlementLimits"},"plan_code":{"example":"free_trial","type":"string"},"retention_ends_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"status":{"enum":["pending","active","expired"],"type":"string"}},"required":["plan_code","status","activated_at","expires_at","retention_ends_at","limits"],"type":"object"},"OrganizationEntitlementLimits":{"properties":{"data_sources":{"nullable":true,"type":"integer"},"deployed_pipelines":{"nullable":true,"type":"integer"},"members":{"nullable":true,"type":"integer"},"pipeline_runs":{"nullable":true,"type":"integer"},"projects":{"nullable":true,"type":"integer"}},"required":["members","projects","data_sources","deployed_pipelines","pipeline_runs"],"type":"object"},"OrganizationListResponse":{"description":"Paginated list of organizations","properties":{"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-02-15T10:30:00Z_abc123","nullable":true,"type":"string"},"organizations":{"items":{"$ref":"#/components/schemas/OrganizationWithRole"},"type":"array"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-02-15T10:10:00Z_xyz789","nullable":true,"type":"string"}},"required":["organizations","has_more"],"type":"object"},"OrganizationRetentionOutcome":{"additionalProperties":false,"description":"Product-level records removed by one retention maintenance attempt.","properties":{"event_logs_deleted":{"format":"int64","minimum":0,"type":"integer"},"pipeline_runs_deleted":{"format":"int64","minimum":0,"type":"integer"},"query_executions_deleted":{"format":"int64","minimum":0,"type":"integer"},"replay_checkpoints_deleted":{"format":"int64","minimum":0,"type":"integer"}},"required":["query_executions_deleted","replay_checkpoints_deleted","pipeline_runs_deleted","event_logs_deleted"],"type":"object"},"OrganizationRetentionPolicy":{"additionalProperties":false,"description":"Organization-owned runtime retention policy. Project and pipeline overrides are not supported.","properties":{"event_log_retention_days":{"description":"Number of days to retain durable event logs.","maximum":30,"minimum":1,"type":"integer"},"query_execution_retention_days":{"description":"Number of days to retain saved query executions.","maximum":30,"minimum":1,"type":"integer"},"replay_checkpoint_retention_days":{"description":"Number of days to retain replay checkpoints.","maximum":30,"minimum":1,"type":"integer"},"run_history_retention_days":{"description":"Number of days to retain completed pipeline runs.","maximum":30,"minimum":1,"type":"integer"}},"required":["query_execution_retention_days","replay_checkpoint_retention_days","run_history_retention_days","event_log_retention_days"],"type":"object"},"OrganizationRetentionRun":{"additionalProperties":false,"description":"Sanitized tenant-facing outcome of a system-managed retention maintenance attempt.","properties":{"attempt":{"minimum":1,"type":"integer"},"completed_at":{"format":"date-time","type":"string"},"failure_code":{"enum":["maintenance_failed","invalid_policy"],"nullable":true,"type":"string","x-enum-varnames":["OrganizationRetentionRunFailureCodeMaintenanceFailed","OrganizationRetentionRunFailureCodeInvalidPolicy"]},"outcome":{"$ref":"#/components/schemas/OrganizationRetentionOutcome"},"policy_snapshot":{"allOf":[{"$ref":"#/components/schemas/OrganizationRetentionPolicy"}],"nullable":true},"slug":{"$ref":"#/components/schemas/Slug"},"started_at":{"format":"date-time","type":"string"},"status":{"enum":["succeeded","failed"],"type":"string","x-enum-varnames":["OrganizationRetentionRunStatusSucceeded","OrganizationRetentionRunStatusFailed"]}},"required":["slug","status","attempt","policy_snapshot","outcome","failure_code","started_at","completed_at"],"type":"object"},"OrganizationRetentionRunList":{"additionalProperties":false,"description":"Recent system-managed retention maintenance history for one organization.","properties":{"runs":{"items":{"$ref":"#/components/schemas/OrganizationRetentionRun"},"type":"array"},"schedule":{"$ref":"#/components/schemas/OrganizationRetentionSchedule"}},"required":["schedule","runs"],"type":"object"},"OrganizationRetentionSchedule":{"additionalProperties":false,"description":"Product-owned retention maintenance schedule.","properties":{"cadence":{"enum":["daily"],"type":"string","x-enum-varnames":["OrganizationRetentionScheduleCadenceDaily"]},"next_run_at":{"format":"date-time","type":"string"},"timezone":{"enum":["UTC"],"type":"string","x-enum-varnames":["OrganizationRetentionScheduleTimezoneUTC"]}},"required":["cadence","timezone","next_run_at"],"type":"object"},"OrganizationWithRole":{"allOf":[{"$ref":"#/components/schemas/Organization"},{"properties":{"member_role":{"$ref":"#/components/schemas/MemberRole"}},"required":["member_role"],"type":"object"}],"description":"Organization with the current user's membership role","type":"object"},"Owner":{"description":"Owner information without role details","properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"email":{"$ref":"#/components/schemas/Email"},"slug":{"$ref":"#/components/schemas/Slug"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","email","created_at","updated_at"],"type":"object"},"Password":{"example":"SecurePass123!","minLength":8,"type":"string"},"PasswordForgotRequest":{"additionalProperties":false,"properties":{"email":{"$ref":"#/components/schemas/Email"}},"required":["email"],"type":"object"},"PasswordResetRequest":{"additionalProperties":false,"properties":{"password":{"$ref":"#/components/schemas/Password"},"token":{"description":"Single-use password reset token sent to the user's email","example":"reset-token-abc123","type":"string"}},"required":["token","password"],"type":"object"},"Permission":{"description":"Permission granted to a role","properties":{"action":{"description":"Action on the resource. Organization export is a separate grant from read access.","enum":["create","delete","restore","purge","read","update","execute","*"],"example":"read","type":"string"},"resource":{"description":"Resource type (e.g., members, organizations)","example":"members","type":"string"}},"required":["resource","action"],"type":"object"},"PersonalAccessToken":{"properties":{"can_manage_personal_access_tokens":{"description":"Whether this PAT may manage personal access tokens owned by the same user.","type":"boolean"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"description":{"example":"Used by the CLI for draft workflows","type":"string"},"expires_at":{"$ref":"#/components/schemas/NullableTimestamp"},"last_used_at":{"$ref":"#/components/schemas/NullableTimestamp"},"name":{"$ref":"#/components/schemas/Name"},"revoked_at":{"$ref":"#/components/schemas/NullableTimestamp"},"slug":{"$ref":"#/components/schemas/Slug"},"token_prefix":{"description":"Safe token prefix for identifying the PAT without exposing the secret.","example":"xto_pat_abcd1234","type":"string"},"updated_at":{"$ref":"#/components/schemas/Timestamp"},"user_slug":{"$ref":"#/components/schemas/Slug"}},"required":["slug","name","token_prefix","user_slug","can_manage_personal_access_tokens","expires_at","revoked_at","last_used_at","created_at","updated_at"],"type":"object"},"PersonalAccessTokenListResponse":{"description":"Paginated list of personal access tokens","properties":{"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"},"personal_access_tokens":{"items":{"$ref":"#/components/schemas/PersonalAccessToken"},"type":"array"},"prev_cursor":{"nullable":true,"type":"string"}},"required":["personal_access_tokens","has_more"],"type":"object"},"PersonalAccessTokenWithToken":{"allOf":[{"$ref":"#/components/schemas/PersonalAccessToken"},{"properties":{"token":{"description":"Raw personal access token. Returned only once on create or rotate.","example":"xto_pat_0123456789abcdef0123456789abcdef","type":"string"}},"required":["token"],"type":"object"}]},"Pipeline":{"allOf":[{"$ref":"#/components/schemas/PipelineRef"},{"properties":{"draft":{"allOf":[{"$ref":"#/components/schemas/PipelineDraft"}],"description":"Current draft for this pipeline when present.","nullable":true},"spec":{"$ref":"#/components/schemas/PipelineSpec"}},"required":["spec"],"type":"object"}]},"PipelineDataSourceRefSyncItem":{"description":"One pipeline logical data-source ref sync result.","properties":{"data_source_ref_slug":{"$ref":"#/components/schemas/Slug"},"data_source_type":{"allOf":[{"$ref":"#/components/schemas/DataSourceType"}],"description":"Inferred concrete data-source type, or null when the spec requirement is intentionally left for explicit binding.","nullable":true},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"required_capabilities":{"items":{"$ref":"#/components/schemas/DataSourceRefCapability"},"type":"array"},"status":{"$ref":"#/components/schemas/PipelineDataSourceRefSyncStatus"}},"required":["pipeline_slug","data_source_ref_slug","data_source_type","required_capabilities","status"],"type":"object"},"PipelineDataSourceRefSyncResult":{"description":"Logical data-source refs discovered from a pipeline spec and synced before environment binding resolution.","properties":{"data_source_refs":{"description":"Pipeline-scoped logical refs seen in the spec and their idempotent sync result.","items":{"$ref":"#/components/schemas/PipelineDataSourceRefSyncItem"},"type":"array"}},"required":["data_source_refs"],"type":"object"},"PipelineDataSourceRefSyncStatus":{"description":"Idempotent action taken for one logical ref during spec sync.","enum":["created","updated","unchanged"],"type":"string","x-enum-varnames":["PipelineDataSourceRefSyncStatusCreated","PipelineDataSourceRefSyncStatusUpdated","PipelineDataSourceRefSyncStatusUnchanged"]},"PipelineDeployment":{"description":"Current deployed pipeline version for one project environment.","properties":{"current_version_short_spec_hash":{"description":"Short display prefix derived from current_version_spec_hash.","example":"6d7b6f5f6c8d","type":"string"},"current_version_spec_hash":{"description":"Immutable pipeline version hash currently deployed to the environment.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","type":"string"},"data_source_ref_sync":{"$ref":"#/components/schemas/PipelineDataSourceRefSyncResult"},"deployed_at":{"$ref":"#/components/schemas/Timestamp"},"deployed_by_actor_slug":{"$ref":"#/components/schemas/NullableSlug"},"deployed_by_actor_type":{"$ref":"#/components/schemas/EventActorType"},"environment_slug":{"$ref":"#/components/schemas/Slug"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"previous_version_short_spec_hash":{"description":"Short display prefix derived from previous_version_spec_hash.","example":"5c6d7e8f9a0b","nullable":true,"type":"string"},"previous_version_spec_hash":{"description":"Immutable pipeline version hash that was deployed before the latest deployment update.","example":"5c6d7e8f9a0b1c2d3e4f","nullable":true,"type":"string"},"project_slug":{"$ref":"#/components/schemas/Slug"},"proof_link":{"allOf":[{"$ref":"#/components/schemas/ProofLifecycleLink"}],"nullable":true},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["pipeline_slug","project_slug","environment_slug","current_version_spec_hash","current_version_short_spec_hash","deployed_by_actor_type","deployed_at","updated_at","data_source_ref_sync","proof_link"],"type":"object"},"PipelineDeploymentListResponse":{"description":"List of pipeline deployments by environment.","properties":{"deployments":{"items":{"$ref":"#/components/schemas/PipelineDeployment"},"type":"array"}},"required":["deployments"],"type":"object"},"PipelineDeploymentRequest":{"additionalProperties":false,"description":"Request to deploy an existing immutable pipeline version to one environment.","properties":{"expected_current_spec_hash":{"description":"Optional optimistic concurrency guard for the currently deployed version in the target environment. Accepts a full immutable version hash or unique short hash prefix.","example":"5c6d7e8f9a0b","nullable":true,"type":"string"},"proof_receipt_slug":{"$ref":"#/components/schemas/NullableSlug"},"protected_environment_confirmation":{"$ref":"#/components/schemas/NullableSlug"},"source_environment_slug":{"$ref":"#/components/schemas/NullableSlug"},"spec_hash":{"description":"Full immutable pipeline version hash, or a unique short hash prefix.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","minLength":1,"type":"string"}},"required":["spec_hash"],"type":"object"},"PipelineDraft":{"description":"Member-scoped Git proposal working state. It is never a deployable runtime definition.","properties":{"authority_source":{"description":"Safe description of the bound provider grant, installation, or service credential.","nullable":true,"type":"string"},"base_commit_sha":{"description":"Exact base commit observed when proposal continuity was established.","example":"0123456789abcdef0123456789abcdef01234567","nullable":true,"type":"string"},"base_ref":{"description":"Git ref retained as the proposal base.","example":"refs/heads/main","nullable":true,"type":"string"},"based_on_spec_hash":{"description":"Canonical pipeline version hash used as the draft base.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","nullable":true,"type":"string"},"branch_head_sha":{"description":"Last proposal branch head confirmed by the provider.","example":"fedcba9876543210fedcba9876543210fedcba98","nullable":true,"type":"string"},"branch_name":{"description":"Stable proposal branch retained across safe retries.","example":"braidplane/default/daily-sync/member-a","nullable":true,"type":"string"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"draft_spec_hash":{"description":"Hash of the current member-scoped draft specification.","example":"7d8b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9","type":"string"},"draft_state":{"description":"Local proposal lifecycle state. Provider state is last-known unless proposal_updated_at changes.","enum":["editing","publish_queued","publish_failed","proposal_open","proposal_closed","abandoned"],"example":"proposal_open","type":"string"},"failed_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"Time the latest proposal attempt was recorded as failed.","nullable":true},"failure_code":{"description":"Safe machine-readable failure code populated when draft_state is publish_failed.","example":"provider_unavailable","nullable":true,"type":"string"},"failure_message":{"description":"Safe operator-facing failure summary populated when draft_state is publish_failed.","example":"Git proposal provider operation failed; retry is available.","nullable":true,"type":"string"},"initiating_member":{"$ref":"#/components/schemas/Slug"},"last_proposed_draft_hash":{"description":"Draft hash last confirmed on the proposal branch.","nullable":true,"type":"string"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"proposal_id":{"description":"Provider-stable pull or merge request identifier.","example":"42","nullable":true,"type":"string"},"proposal_is_stale":{"description":"Whether saved draft content differs from the last content confirmed on the proposal branch.","type":"boolean"},"proposal_provider":{"description":"Provider family for the remembered PR or MR.","enum":["github","gitlab"],"example":"github","nullable":true,"type":"string"},"proposal_state":{"description":"Last provider proposal state observed by Braidplane.","enum":["open","closed","merged"],"example":"open","nullable":true,"type":"string"},"proposal_supported":{"description":"Whether the project backend supports provider-native pull or merge request proposals.","type":"boolean"},"proposal_updated_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"Time Braidplane last confirmed proposal branch/provider metadata; not deployment evidence.","nullable":true},"proposal_url":{"description":"Human-visible provider pull or merge request URL.","example":"https://github.com/acme/pipelines/pull/42","format":"uri","nullable":true,"type":"string"},"provider_actor":{"description":"Safe display identity of the provider principal executing the proposal operation.","nullable":true,"type":"string"},"publication_mode":{"description":"Provider identity mode immutably selected for the current proposal attempt.","enum":["delegated_user","organization_service"],"nullable":true,"type":"string"},"queued_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"Time the latest proposal publish was queued.","nullable":true},"repository":{"description":"Normalized authoritative repository URL resolved from the owning project backend.","example":"https://github.com/acme/pipelines.git","type":"string"},"spec":{"$ref":"#/components/schemas/PipelineSpec"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["pipeline_slug","initiating_member","draft_state","draft_spec_hash","repository","proposal_supported","proposal_is_stale","spec","created_at","updated_at"],"type":"object"},"PipelineDraftConflictResponse":{"description":"Structured conflict response returned when a draft save or publish uses a stale pipeline version.","properties":{"can_overwrite":{"description":"Whether the caller may retry with force enabled.","example":true,"type":"boolean"},"current_spec_hash":{"description":"Current canonical pipeline version hash.","example":"current-hash","nullable":true,"type":"string"},"draft_based_on_spec_hash":{"description":"Version hash currently recorded as the draft base.","example":"draft-base-hash","nullable":true,"type":"string"},"draft_preserved":{"description":"Whether the caller's saved draft still exists after the conflict.","example":true,"type":"boolean"},"error":{"$ref":"#/components/schemas/Error"},"expected_spec_hash":{"description":"Version hash provided by the caller.","example":"stale-hash","nullable":true,"type":"string"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"}},"required":["error","pipeline_slug","draft_preserved","can_overwrite"],"type":"object"},"PipelineDraftResponse":{"description":"Wrapper response with draft payload.","properties":{"draft":{"$ref":"#/components/schemas/PipelineDraft"}},"required":["draft"],"type":"object"},"PipelineIncrementalSourceContract":{"description":"Optional source-step checkpoint contract for incremental execution. Only query steps can own source checkpoints; absence of this object means a full source read.","properties":{"checkpoint_kind":{"description":"Checkpoint value shape used by the connector operation.","enum":["watermark","cursor"],"example":"watermark","type":"string","x-enum-varnames":["PipelineIncrementalSourceContractCheckpointKindWatermark","PipelineIncrementalSourceContractCheckpointKindCursor"]},"cursor":{"description":"Connector-native cursor token name for cursor checkpoint operations.","example":"next_page_token","type":"string"},"dedupe_key":{"description":"Optional record identity used by downstream transforms or sinks to tolerate overlap.","example":"id","type":"string"},"field":{"description":"Source field used for watermark comparisons.","example":"updated_at","type":"string"},"lookback_window":{"description":"Optional positive duration overlap for watermark reads to tolerate late-arriving records.","example":"15m","type":"string"},"ordering":{"description":"Stable ordering fields used when the watermark field alone is not unique.","example":["updated_at","id"],"items":{"type":"string"},"type":"array"}},"type":"object"},"PipelineInputSpec":{"additionalProperties":false,"description":"Declares the one run-scoped JSON payload accepted by this pipeline.","not":{"anyOf":[{"$ref":"#/components/schemas/PipelineInputSpecWithNonJSONOutputContract"}]},"properties":{"output_contract":{"$ref":"#/components/schemas/PipelineSchemaContract"}},"required":["output_contract"],"type":"object"},"PipelineInputSpecWithNonJSONOutputContract":{"description":"Validation-only shape rejected because pipeline event input supports only JSON output contracts.","properties":{"output_contract":{"properties":{"representation":{"not":{"enum":["json"]},"type":"string"}},"required":["representation"],"type":"object"}},"required":["output_contract"],"type":"object"},"PipelineInputStep":{"allOf":[{"$ref":"#/components/schemas/PipelineStepBase"},{"properties":{"input":{"$ref":"#/components/schemas/PipelineInputSpec"},"kind":{"enum":["input"],"example":"input","type":"string"}},"required":["kind","input"],"type":"object"}]},"PipelineListResponse":{"description":"Paginated list of pipelines in a project.","properties":{"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-02-15T10:30:00Z_acme-users-sync","nullable":true,"type":"string"},"pipelines":{"items":{"$ref":"#/components/schemas/PipelineRef"},"type":"array"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-02-15T10:10:00Z_nightly-export","nullable":true,"type":"string"}},"required":["pipelines","has_more"],"type":"object"},"PipelineMetadata":{"description":"Human and machine identifiers for the pipeline.","properties":{"name":{"$ref":"#/components/schemas/Name"},"slug":{"$ref":"#/components/schemas/Slug"}},"required":["slug","name"],"type":"object"},"PipelineMetadataUpdate":{"description":"Mutable pipeline metadata for update operations.","properties":{"name":{"$ref":"#/components/schemas/Name"}},"required":["name"],"type":"object"},"PipelineODCSContractRef":{"additionalProperties":false,"description":"Exact project-owned ODCS schema object pinned to one immutable revision. Resolution occurs on the server.","properties":{"contract_slug":{"$ref":"#/components/schemas/Slug"},"representation":{"enum":["rows","json","csv","file","multipart_form"],"type":"string"},"revision_slug":{"allOf":[{"$ref":"#/components/schemas/Slug"},{"not":{"const":"latest"}}]},"root_shape":{"enum":["array","object"],"type":"string"},"schema_object_id":{"minLength":1,"type":"string"}},"required":["contract_slug","revision_slug","schema_object_id"],"type":"object"},"PipelineQueryRef":{"allOf":[{"not":{"required":["output_contract","output_contract_ref"]}}],"description":"Defines the data source operation to execute in a query step. Supports saved queries (operation_ref), inline definitions (operation_inline), and all connector types.","properties":{"data_source_ref":{"$ref":"#/components/schemas/Slug"},"incremental":{"$ref":"#/components/schemas/PipelineIncrementalSourceContract"},"operation_inline":{"additionalProperties":true,"description":"Optional inline operation definition.","type":"object"},"operation_ref":{"$ref":"#/components/schemas/Slug"},"operation_type":{"description":"Operation type identifier. Must match the connector type of the referenced data source.","enum":["sql","bigquery","google_workspace","snowflake","http","hubspot","ftp","mongodb","git","s3"],"example":"sql","type":"string"},"output_contract":{"$ref":"#/components/schemas/PipelineSchemaContract"},"output_contract_ref":{"$ref":"#/components/schemas/PipelineODCSContractRef"},"parameters":{"additionalProperties":true,"description":"Query parameter map. Values may be literals or runtime step references.","type":"object"}},"required":["data_source_ref","operation_type"],"type":"object"},"PipelineQueryStep":{"allOf":[{"$ref":"#/components/schemas/PipelineStepBase"},{"properties":{"kind":{"enum":["query"],"example":"query","type":"string"},"query":{"$ref":"#/components/schemas/PipelineQueryRef"}},"required":["kind","query"],"type":"object"}]},"PipelineReconcileDeletedPipeline":{"description":"Stale Git-authored DB pipeline removed because it no longer exists in the git source.","properties":{"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"previous_source_path":{"description":"Previously recorded git source path, when known.","example":"pipelines/legacy-sync.pipeline.yaml","nullable":true,"type":"string"}},"required":["pipeline_slug"],"type":"object"},"PipelineReconcileDriftReset":{"description":"Drifted Git-authored DB pipeline reset to the git source.","properties":{"applied_spec_hash":{"description":"Git spec hash applied by reconcile.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","type":"string"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"previous_spec_hash":{"description":"DB spec hash before reconcile reset the drift.","example":"drifted-hash","type":"string"},"source_path":{"description":"Pipeline spec path inside the git repository.","example":"pipelines/acme-users-sync.pipeline.yaml","type":"string"}},"required":["pipeline_slug","source_path","previous_spec_hash","applied_spec_hash"],"type":"object"},"PipelineReconcileExpectedSource":{"additionalProperties":false,"description":"Optional preview precondition. Reconciliation returns 409 without applying changes if the resolved source differs. Omit to reconcile the current tracked source.","properties":{"commit":{"description":"Immutable commit from the preview.","minLength":1,"type":"string"},"data_source_slug":{"$ref":"#/components/schemas/Slug"},"ref":{"description":"Tracked ref from the preview.","minLength":1,"type":"string"},"repo":{"description":"Normalized repository from the preview.","minLength":1,"type":"string"}},"required":["data_source_slug","repo","ref","commit"],"type":"object"},"PipelineReconcileFailure":{"description":"Pipeline-level reconcile failure that did not necessarily abort the whole operation.","properties":{"message":{"description":"Safe failure detail suitable for API clients.","example":"pipeline metadata.slug is required","type":"string"},"pipeline_path":{"description":"Git path that failed, when known.","example":"pipelines/broken.pipeline.yaml","nullable":true,"type":"string"},"pipeline_slug":{"$ref":"#/components/schemas/NullableSlug"},"stage":{"description":"Reconcile stage that failed.","enum":["read","load","marshal","transaction","source"],"example":"load","type":"string","x-enum-varnames":["PipelineReconcileFailureStageRead","PipelineReconcileFailureStageLoad","PipelineReconcileFailureStageMarshal","PipelineReconcileFailureStageTransaction","PipelineReconcileFailureStageSource"]}},"required":["stage","message"],"type":"object"},"PipelineReconcileRequest":{"additionalProperties":false,"description":"Request to reconcile Git-authored pipeline specs into DB-canonical storage.","properties":{"dry_run":{"default":false,"description":"When true, computes the reconciliation report without mutating DB state or writing to git.","example":true,"type":"boolean"},"expected_source":{"$ref":"#/components/schemas/PipelineReconcileExpectedSource"},"pipeline_dir":{"default":"pipelines","description":"Directory inside the git repository to scan for pipeline specs.","example":"pipelines","minLength":1,"type":"string"},"pipeline_slugs":{"description":"Optional filter limiting reconciliation to these pipeline slugs. Unselected git specs are reported as skipped and do not cause stale DB rows to be deleted.","example":["acme-users-sync"],"items":{"$ref":"#/components/schemas/Slug"},"type":"array","uniqueItems":true}},"type":"object"},"PipelineReconcileResponse":{"description":"Result of a synchronous git pipeline reconciliation operation.","properties":{"deleted":{"description":"Git-authored DB pipelines deleted as stale, or that would be deleted when dry_run is true.","items":{"$ref":"#/components/schemas/PipelineReconcileDeletedPipeline"},"type":"array"},"drift_resets":{"description":"Drifted Git-authored DB specs reset back to the git source.","items":{"$ref":"#/components/schemas/PipelineReconcileDriftReset"},"type":"array"},"dry_run":{"description":"Whether the operation was executed without mutations.","example":true,"type":"boolean"},"failures":{"description":"Per-pipeline failures collected during reconciliation.","items":{"$ref":"#/components/schemas/PipelineReconcileFailure"},"type":"array"},"pipeline_dir":{"description":"Directory scanned inside the git repository.","example":"pipelines","type":"string"},"requested_pipeline_slugs":{"description":"Pipeline slug filter requested by the caller.","items":{"$ref":"#/components/schemas/Slug"},"type":"array"},"skipped":{"description":"Git specs or DB rows intentionally skipped with a concrete reason.","items":{"$ref":"#/components/schemas/PipelineReconcileSkippedPipeline"},"type":"array"},"source":{"$ref":"#/components/schemas/PipelineReconcileSourceMetadata"},"summary":{"$ref":"#/components/schemas/PipelineReconcileSummary"},"synced":{"description":"Pipelines that were synchronized, or would be synchronized when dry_run is true.","items":{"$ref":"#/components/schemas/PipelineReconcileSyncedPipeline"},"type":"array"}},"required":["dry_run","pipeline_dir","requested_pipeline_slugs","source","summary","synced","deleted","skipped","drift_resets","failures"],"type":"object"},"PipelineReconcileSkippedPipeline":{"description":"Pipeline skipped intentionally during reconcile.","properties":{"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"reason":{"$ref":"#/components/schemas/PipelineReconcileSkippedReason"},"source_path":{"description":"Git path associated with the skipped pipeline, when known.","example":"pipelines/other.pipeline.yaml","nullable":true,"type":"string"}},"required":["pipeline_slug","reason"],"type":"object"},"PipelineReconcileSkippedReason":{"description":"Reason a pipeline was intentionally skipped during reconcile.","enum":["filtered_out","not_git_managed"],"example":"filtered_out","type":"string","x-enum-varnames":["PipelineReconcileSkippedReasonFilteredOut","PipelineReconcileSkippedReasonNotGitManaged"]},"PipelineReconcileSourceMetadata":{"description":"Git source metadata used for the reconcile operation.","properties":{"commit":{"description":"Commit SHA recorded as the latest applied source revision.","example":"f4a1920c8e6b66e9a07a3f1a4ec67631a7de91ef","nullable":true,"type":"string"},"data_source_slug":{"$ref":"#/components/schemas/NullableSlug"},"ref":{"description":"Git ref recorded on reconciled pipeline specs.","example":"refs/heads/main","nullable":true,"type":"string"},"repo":{"description":"Normalized source repository URL recorded on reconciled pipeline specs.","example":"https://github.com/Braidplane/acme-pipelines.git","nullable":true,"type":"string"}},"required":["data_source_slug"],"type":"object"},"PipelineReconcileSummary":{"description":"Count summary for one reconcile operation.","properties":{"deleted":{"description":"Number of stale Git-authored DB pipelines deleted, or that would be deleted when dry_run is true.","example":1,"minimum":0,"type":"integer"},"drift_reset":{"description":"Number of drifted Git-authored DB specs reset to git content.","example":1,"minimum":0,"type":"integer"},"failed":{"description":"Number of pipeline-level failures collected.","example":1,"minimum":0,"type":"integer"},"scanned":{"description":"Number of git pipeline spec files considered.","example":3,"minimum":0,"type":"integer"},"skipped":{"description":"Number of pipelines skipped intentionally.","example":1,"minimum":0,"type":"integer"},"synced":{"description":"Number of pipelines synchronized, or that would be synchronized when dry_run is true.","example":1,"minimum":0,"type":"integer"}},"required":["scanned","synced","deleted","skipped","failed","drift_reset"],"type":"object"},"PipelineReconcileSyncedPipeline":{"description":"Pipeline synchronized from git into DB-canonical storage.","properties":{"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"source_path":{"description":"Pipeline spec path inside the git repository.","example":"pipelines/acme-users-sync.pipeline.yaml","type":"string"},"spec_hash":{"description":"Hash of the applied canonical spec JSON.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","type":"string"}},"required":["pipeline_slug","source_path","spec_hash"],"type":"object"},"PipelineRef":{"description":"Persisted pipeline reference metadata.","properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"current_version_spec_hash":{"description":"Immutable hash of the latest persisted version for this pipeline.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","nullable":true,"type":"string"},"has_draft":{"description":"Whether the currently authenticated member has a saved draft for this pipeline.","example":true,"type":"boolean"},"last_applied_commit":{"description":"Immutable commit SHA of the latest Git version applied into canonical DB storage.","example":"abc123def456","type":"string"},"name":{"$ref":"#/components/schemas/Name"},"slug":{"$ref":"#/components/schemas/Slug"},"source_path":{"description":"Source path within the authoritative upstream repository.","example":"pipelines/acme-users-sync.pipeline.yaml","type":"string"},"source_ref":{"description":"Source Git ref used for the latest applied version.","example":"refs/heads/main","type":"string"},"sync_status":{"$ref":"#/components/schemas/PipelineSyncStatus"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","name","sync_status","source_path","source_ref","last_applied_commit","has_draft","created_at","updated_at"],"type":"object"},"PipelineRunAPISourceSummary":{"additionalProperties":false,"description":"Safe immutable summary for an API-started pipeline run. Raw request bodies, headers, tokens, credentials, and parameter values are never exposed here.","properties":{"actor_slug":{"$ref":"#/components/schemas/NullableSlug"},"actor_type":{"$ref":"#/components/schemas/EventActorType"},"attempt_number":{"description":"Attempt number within the retry group. First attempts are 1.","example":1,"minimum":1,"type":"integer"},"entrypoint":{"description":"Stable API boundary that requested the run.","enum":["api"],"example":"api","type":"string","x-enum-varnames":["PipelineRunAPISourceSummaryEntrypointApi"]},"parameter_keys":{"description":"Names of supplied run parameters or request fields; raw values are intentionally not stored.","example":["run_slug","protected_environment_confirmation"],"items":{"type":"string"},"type":"array"},"request_id":{"description":"Request correlation identifier captured at run start when available.","example":"req-01hzeq7j0y0n2b7n2wq8f6zcq3","nullable":true,"type":"string"},"retry_of_run_slug":{"$ref":"#/components/schemas/NullableSlug"},"root_run_slug":{"$ref":"#/components/schemas/Slug"},"source_event_slug":{"$ref":"#/components/schemas/NullableSlug"},"summary":{"description":"Short operator-facing source summary.","example":"API run","type":"string"},"trace_id":{"description":"OpenTelemetry trace identifier captured at run start when available.","example":"4bf92f3577b34da6a3ce929d0e0e4736","nullable":true,"type":"string"},"type":{"description":"API run source category.","enum":["api"],"example":"api","type":"string","x-enum-varnames":["PipelineRunAPISourceSummaryTypeApi"]}},"required":["type","summary","entrypoint","actor_type","actor_slug","request_id","trace_id","parameter_keys","source_event_slug","attempt_number","root_run_slug","retry_of_run_slug"],"type":"object"},"PipelineRunCheckpointCommitResult":{"description":"Checkpoint commit outcome for one incremental source.","properties":{"blocked_by_step":{"example":"persist-users","type":"string"},"blocked_reason":{"example":"sink write failed","type":"string"},"status":{"$ref":"#/components/schemas/PipelineRunCheckpointStatus"}},"required":["status","blocked_by_step","blocked_reason"],"type":"object"},"PipelineRunCheckpointStatus":{"description":"Run-level checkpoint promotion status.","enum":["not_applicable","committed","blocked","unchanged","skipped"],"example":"committed","type":"string"},"PipelineRunCheckpointSummary":{"description":"Compact sanitized checkpoint display value. Raw checkpoint bodies are not exposed.","properties":{"display_metadata":{"additionalProperties":true,"type":"object"},"raw_value_exposed":{"example":false,"type":"boolean"},"summary":{"example":"up to 2026-05-24T11:00:00Z","type":"string"}},"required":["summary","raw_value_exposed"],"type":"object"},"PipelineRunContractFailureDiagnostic":{"description":"Sanitized contract validation failure detail for a failed run.","properties":{"contract_name":{"example":"users_rows","type":"string"},"field_name":{"example":"email","type":"string"},"reason_code":{"example":"contract_field_validation_failed","type":"string"},"rule":{"example":"format","type":"string"},"violation_count":{"example":1,"minimum":1,"type":"integer"}},"required":["contract_name","field_name","rule","violation_count","reason_code"],"type":"object"},"PipelineRunDocumentsOutputDetails":{"additionalProperties":false,"description":"Document-shaped output metadata for MongoDB results.","properties":{"document_count":{"description":"Number of documents produced when the connector reports it.","example":2,"type":"integer"},"kind":{"enum":["documents"],"example":"documents","type":"string","x-enum-varnames":["PipelineRunDocumentsOutputDetailsKindDocuments"]}},"required":["kind"],"type":"object"},"PipelineRunEventInputSummary":{"additionalProperties":false,"description":"Safe metadata for one run-scoped JSON input. Raw input values are never exposed.","properties":{"digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"digest_algorithm":{"enum":["sha256"],"type":"string","x-enum-varnames":["PipelineRunEventInputSummaryDigestAlgorithmSha256"]},"keys":{"items":{"$ref":"#/components/schemas/Slug"},"maxItems":1,"minItems":1,"type":"array"},"representation":{"enum":["json"],"type":"string","x-enum-varnames":["PipelineRunEventInputSummaryRepresentationJson"]},"size_bytes":{"format":"int64","maximum":1048576,"minimum":1,"type":"integer"}},"required":["keys","representation","size_bytes","digest_algorithm","digest"],"type":"object"},"PipelineRunFailureContext":{"description":"Failure pointer for a failed run","properties":{"action_hint":{"description":"Short user-actionable hint for the failure category.","example":"Review the sink insert/upsert behavior or remove duplicate rows before retrying.","nullable":true,"type":"string"},"at":{"$ref":"#/components/schemas/Timestamp"},"contract":{"allOf":[{"$ref":"#/components/schemas/PipelineRunContractFailureDiagnostic"}],"nullable":true},"data_source_slug":{"description":"Slug of the data source involved in the failure, when applicable.","example":"acme-mysql","nullable":true,"type":"string"},"error":{"example":"connector timeout","type":"string"},"kind":{"$ref":"#/components/schemas/PipelineRunFailureKind"},"reason_code":{"allOf":[{"$ref":"#/components/schemas/PipelineRunFailureReasonCode"}],"description":"Stable, bounded failure reason code for operator triage when the runtime can classify the launch-path cause.","nullable":true},"side":{"$ref":"#/components/schemas/PipelineRunFailureSide"},"step":{"$ref":"#/components/schemas/Slug"}},"required":["step","error","at","kind","side","reason_code","data_source_slug","action_hint","contract"],"type":"object"},"PipelineRunFailureKind":{"description":"Broad classification of a pipeline run failure.","enum":["data_source","platform"],"example":"data_source","type":"string"},"PipelineRunFailureReasonCode":{"description":"Stable, secret-safe machine-readable cause for launch-path run failures.","enum":["data_source_credentials_failed","source_query_failed","source_result_shape_mismatch","transform_runtime_failed","transform_contract_mismatch","sink_contract_mismatch","s3_object_write_failed"],"example":"s3_object_write_failed","type":"string"},"PipelineRunFailureSide":{"description":"Which side of the pipeline step produced the failure.","enum":["source","sink","transform","connector"],"example":"sink","type":"string"},"PipelineRunFileReadOutputDetails":{"additionalProperties":false,"description":"File or object read metadata captured without raw bytes.","properties":{"column_names":{"example":["id","email"],"items":{"type":"string"},"type":"array"},"file":{"allOf":[{"$ref":"#/components/schemas/FilePayloadMetadata"}],"nullable":true},"kind":{"enum":["file_read"],"example":"file_read","type":"string","x-enum-varnames":["PipelineRunFileReadOutputDetailsKindFileRead"]},"row_count":{"description":"Number of rows read when the file/object was parsed as structured data.","example":2,"type":"integer"},"target_path":{"description":"Resolved file path, repository path, or object key used for the read.","example":"exports/users-2026-03-21.csv","type":"string"}},"required":["kind"],"type":"object"},"PipelineRunFileWriteOutputDetails":{"additionalProperties":false,"description":"File or object write metadata captured without raw bytes.","properties":{"file":{"allOf":[{"$ref":"#/components/schemas/FilePayloadMetadata"}],"nullable":true},"kind":{"enum":["file_write"],"example":"file_write","type":"string","x-enum-varnames":["PipelineRunFileWriteOutputDetailsKindFileWrite"]},"target_path":{"description":"Resolved file path, repository path, or object key written by the sink.","example":"golden-path/runs/golden-path-run-001/joined-orders.json","type":"string"},"written_bytes":{"description":"Number of bytes written by the file/object sink, when the connector reports it.","example":128,"type":"integer"},"written_rows":{"description":"Number of rows serialized by the write, when the connector reports it.","example":2,"type":"integer"}},"required":["kind","target_path"],"type":"object"},"PipelineRunHTTPResponseOutputDetails":{"additionalProperties":false,"description":"HTTP response metadata captured without storing sensitive headers or bodies.","properties":{"file":{"allOf":[{"$ref":"#/components/schemas/FilePayloadMetadata"}],"nullable":true},"kind":{"enum":["http_response"],"example":"http_response","type":"string","x-enum-varnames":["PipelineRunHTTPResponseOutputDetailsKindHttpResponse"]},"status_code":{"description":"HTTP response status code.","example":200,"type":"integer"}},"required":["kind","status_code"],"type":"object"},"PipelineRunIncrementalDiagnostics":{"description":"Sanitized detailed incremental diagnostics for run detail surfaces.","properties":{"replay_safety":{"$ref":"#/components/schemas/PipelineRunReplaySafety"},"sources":{"items":{"$ref":"#/components/schemas/PipelineRunIncrementalSourceDiagnostic"},"type":"array"}},"required":["sources","replay_safety"],"type":"object"},"PipelineRunIncrementalSourceDiagnostic":{"description":"Sanitized per-source incremental execution diagnostics.","properties":{"checkpoint_kind":{"example":"watermark","type":"string"},"commit_result":{"$ref":"#/components/schemas/PipelineRunCheckpointCommitResult"},"observed_checkpoint":{"$ref":"#/components/schemas/PipelineRunCheckpointSummary"},"previous_checkpoint":{"$ref":"#/components/schemas/PipelineRunCheckpointSummary"},"source_step_slug":{"example":"fetch-users","type":"string"},"window":{"$ref":"#/components/schemas/PipelineRunSourceWindowSummary"}},"required":["source_step_slug","checkpoint_kind","previous_checkpoint","window","observed_checkpoint","commit_result"],"type":"object"},"PipelineRunIncrementalSummary":{"description":"Sanitized run-level incremental execution summary.","properties":{"backfill_chunk_count":{"example":10,"type":"integer"},"backfill_chunk_index":{"example":1,"type":"integer"},"backfill_series_slug":{"example":"users-backfill-202605","type":"string"},"blocked_reason":{"example":"sink write failed","type":"string"},"checkpoint_status":{"$ref":"#/components/schemas/PipelineRunCheckpointStatus"},"mode":{"$ref":"#/components/schemas/PipelineRunMode"},"replay_blocked_reason":{"example":"sink write failed","type":"string"},"replay_safety_status":{"$ref":"#/components/schemas/PipelineRunReplaySafetyStatus"},"source_step_slug":{"example":"fetch-users","type":"string"}},"required":["mode","checkpoint_status","source_step_slug","blocked_reason","replay_safety_status","replay_blocked_reason","backfill_series_slug","backfill_chunk_index","backfill_chunk_count"],"type":"object"},"PipelineRunListResponse":{"description":"Paginated list of pipeline runs","properties":{"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-03-16T18:40:00Z_run-abc123","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-03-16T18:20:00Z_run-xyz789","nullable":true,"type":"string"},"runs":{"items":{"$ref":"#/components/schemas/PipelineRunMetadata"},"type":"array"}},"required":["runs","has_more"],"type":"object"},"PipelineRunManualSourceSummary":{"additionalProperties":false,"description":"Safe immutable summary for a manual UI-started pipeline run. Raw request bodies, headers, tokens, credentials, and parameter values are never exposed here.","properties":{"actor_slug":{"$ref":"#/components/schemas/NullableSlug"},"actor_type":{"$ref":"#/components/schemas/EventActorType"},"attempt_number":{"description":"Attempt number within the retry group. First attempts are 1.","example":1,"minimum":1,"type":"integer"},"entrypoint":{"description":"Stable product boundary that requested the run.","enum":["ui"],"example":"ui","type":"string","x-enum-varnames":["PipelineRunManualSourceSummaryEntrypointUi"]},"parameter_keys":{"description":"Names of supplied run parameters or request fields; raw values are intentionally not stored.","example":["run_slug","protected_environment_confirmation"],"items":{"type":"string"},"type":"array"},"request_id":{"description":"Request correlation identifier captured at run start when available.","example":"req-01hzeq7j0y0n2b7n2wq8f6zcq3","nullable":true,"type":"string"},"retry_of_run_slug":{"$ref":"#/components/schemas/NullableSlug"},"root_run_slug":{"$ref":"#/components/schemas/Slug"},"source_event_slug":{"$ref":"#/components/schemas/NullableSlug"},"summary":{"description":"Short operator-facing source summary.","example":"Manual run","type":"string"},"trace_id":{"description":"OpenTelemetry trace identifier captured at run start when available.","example":"4bf92f3577b34da6a3ce929d0e0e4736","nullable":true,"type":"string"},"type":{"description":"Manual UI run source category.","enum":["manual"],"example":"manual","type":"string","x-enum-varnames":["PipelineRunManualSourceSummaryTypeManual"]}},"required":["type","summary","entrypoint","actor_type","actor_slug","request_id","trace_id","parameter_keys","source_event_slug","attempt_number","root_run_slug","retry_of_run_slug"],"type":"object"},"PipelineRunMetadata":{"description":"Persisted metadata summary for a pipeline run","properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"duration_ms":{"example":245,"format":"int64","type":"integer"},"ended_at":{"$ref":"#/components/schemas/NullableTimestamp"},"environment_slug":{"$ref":"#/components/schemas/Slug"},"error_summary":{"description":"Short error summary when status is failed","example":"step fetch-users failed: relation users does not exist","nullable":true,"type":"string"},"failure_kind":{"allOf":[{"$ref":"#/components/schemas/PipelineRunFailureKind"}],"description":"Broad failure classification when status is failed; null for succeeded runs.","nullable":true},"incremental":{"$ref":"#/components/schemas/PipelineRunIncrementalSummary"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"pipeline_version_spec_hash":{"description":"Hash of the exact immutable pipeline version executed for this run.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","type":"string"},"replay_from_step":{"$ref":"#/components/schemas/NullableSlug"},"replay_of_run_slug":{"$ref":"#/components/schemas/NullableSlug"},"request_id":{"description":"Request correlation identifier when available","example":"req-01hzeq7j0y0n2b7n2wq8f6zcq3","nullable":true,"type":"string"},"run_slug":{"$ref":"#/components/schemas/Slug"},"source":{"$ref":"#/components/schemas/PipelineRunSourceSummary"},"started_at":{"$ref":"#/components/schemas/Timestamp"},"status":{"enum":["queued","running","succeeded","failed","canceled"],"example":"succeeded","type":"string"},"step_count":{"example":3,"format":"int32","type":"integer"},"step_slug":{"description":"Terminal or current step slug for the run; empty while the run is queued or before any step has started.","example":"persist-users","type":"string"}},"required":["pipeline_slug","environment_slug","pipeline_version_spec_hash","run_slug","request_id","status","duration_ms","step_count","step_slug","error_summary","failure_kind","started_at","ended_at","replay_of_run_slug","replay_from_step","incremental","created_at"],"type":"object"},"PipelineRunMode":{"description":"Operator-facing pipeline run execution mode.","enum":["full","incremental","backfill"],"example":"incremental","type":"string"},"PipelineRunRecord":{"description":"Full persisted run diagnostics record","properties":{"incremental_diagnostics":{"$ref":"#/components/schemas/PipelineRunIncrementalDiagnostics"},"metadata":{"$ref":"#/components/schemas/PipelineRunMetadata"},"proof_link":{"allOf":[{"$ref":"#/components/schemas/ProofLifecycleLink"}],"nullable":true},"timeline":{"$ref":"#/components/schemas/PipelineRunTimeline"}},"required":["metadata","timeline","incremental_diagnostics","proof_link"],"type":"object"},"PipelineRunReplaySafety":{"description":"Automatic replay-safety diagnostic for a run.","properties":{"blocked_reason":{"example":"sink write failed","type":"string"},"blocked_sink":{"example":"persist-users","type":"string"},"status":{"$ref":"#/components/schemas/PipelineRunReplaySafetyStatus"}},"required":["status","blocked_sink","blocked_reason"],"type":"object"},"PipelineRunReplaySafetyStatus":{"description":"Whether automatic replay is considered safe for this run.","enum":["safe","blocked"],"example":"safe","type":"string"},"PipelineRunRowsOutputDetails":{"additionalProperties":false,"description":"Row-shaped output metadata for SQL, HubSpot, and transform results.","properties":{"column_names":{"example":["id","email"],"items":{"type":"string"},"type":"array"},"kind":{"enum":["rows"],"example":"rows","type":"string","x-enum-varnames":["PipelineRunRowsOutputDetailsKindRows"]},"row_count":{"description":"Number of rows produced by a read or transform result.","example":10,"type":"integer"}},"required":["kind","row_count"],"type":"object"},"PipelineRunScheduleMisfireResult":{"description":"Executed scheduled-run misfire result exposed in run history. Skipped scheduled fires are persisted as schedule-fire diagnostics without creating a pipeline run.","enum":["on_time","fire_once"],"example":"on_time","type":"string","x-enum-varnames":["PipelineRunScheduleMisfireResultOnTime","PipelineRunScheduleMisfireResultFireOnce"]},"PipelineRunScheduleSourceSummary":{"additionalProperties":false,"description":"Safe immutable summary for a scheduled pipeline run. Raw request bodies, headers, tokens, credentials, and parameter values are never exposed here.","properties":{"actor_slug":{"$ref":"#/components/schemas/NullableSlug"},"actor_type":{"$ref":"#/components/schemas/EventActorType"},"attempt_number":{"description":"Attempt number within the retry group. First attempts are 1.","example":2,"minimum":1,"type":"integer"},"entrypoint":{"description":"Stable scheduler boundary that requested the run.","enum":["scheduler"],"example":"scheduler","type":"string","x-enum-varnames":["PipelineRunScheduleSourceSummaryEntrypointScheduler"]},"parameter_keys":{"description":"Names of supplied run parameters or request fields; raw values are intentionally not stored.","example":["customer_id","dry_run"],"items":{"type":"string"},"type":"array"},"request_id":{"description":"Request correlation identifier captured at run start when available.","example":"req-01hzeq7j0y0n2b7n2wq8f6zcq3","nullable":true,"type":"string"},"retry_of_run_slug":{"$ref":"#/components/schemas/NullableSlug"},"root_run_slug":{"$ref":"#/components/schemas/Slug"},"schedule":{"$ref":"#/components/schemas/PipelineRunSourceScheduleSummary"},"source_event_slug":{"$ref":"#/components/schemas/NullableSlug"},"summary":{"description":"Short operator-facing source summary.","example":"Scheduled run from trigger daily-users","type":"string"},"trace_id":{"description":"OpenTelemetry trace identifier captured at run start when available.","example":"4bf92f3577b34da6a3ce929d0e0e4736","nullable":true,"type":"string"},"type":{"description":"Scheduled run source category.","enum":["schedule"],"example":"schedule","type":"string","x-enum-varnames":["PipelineRunScheduleSourceSummaryTypeSchedule"]}},"required":["type","summary","entrypoint","actor_type","actor_slug","request_id","trace_id","parameter_keys","source_event_slug","attempt_number","root_run_slug","retry_of_run_slug","schedule"],"type":"object"},"PipelineRunSourceScheduleSummary":{"additionalProperties":false,"description":"Safe schedule trigger context for an executed scheduled pipeline run. Parameter values are intentionally not stored here.","properties":{"actual_fire_at":{"$ref":"#/components/schemas/Timestamp"},"cron":{"description":"Cron expression evaluated by the scheduler.","example":"0 7 * * *","type":"string"},"misfire_result":{"$ref":"#/components/schemas/PipelineRunScheduleMisfireResult"},"scheduled_fire_at":{"$ref":"#/components/schemas/Timestamp"},"timezone":{"description":"IANA timezone used to evaluate the cron expression.","example":"UTC","type":"string"},"trigger_revision":{"description":"Trigger revision that produced this scheduled fire.","example":3,"format":"int64","type":"integer"},"trigger_slug":{"$ref":"#/components/schemas/Slug"}},"required":["trigger_slug","trigger_revision","cron","timezone","scheduled_fire_at","actual_fire_at","misfire_result"],"type":"object"},"PipelineRunSourceSummary":{"discriminator":{"mapping":{"api":"#/components/schemas/PipelineRunAPISourceSummary","manual":"#/components/schemas/PipelineRunManualSourceSummary","schedule":"#/components/schemas/PipelineRunScheduleSourceSummary","webhook":"#/components/schemas/PipelineRunWebhookSourceSummary"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/PipelineRunManualSourceSummary"},{"$ref":"#/components/schemas/PipelineRunAPISourceSummary"},{"$ref":"#/components/schemas/PipelineRunScheduleSourceSummary"},{"$ref":"#/components/schemas/PipelineRunWebhookSourceSummary"}]},"PipelineRunSourceWebhookSummary":{"additionalProperties":false,"description":"Safe generic webhook trigger and delivery metadata.","properties":{"delivery_id":{"maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._:-]+$","type":"string"},"payload_digest":{"pattern":"^[0-9a-f]{64}$","type":"string"},"payload_size_bytes":{"format":"int64","minimum":0,"type":"integer"},"received_at":{"$ref":"#/components/schemas/Timestamp"},"trigger_revision":{"format":"int64","minimum":1,"type":"integer"},"trigger_slug":{"$ref":"#/components/schemas/Slug"},"verification_status":{"enum":["verified"],"type":"string","x-enum-varnames":["PipelineRunSourceWebhookSummaryVerificationStatusVerified"]}},"required":["trigger_slug","trigger_revision","delivery_id","payload_digest","payload_size_bytes","received_at","verification_status"],"type":"object"},"PipelineRunSourceWindowSummary":{"description":"Compact sanitized effective source read window.","properties":{"display_metadata":{"additionalProperties":true,"type":"object"},"lower_bound":{"example":"2026-05-01","type":"string"},"raw_value_exposed":{"example":false,"type":"boolean"},"summary":{"example":"2026-05-01 to 2026-05-02","type":"string"},"upper_bound":{"example":"2026-05-02","type":"string"}},"required":["summary","raw_value_exposed"],"type":"object"},"PipelineRunStepInputSnapshot":{"description":"Sanitized step input metadata captured during execution","properties":{"data_source_slug":{"$ref":"#/components/schemas/Slug"},"environment_slug":{"$ref":"#/components/schemas/Slug"},"event_input":{"$ref":"#/components/schemas/PipelineRunEventInputSummary"},"operation_ref":{"$ref":"#/components/schemas/Slug"},"operation_type":{"example":"sql","type":"string"},"organization_slug":{"$ref":"#/components/schemas/Slug"},"parameter_keys":{"items":{"type":"string"},"type":"array"},"sink_delivery_outcome":{"description":"Outcome at this attempt. failed means dispatch did not begin; unknown means dispatch may have produced effects. confirmed means ledger-confirmed completion; no_op means explicitly skipped empty input.","enum":["confirmed","failed","unknown","no_op"],"type":"string"},"sink_effect_state":{"description":"Durable side-effect ledger state when a sink was dispatched.","enum":["in_progress","succeeded"],"type":"string"},"sink_replay_decision":{"description":"Durable decision for this delivery attempt or replay.","example":"skip_ledger_succeeded","type":"string"},"sink_replay_method":{"description":"Connector-safe replay mechanism selected by the runtime.","example":"deterministic_external_write","type":"string"},"sink_replay_strategy":{"description":"Declared sink replay strategy, without an idempotency key or payload.","enum":["naturally_idempotent","idempotent_with_key","deduplicated_by_ledger","unsafe"],"type":"string"},"uses_inline":{"description":"Indicates whether the step executed an inline operation instead of a referenced operation.","example":true,"type":"boolean"}},"required":["organization_slug","environment_slug","parameter_keys"],"type":"object"},"PipelineRunStepOutputDetails":{"description":"Narrow operator metadata persisted in run-detail snapshots. Do not reuse QueryExecutionResult schemas here; query execution responses can include rows, documents, headers, bodies, and other payload values that run details intentionally exclude.","discriminator":{"mapping":{"documents":"#/components/schemas/PipelineRunDocumentsOutputDetails","file_read":"#/components/schemas/PipelineRunFileReadOutputDetails","file_write":"#/components/schemas/PipelineRunFileWriteOutputDetails","http_response":"#/components/schemas/PipelineRunHTTPResponseOutputDetails","rows":"#/components/schemas/PipelineRunRowsOutputDetails","unknown":"#/components/schemas/PipelineRunUnknownOutputDetails"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/PipelineRunUnknownOutputDetails"},{"$ref":"#/components/schemas/PipelineRunRowsOutputDetails"},{"$ref":"#/components/schemas/PipelineRunDocumentsOutputDetails"},{"$ref":"#/components/schemas/PipelineRunHTTPResponseOutputDetails"},{"$ref":"#/components/schemas/PipelineRunFileReadOutputDetails"},{"$ref":"#/components/schemas/PipelineRunFileWriteOutputDetails"}]},"PipelineRunStepOutputSnapshot":{"description":"Connector-agnostic output metadata for a step with typed result details.","properties":{"details":{"$ref":"#/components/schemas/PipelineRunStepOutputDetails"},"duration_ms":{"example":120,"format":"int64","type":"integer"},"operation_type":{"description":"Connector-native operation captured when available, such as a MongoDB operation or file/object read/write action.","example":"write","type":"string"},"result_type":{"example":"sql","type":"string"},"vendor_type":{"example":"postgres","type":"string"}},"required":["result_type","vendor_type","duration_ms","details"],"type":"object"},"PipelineRunStepSnapshot":{"description":"Sanitized input/output capture for a single pipeline step","properties":{"input":{"$ref":"#/components/schemas/PipelineRunStepInputSnapshot"},"kind":{"allOf":[{"$ref":"#/components/schemas/PipelineStepKind"}],"description":"Pipeline step kind captured so run detail can distinguish sink delivery metadata from source reads.","example":"sink"},"output":{"allOf":[{"$ref":"#/components/schemas/PipelineRunStepOutputSnapshot"}],"nullable":true},"step":{"$ref":"#/components/schemas/Slug"}},"required":["step","input","output"],"type":"object"},"PipelineRunTimeline":{"description":"Structured lifecycle timeline and diagnostics snapshots for a persisted run.","properties":{"environment_slug":{"$ref":"#/components/schemas/Slug"},"events":{"items":{"$ref":"#/components/schemas/PipelineRunTimelineEvent"},"type":"array"},"failure":{"allOf":[{"$ref":"#/components/schemas/PipelineRunFailureContext"}],"nullable":true},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"replay_of_run_slug":{"$ref":"#/components/schemas/NullableSlug"},"run_slug":{"$ref":"#/components/schemas/Slug"},"snapshots":{"items":{"$ref":"#/components/schemas/PipelineRunStepSnapshot"},"type":"array"},"status":{"enum":["queued","running","succeeded","failed","canceled"],"type":"string","x-enum-varnames":["PipelineRunTimelineStatusQueued","PipelineRunTimelineStatusRunning","PipelineRunTimelineStatusSucceeded","PipelineRunTimelineStatusFailed","PipelineRunTimelineStatusCanceled"]}},"required":["run_slug","pipeline_slug","environment_slug","status","replay_of_run_slug","events","snapshots","failure"],"type":"object"},"PipelineRunTimelineEvent":{"description":"Event entry emitted during pipeline execution lifecycle","properties":{"at":{"$ref":"#/components/schemas/Timestamp"},"status":{"example":"running","type":"string"},"step":{"$ref":"#/components/schemas/NullableSlug"},"type":{"example":"step_started","type":"string"}},"required":["at","type","step","status"],"type":"object"},"PipelineRunTriggerRetryAttempt":{"additionalProperties":false,"description":"Durable trigger retry decision and execution handoff diagnostic for a pipeline run retry group.","properties":{"attempt_number":{"description":"Attempt number within the retry group. Initial runs are attempt 1; retry attempt rows start at 2.","example":2,"minimum":2,"type":"integer"},"attempt_slug":{"$ref":"#/components/schemas/Slug"},"completed_at":{"$ref":"#/components/schemas/NullableTimestamp"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"decision_reason":{"description":"Stable reason for queued, skipped, or exhausted retry decisions.","example":"max_attempts_exhausted","nullable":true,"type":"string"},"enqueued_at":{"$ref":"#/components/schemas/NullableTimestamp"},"error_summary":{"description":"Terminal retry execution error summary when the retry attempt failed.","example":"connector timeout","nullable":true,"type":"string"},"failure_kind":{"allOf":[{"$ref":"#/components/schemas/PipelineTriggerRetryFailureKind"}],"description":"Failure category that drove the retry decision; null when no retryable category was recorded.","nullable":true},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"retry_of_run_slug":{"$ref":"#/components/schemas/Slug"},"root_run_slug":{"$ref":"#/components/schemas/Slug"},"run_slug":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Reserved retry run slug when execution was queued; null for decision-only rows without a retry run.","nullable":true},"scheduled_at":{"$ref":"#/components/schemas/Timestamp"},"source_event_slug":{"$ref":"#/components/schemas/NullableSlug"},"started_at":{"$ref":"#/components/schemas/NullableTimestamp"},"status":{"$ref":"#/components/schemas/PipelineTriggerRetryAttemptStatus"},"trigger_revision":{"description":"Trigger revision whose retry policy produced this attempt.","example":3,"format":"int64","type":"integer"},"trigger_slug":{"$ref":"#/components/schemas/Slug"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["attempt_slug","status","decision_reason","trigger_slug","trigger_revision","pipeline_slug","root_run_slug","retry_of_run_slug","attempt_number","failure_kind","source_event_slug","scheduled_at","enqueued_at","started_at","completed_at","error_summary","created_at","updated_at"],"type":"object"},"PipelineRunTriggerRetryAttemptListResponse":{"additionalProperties":false,"description":"Trigger retry attempts linked to a pipeline run retry group.","properties":{"retry_attempts":{"items":{"$ref":"#/components/schemas/PipelineRunTriggerRetryAttempt"},"type":"array"}},"required":["retry_attempts"],"type":"object"},"PipelineRunUnknownOutputDetails":{"additionalProperties":false,"description":"Placeholder details for result types that did not expose safe operator-facing metadata.","properties":{"kind":{"enum":["unknown"],"example":"unknown","type":"string","x-enum-varnames":["PipelineRunUnknownOutputDetailsKindUnknown"]}},"required":["kind"],"type":"object"},"PipelineRunWebhookSourceSummary":{"additionalProperties":false,"description":"Safe immutable summary for a verified generic pipeline webhook run. Payload values, receiver identities, headers, and signatures are never exposed here.","properties":{"actor_slug":{"$ref":"#/components/schemas/NullableSlug"},"actor_type":{"$ref":"#/components/schemas/EventActorType"},"attempt_number":{"minimum":1,"type":"integer"},"entrypoint":{"enum":["webhook"],"type":"string","x-enum-varnames":["PipelineRunWebhookSourceSummaryEntrypointWebhook"]},"parameter_keys":{"items":{"type":"string"},"type":"array"},"request_id":{"nullable":true,"type":"string"},"retry_of_run_slug":{"$ref":"#/components/schemas/NullableSlug"},"root_run_slug":{"$ref":"#/components/schemas/Slug"},"source_event_slug":{"$ref":"#/components/schemas/NullableSlug"},"summary":{"type":"string"},"trace_id":{"nullable":true,"type":"string"},"type":{"enum":["webhook"],"type":"string","x-enum-varnames":["PipelineRunWebhookSourceSummaryTypeWebhook"]},"webhook":{"$ref":"#/components/schemas/PipelineRunSourceWebhookSummary"}},"required":["type","summary","entrypoint","actor_type","actor_slug","request_id","trace_id","parameter_keys","source_event_slug","attempt_number","root_run_slug","retry_of_run_slug","webhook"],"type":"object"},"PipelineScheduleFire":{"additionalProperties":false,"description":"Operator-safe diagnostic record for one persisted schedule fire.","properties":{"actual_fire_at":{"$ref":"#/components/schemas/Timestamp"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"error_summary":{"description":"Safe error summary captured for failed scheduled fires.","example":"Pipeline version was unavailable at dispatch time.","maxLength":1000,"nullable":true,"type":"string"},"fire_slug":{"$ref":"#/components/schemas/Slug"},"misfire_result":{"$ref":"#/components/schemas/PipelineScheduleFireMisfireResult"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"run_slug":{"$ref":"#/components/schemas/NullableSlug"},"scheduled_fire_at":{"$ref":"#/components/schemas/Timestamp"},"source_event_slug":{"$ref":"#/components/schemas/NullableSlug"},"status":{"$ref":"#/components/schemas/PipelineScheduleFireStatus"},"trigger_revision":{"description":"Trigger definition revision that produced this fire.","example":3,"format":"int64","minimum":1,"type":"integer"},"trigger_slug":{"$ref":"#/components/schemas/Slug"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["fire_slug","trigger_slug","trigger_revision","pipeline_slug","scheduled_fire_at","actual_fire_at","status","misfire_result","run_slug","source_event_slug","error_summary","created_at","updated_at"],"type":"object"},"PipelineScheduleFireListResponse":{"description":"Paginated list of schedule-fire diagnostics for one pipeline trigger.","properties":{"has_more":{"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","nullable":true,"type":"string"},"schedule_fires":{"items":{"$ref":"#/components/schemas/PipelineScheduleFire"},"type":"array"}},"required":["schedule_fires","has_more"],"type":"object"},"PipelineScheduleFireMisfireResult":{"description":"Misfire handling result for one persisted scheduled fire, including skipped fires that did not create a run.","enum":["on_time","skipped","fire_once"],"example":"on_time","type":"string","x-enum-varnames":["PipelineScheduleFireMisfireResultOnTime","PipelineScheduleFireMisfireResultSkipped","PipelineScheduleFireMisfireResultFireOnce"]},"PipelineScheduleFireStatus":{"description":"Durable execution state for a persisted schedule fire diagnostic.","enum":["claimed","running","succeeded","failed","skipped"],"example":"succeeded","type":"string","x-enum-varnames":["PipelineScheduleFireStatusClaimed","PipelineScheduleFireStatusRunning","PipelineScheduleFireStatusSucceeded","PipelineScheduleFireStatusFailed","PipelineScheduleFireStatusSkipped"]},"PipelineSchemaContract":{"description":"Optional structural contract for runtime validation and diagnostics.","properties":{"fields":{"description":"Field-level schema. Required by rows, json, and csv contracts; omitted for file contracts because validation uses file metadata.","items":{"$ref":"#/components/schemas/PipelineSchemaContractField"},"minItems":1,"type":"array"},"name":{"description":"Optional source-level contract label; an empty value represents an unnamed contract.","example":"users_rows","type":"string"},"representation":{"description":"Output payload representation expected at this boundary.","enum":["rows","json","csv","file","multipart_form"],"example":"rows","type":"string","x-enum-varnames":["PipelineSchemaContractRepresentationRows","PipelineSchemaContractRepresentationJson","PipelineSchemaContractRepresentationCsv","PipelineSchemaContractRepresentationFile","PipelineSchemaContractRepresentationMultipartForm"]},"root_shape":{"description":"Expected root container shape for JSON payloads.","enum":["array","object"],"example":"array","type":"string"}},"required":["name"],"type":"object"},"PipelineSchemaContractField":{"properties":{"description":{"example":"User email address","type":"string"},"name":{"example":"email","minLength":1,"type":"string"},"nullable":{"example":false,"type":"boolean"},"precision":{"description":"Required for decimal fields; maximum coefficient digits at the declared scale.","maximum":38,"minimum":1,"type":"integer"},"required":{"example":true,"type":"boolean"},"scale":{"description":"Required for decimal fields; fractional digits, at most precision. Decimal contract validation rejects inexact values; SQL casts quantize half-even explicitly.","maximum":38,"minimum":0,"type":"integer"},"type":{"description":"Logical field type used by pipeline contracts.","enum":["string","number","integer","decimal","boolean","object","array","datetime"],"example":"string","type":"string"},"validations":{"$ref":"#/components/schemas/PipelineSchemaContractFieldValidations"}},"required":["name","type","required"],"type":"object"},"PipelineSchemaContractFieldValidations":{"additionalProperties":false,"description":"Optional field-level contract validations enforced as contract failures.","properties":{"enum":{"description":"Accepted literal values for string, number, integer, or boolean fields.","example":["active","paused"],"items":{"$ref":"#/components/schemas/PipelineSchemaContractValidationLiteral"},"minItems":1,"type":"array"},"format":{"description":"Known string format constraint.","enum":["email","uuid","url"],"example":"email","type":"string","x-enum-varnames":["PipelineSchemaContractFieldValidationsFormatEmail","PipelineSchemaContractFieldValidationsFormatUuid","PipelineSchemaContractFieldValidationsFormatUrl"]},"max":{"$ref":"#/components/schemas/PipelineSchemaContractValidationBound"},"max_length":{"description":"Maximum string or array length.","example":255,"minimum":0,"type":"integer"},"min":{"$ref":"#/components/schemas/PipelineSchemaContractValidationBound"},"min_length":{"description":"Minimum string or array length.","example":1,"minimum":0,"type":"integer"},"unique":{"description":"Requires field values to be unique within row-like payloads when runtime data is available.","example":true,"type":"boolean"}},"type":"object"},"PipelineSchemaContractValidationBound":{"description":"Numeric or RFC3339 datetime bound used by min/max validations.","example":"2026-01-01T00:00:00Z","oneOf":[{"format":"int64","type":"integer"},{"format":"double","not":{"type":"integer"},"type":"number"},{"format":"date-time","type":"string"}]},"PipelineSchemaContractValidationLiteral":{"description":"Literal value used by contract field enum validations.","example":"active","oneOf":[{"type":"string"},{"format":"int64","type":"integer"},{"format":"double","not":{"type":"integer"},"type":"number"},{"type":"boolean"}]},"PipelineSinkSpec":{"allOf":[{"not":{"required":["input_contract","input_contract_ref"]}}],"description":"Optional delivery definition for terminal pipeline output.","properties":{"config":{"additionalProperties":true,"description":"Backend-specific sink options. FTP and Git file sinks accept path, format, delimiter, has_header, overwrite, sheet, and range. S3 sinks accept key, bucket, format, delimiter, has_header, overwrite, sheet, range, content_type, and metadata.","type":"object"},"data_source_ref":{"$ref":"#/components/schemas/Slug"},"empty_input_policy":{"description":"Explicit policy for zero-row input. skip records a no-op without dispatch; reject fails before dispatch. Omission retains connector behavior (SQL skips empty rows). Does not override input-contract validation.","enum":["skip","reject"],"type":"string"},"idempotency_class":{"description":"Required replay strategy for the sink operation. See doc/PIPELINE_DATA_MODEL.md#idempotency-and-replay-safety for the canonical class definitions, provider evidence requirements, and retry decisions. naturally_idempotent repeats the same deterministic external effect; idempotent_with_key passes a stable provider key; deduplicated_by_ledger blocks re-delivery after an uncertain durable attempt; unsafe is never retried automatically after an attempt begins.","enum":["naturally_idempotent","idempotent_with_key","deduplicated_by_ledger","unsafe"],"example":"idempotent_with_key","type":"string"},"input":{"$ref":"#/components/schemas/Slug"},"input_contract":{"$ref":"#/components/schemas/PipelineSchemaContract"},"input_contract_ref":{"$ref":"#/components/schemas/PipelineODCSContractRef"},"operation_inline":{"additionalProperties":true,"description":"Optional inline operation definition.","type":"object"},"operation_ref":{"$ref":"#/components/schemas/Slug"},"operation_type":{"description":"Operation type identifier for sink delivery. Must match the connector type of the referenced data source and determines delivery routing.","enum":["sql","bigquery","google_workspace","snowflake","http","hubspot","ftp","mongodb","git","s3"],"example":"sql","type":"string"}},"required":["input","data_source_ref","operation_type","idempotency_class"],"type":"object"},"PipelineSinkStep":{"allOf":[{"$ref":"#/components/schemas/PipelineStepBase"},{"properties":{"kind":{"enum":["sink"],"example":"sink","type":"string","x-enum-varnames":["PipelineSinkStepKindSink"]},"sink":{"$ref":"#/components/schemas/PipelineSinkSpec"}},"required":["kind","sink"],"type":"object"}]},"PipelineSpec":{"description":"Canonical pipeline spec persisted in pipeline storage.","properties":{"metadata":{"$ref":"#/components/schemas/PipelineMetadata"},"steps":{"description":"Ordered executable steps. A sink step is optional for query-only pipelines; runtime validation requires at least one sink when any transform step exists.","items":{"$ref":"#/components/schemas/PipelineStep"},"minItems":1,"type":"array"}},"required":["metadata","steps"],"type":"object"},"PipelineSpecFormatDiagnostic":{"description":"Non-fatal formatter diagnostic produced when spec-local structure affects canonical ordering.","properties":{"code":{"description":"Stable formatter diagnostic code.","enum":["unresolved_step_reference"],"example":"unresolved_step_reference","type":"string"},"message":{"description":"Safe diagnostic message for editor, builder, preview, and CLI callers.","example":"step reference could not be resolved while formatting the pipeline spec","type":"string"},"referenced_step_slug":{"description":"Raw unresolved step reference text. This may be malformed in draft specs.","example":"fetch_users","type":"string"},"step_slug":{"description":"Raw step slug text that produced the diagnostic. This may be malformed in draft specs.","example":"fetch_users","type":"string"}},"required":["code","message","step_slug","referenced_step_slug"],"type":"object"},"PipelineSpecFormatRequest":{"description":"Request to format serialized pipeline spec data without runtime validation.","properties":{"data":{"description":"Serialized pipeline spec in the declared format.","type":"string"},"format":{"description":"Serialization format for the request data and response data.","enum":["json","yaml"],"example":"yaml","type":"string","x-enum-varnames":["PipelineSpecFormatRequestFormatJson","PipelineSpecFormatRequestFormatYaml"]}},"required":["format","data"],"type":"object"},"PipelineSpecFormatResponse":{"description":"Formatted pipeline spec data and non-fatal formatter diagnostics.","properties":{"data":{"description":"Formatted pipeline spec serialized in the declared format.","type":"string"},"diagnostics":{"items":{"$ref":"#/components/schemas/PipelineSpecFormatDiagnostic"},"type":"array"},"format":{"description":"Serialization format of the formatted data.","enum":["json","yaml"],"example":"yaml","type":"string","x-enum-varnames":["PipelineSpecFormatResponseFormatJson","PipelineSpecFormatResponseFormatYaml"]}},"required":["format","data","diagnostics"],"type":"object"},"PipelineSpecUpdate":{"description":"Pipeline spec payload used for updates.","properties":{"metadata":{"$ref":"#/components/schemas/PipelineMetadataUpdate"},"steps":{"description":"Ordered executable steps. A sink step is optional for query-only pipelines; runtime validation requires at least one sink when any transform step exists.","items":{"$ref":"#/components/schemas/PipelineStep"},"minItems":1,"type":"array"}},"required":["metadata","steps"],"type":"object"},"PipelineStep":{"discriminator":{"mapping":{"input":"#/components/schemas/PipelineInputStep","query":"#/components/schemas/PipelineQueryStep","sink":"#/components/schemas/PipelineSinkStep","transform":"#/components/schemas/PipelineTransformStep"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/PipelineInputStep"},{"$ref":"#/components/schemas/PipelineQueryStep"},{"$ref":"#/components/schemas/PipelineTransformStep"},{"$ref":"#/components/schemas/PipelineSinkStep"}]},"PipelineStepBase":{"properties":{"kind":{"$ref":"#/components/schemas/PipelineStepKind"},"name":{"$ref":"#/components/schemas/Name"},"slug":{"$ref":"#/components/schemas/Slug"}},"required":["kind","slug"],"type":"object"},"PipelineStepKind":{"enum":["input","query","transform","sink"],"example":"query","type":"string"},"PipelineSyncStatus":{"description":"Sync status between DB-canonical spec and upstream git representation.","enum":["synced","drifted"],"example":"synced","type":"string"},"PipelineTransformSpec":{"allOf":[{"not":{"required":["input_contract","input_contract_ref"]}},{"not":{"required":["output_contract","output_contract_ref"]}}],"description":"SQL transform definition executed against upstream step output.","properties":{"input_contract":{"$ref":"#/components/schemas/PipelineSchemaContract"},"input_contract_ref":{"$ref":"#/components/schemas/PipelineODCSContractRef"},"inputs":{"additionalProperties":{"$ref":"#/components/schemas/Slug"},"description":"Named upstream step outputs available to transform SQL as virtual input relations. Map keys must be valid unquoted SQL relation identifiers and values are input, query, or transform step slugs.","example":{"accounts":"fetch-accounts","orders":"fetch-orders"},"minProperties":1,"type":"object"},"output_contract":{"$ref":"#/components/schemas/PipelineSchemaContract"},"output_contract_ref":{"$ref":"#/components/schemas/PipelineODCSContractRef"},"output_kind":{"description":"CSV uses projection-order columns, comma delimiters, a header even for empty results, UTF-8 and LF. Use ORDER BY on projected fields for deterministic row order.","enum":["rows","json","csv"],"example":"rows","type":"string","x-enum-varnames":["PipelineTransformSpecOutputKindRows","PipelineTransformSpecOutputKindJson","PipelineTransformSpecOutputKindCsv"]},"sql":{"description":"SQL SELECT statement for transform execution. Bounded normalization supports searched CASE, COALESCE, NULLIF, one-argument TRIM, LOWER, UPPER, explicit DECIMAL casts, and STR_TO_DATE/DATE_FORMAT with literal %Y-%m-%d or %d.%m.%Y calendar-date formats. Calendar dates are ISO date strings without a timezone; timestamp parsing is not supported. Unsupported functions and date formats reject before execution.","example":"SELECT id, email FROM input_rows","minLength":1,"type":"string"}},"required":["sql","output_kind","inputs"],"type":"object"},"PipelineTransformStep":{"allOf":[{"$ref":"#/components/schemas/PipelineStepBase"},{"properties":{"kind":{"enum":["transform"],"example":"transform","type":"string"},"transform":{"$ref":"#/components/schemas/PipelineTransformSpec"}},"required":["kind","transform"],"type":"object"}]},"PipelineTrigger":{"additionalProperties":false,"description":"Environment-scoped pipeline trigger definition. Runtime input and webhook secret values are omitted from read APIs.","not":{"anyOf":[{"$ref":"#/components/schemas/PipelineTriggerScheduleWithoutScheduleConfig"},{"$ref":"#/components/schemas/PipelineTriggerWebhookWithoutWebhookConfig"}]},"properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"created_by_actor_slug":{"$ref":"#/components/schemas/NullableSlug"},"created_by_actor_type":{"$ref":"#/components/schemas/EventActorType"},"disabled_at":{"$ref":"#/components/schemas/NullableTimestamp"},"enabled":{"type":"boolean"},"environment_slug":{"$ref":"#/components/schemas/Slug"},"name":{"$ref":"#/components/schemas/Name"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"retry_policy":{"$ref":"#/components/schemas/PipelineTriggerRetryPolicy"},"revision":{"description":"Monotonically increasing trigger definition revision.","example":3,"format":"int64","minimum":1,"type":"integer"},"runtime_input_keys":{"description":"Sorted runtime input keys this trigger may provide. Values are never persisted here.","items":{"type":"string"},"type":"array"},"schedule":{"$ref":"#/components/schemas/PipelineTriggerScheduleConfig"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"$ref":"#/components/schemas/PipelineTriggerType"},"updated_at":{"$ref":"#/components/schemas/Timestamp"},"updated_by_actor_slug":{"$ref":"#/components/schemas/NullableSlug"},"updated_by_actor_type":{"$ref":"#/components/schemas/EventActorType"},"version_policy":{"$ref":"#/components/schemas/PipelineTriggerResolvedVersionPolicy"},"webhook":{"$ref":"#/components/schemas/PipelineWebhookConfig"}},"required":["slug","name","type","enabled","revision","environment_slug","pipeline_slug","version_policy","runtime_input_keys","retry_policy","created_by_actor_type","updated_by_actor_type","disabled_at","created_at","updated_at"],"type":"object"},"PipelineTriggerBackoffStrategy":{"description":"Retry delay strategy for a pipeline trigger.","enum":["none","fixed","exponential"],"example":"exponential","type":"string","x-enum-varnames":["PipelineTriggerBackoffStrategyNone","PipelineTriggerBackoffStrategyFixed","PipelineTriggerBackoffStrategyExponential"]},"PipelineTriggerIssuanceResponse":{"additionalProperties":false,"description":"Newly created trigger plus optional one-time webhook secret issuance.","properties":{"pipeline_trigger":{"$ref":"#/components/schemas/PipelineTrigger"},"webhook_secret":{"$ref":"#/components/schemas/PipelineWebhookSecretIssuance"}},"required":["pipeline_trigger"],"type":"object"},"PipelineTriggerLatestDeployedVersionPolicyWithPinnedHash":{"description":"Validation-only shape rejected because latest_deployed triggers must not include pinned_version_hash.","properties":{"mode":{"enum":["latest_deployed"],"type":"string","x-enum-varnames":["PipelineTriggerLatestDeployedVersionPolicyWithPinnedHashModeLatestDeployed"]}},"required":["mode","pinned_version_hash"],"type":"object"},"PipelineTriggerListResponse":{"description":"Paginated list of environment-scoped pipeline trigger definitions.","properties":{"has_more":{"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","nullable":true,"type":"string"},"pipeline_triggers":{"items":{"$ref":"#/components/schemas/PipelineTrigger"},"type":"array"},"prev_cursor":{"description":"Cursor for fetching the previous page","nullable":true,"type":"string"}},"required":["pipeline_triggers","has_more"],"type":"object"},"PipelineTriggerPinnedVersionPolicyWithoutHash":{"description":"Validation-only shape rejected because pinned triggers must include pinned_version_hash.","not":{"required":["pinned_version_hash"]},"properties":{"mode":{"enum":["pinned"],"type":"string","x-enum-varnames":["PipelineTriggerPinnedVersionPolicyWithoutHashModePinned"]}},"required":["mode"],"type":"object"},"PipelineTriggerResolvedLatestDeployedVersionPolicyWithPinnedHash":{"description":"Validation-only shape rejected because resolved latest_deployed trigger responses must not include pinned_version_hash.","properties":{"mode":{"enum":["latest_deployed"],"type":"string","x-enum-varnames":["PipelineTriggerResolvedLatestDeployedVersionPolicyWithPinnedHashModeLatestDeployed"]}},"required":["mode","pinned_version_hash"],"type":"object"},"PipelineTriggerResolvedPinnedVersionPolicyWithoutHash":{"description":"Validation-only shape rejected because resolved pinned trigger responses must include pinned_version_hash.","not":{"required":["pinned_version_hash"]},"properties":{"mode":{"enum":["pinned"],"type":"string","x-enum-varnames":["PipelineTriggerResolvedPinnedVersionPolicyWithoutHashModePinned"]}},"required":["mode"],"type":"object"},"PipelineTriggerResolvedVersionPolicy":{"additionalProperties":false,"description":"Resolved version policy returned by trigger read APIs. Pinned policies always return the full immutable pipeline version hash.","not":{"anyOf":[{"$ref":"#/components/schemas/PipelineTriggerResolvedLatestDeployedVersionPolicyWithPinnedHash"},{"$ref":"#/components/schemas/PipelineTriggerResolvedPinnedVersionPolicyWithoutHash"}]},"properties":{"mode":{"$ref":"#/components/schemas/PipelineTriggerVersionPolicyMode"},"pinned_version_hash":{"description":"Full immutable pipeline version hash when mode is pinned. Omitted for latest_deployed.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["mode"],"type":"object"},"PipelineTriggerRetryAttemptStatus":{"description":"Durable retry decision or execution state for a trigger-backed run retry.","enum":["queued","skipped","exhausted","running","succeeded","failed"],"example":"queued","type":"string","x-enum-varnames":["PipelineTriggerRetryAttemptStatusQueued","PipelineTriggerRetryAttemptStatusSkipped","PipelineTriggerRetryAttemptStatusExhausted","PipelineTriggerRetryAttemptStatusRunning","PipelineTriggerRetryAttemptStatusSucceeded","PipelineTriggerRetryAttemptStatusFailed"]},"PipelineTriggerRetryFailureKind":{"description":"Safe run failure category that can be retried by a trigger.","enum":["data_source","platform"],"example":"data_source","type":"string","x-enum-varnames":["PipelineTriggerRetryFailureKindDataSource","PipelineTriggerRetryFailureKindPlatform"]},"PipelineTriggerRetryPolicy":{"additionalProperties":false,"description":"Persisted retry policy used by durable trigger retry orchestration.","properties":{"backoff_strategy":{"$ref":"#/components/schemas/PipelineTriggerBackoffStrategy"},"enabled":{"description":"Whether trigger retry orchestration is enabled.","example":true,"type":"boolean"},"initial_delay_seconds":{"description":"Delay before the first retry attempt. Fixed backoff reuses this delay for each retry; exponential backoff starts here and grows up to max_delay_seconds.","example":60,"maximum":86400,"minimum":0,"type":"integer"},"jitter":{"description":"Whether retry dispatch should randomize retry delays.","example":true,"type":"boolean"},"max_attempts":{"description":"Maximum attempts in a retry group, including the initial run.","example":3,"maximum":10,"minimum":1,"type":"integer"},"max_delay_seconds":{"description":"Upper bound for retry delays when backoff is fixed or exponential. For backoff_strategy=none, both delay fields must be 0.","example":3600,"maximum":604800,"minimum":0,"type":"integer"},"max_elapsed_seconds":{"description":"Optional upper bound on elapsed retry time.","example":86400,"maximum":2592000,"minimum":1,"nullable":true,"type":"integer"},"retryable_failure_kinds":{"items":{"$ref":"#/components/schemas/PipelineTriggerRetryFailureKind"},"type":"array","uniqueItems":true}},"required":["enabled","max_attempts","backoff_strategy","initial_delay_seconds","max_delay_seconds","jitter","retryable_failure_kinds"],"type":"object"},"PipelineTriggerScheduleConfig":{"additionalProperties":false,"description":"Schedule trigger configuration.","properties":{"cron":{"description":"Five-field cron expression evaluated in timezone.","example":"*/15 * * * *","maxLength":255,"minLength":1,"type":"string"},"misfire_policy":{"$ref":"#/components/schemas/PipelineTriggerScheduleMisfirePolicy"},"timezone":{"description":"IANA timezone used for schedule evaluation.","example":"Europe/Warsaw","maxLength":64,"minLength":1,"type":"string"}},"required":["cron","timezone","misfire_policy"],"type":"object"},"PipelineTriggerScheduleMisfirePolicy":{"description":"Policy for handling missed scheduled fire times, such as fires that become due while the scheduler is stopped, delayed, or backlogged.","enum":["skip","fire_once"],"example":"fire_once","type":"string","x-enum-varnames":["PipelineTriggerScheduleMisfirePolicySkip","PipelineTriggerScheduleMisfirePolicyFireOnce"]},"PipelineTriggerScheduleWithWebhookConfig":{"description":"Validation-only shape rejected because schedule triggers cannot include webhook config.","properties":{"type":{"enum":["schedule"],"type":"string"},"webhook":{"type":"object"}},"required":["type","webhook"],"type":"object"},"PipelineTriggerScheduleWithoutScheduleConfig":{"description":"Validation-only shape rejected because schedule triggers must include schedule config.","not":{"required":["schedule"]},"properties":{"type":{"enum":["schedule"],"type":"string","x-enum-varnames":["PipelineTriggerScheduleWithoutScheduleConfigTypeSchedule"]}},"required":["type"],"type":"object"},"PipelineTriggerType":{"description":"Persisted trigger family.","enum":["schedule","webhook"],"example":"schedule","type":"string","x-enum-varnames":["PipelineTriggerTypeSchedule","PipelineTriggerTypeWebhook"]},"PipelineTriggerVersionPolicy":{"additionalProperties":false,"description":"Selects which immutable pipeline version a trigger should run.","not":{"anyOf":[{"$ref":"#/components/schemas/PipelineTriggerLatestDeployedVersionPolicyWithPinnedHash"},{"$ref":"#/components/schemas/PipelineTriggerPinnedVersionPolicyWithoutHash"}]},"properties":{"mode":{"$ref":"#/components/schemas/PipelineTriggerVersionPolicyMode"},"pinned_version_hash":{"description":"Full immutable pipeline version hash, or a unique short hash prefix, when mode is pinned. Omit for latest_deployed. The persisted trigger stores the resolved full hash.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","minLength":1,"type":"string"}},"required":["mode"],"type":"object"},"PipelineTriggerVersionPolicyMode":{"description":"Version selector used by a pipeline trigger.","enum":["latest_deployed","pinned"],"example":"latest_deployed","type":"string","x-enum-varnames":["PipelineTriggerVersionPolicyModeLatestDeployed","PipelineTriggerVersionPolicyModePinned"]},"PipelineTriggerWebhookWithScheduleConfig":{"description":"Validation-only shape rejected because webhook triggers cannot include schedule config.","properties":{"schedule":{"type":"object"},"type":{"enum":["webhook"],"type":"string"}},"required":["type","schedule"],"type":"object"},"PipelineTriggerWebhookWithoutWebhookConfig":{"description":"Validation-only shape rejected because webhook triggers must include webhook config.","not":{"required":["webhook"]},"properties":{"type":{"enum":["webhook"],"type":"string","x-enum-varnames":["PipelineTriggerWebhookWithoutWebhookConfigTypeWebhook"]}},"required":["type"],"type":"object"},"PipelineValidationDiagnostic":{"description":"One validation finding for a submitted pipeline spec. ODCS conversion failures use ODCS-prefixed converter codes, identify the affected contract-reference port in field and step_slug, and include the safe revision structural path and corrective instruction in message. No authored values are returned.","properties":{"code":{"description":"Stable machine-readable diagnostic code.","example":"PIPELINE_INVALID_INPUT","type":"string"},"data_source_ref":{"$ref":"#/components/schemas/NullableSlug"},"data_source_ref_slug":{"$ref":"#/components/schemas/NullableSlug"},"data_source_type":{"$ref":"#/components/schemas/DataSourceType"},"environment_slug":{"$ref":"#/components/schemas/NullableSlug"},"expected_data_source_type":{"$ref":"#/components/schemas/DataSourceType"},"field":{"description":"Best-effort canonical field path for the issue.","example":"steps[0].query","type":"string"},"message":{"description":"Safe validation message suitable for UI and CLI output.","example":"query target must set exactly one of operation_ref or operation_inline","type":"string"},"required_capability":{"$ref":"#/components/schemas/DataSourceRefCapability"},"resolved_data_source_slug":{"$ref":"#/components/schemas/NullableSlug"},"severity":{"description":"Severity of the validation diagnostic.","enum":["error","warning"],"example":"error","type":"string","x-enum-varnames":["PipelineValidationDiagnosticSeverityError","PipelineValidationDiagnosticSeverityWarning"]},"step_slug":{"$ref":"#/components/schemas/NullableSlug"}},"required":["severity","code","field","message"],"type":"object"},"PipelineValidationRequest":{"additionalProperties":false,"description":"Request to validate a canonical pipeline spec.","properties":{"spec":{"$ref":"#/components/schemas/PipelineSpec"}},"required":["spec"],"type":"object"},"PipelineValidationResponse":{"description":"Structured result for pipeline spec validation.","properties":{"data_source_ref_sync":{"$ref":"#/components/schemas/PipelineDataSourceRefSyncResult"},"diagnostics":{"description":"Diagnostics that can be rendered by the frontend builder or printed by CLI tooling.","items":{"$ref":"#/components/schemas/PipelineValidationDiagnostic"},"type":"array"},"impact_report":{"$ref":"#/components/schemas/DriftImpactReportPreview"},"valid":{"description":"Whether the supplied pipeline spec passed validation.","example":false,"type":"boolean"}},"required":["valid","diagnostics","data_source_ref_sync"],"type":"object"},"PipelineValidationResultListResponse":{"description":"List of non-run pipeline validation results for one runtime target.","properties":{"validation_results":{"items":{"$ref":"#/components/schemas/PipelineValidationResultRecord"},"type":"array"}},"required":["validation_results"],"type":"object"},"PipelineValidationResultRecord":{"description":"Durable validation evidence for one pipeline and runtime target. This is not a run record.","properties":{"created_at":{"format":"date-time","type":"string"},"diagnostics":{"description":"Diagnostics returned by the canonical validation path.","items":{"$ref":"#/components/schemas/PipelineValidationDiagnostic"},"type":"array"},"environment_slug":{"$ref":"#/components/schemas/Slug"},"impact_report_slug":{"$ref":"#/components/schemas/NullableSlug"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"project_slug":{"$ref":"#/components/schemas/Slug"},"source":{"$ref":"#/components/schemas/PipelineValidationResultSource"},"spec_hash":{"description":"Hash of the validated canonical spec when available.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"valid":{"description":"Whether the validation attempt passed.","example":false,"type":"boolean"},"validation_slug":{"$ref":"#/components/schemas/Slug"}},"required":["validation_slug","project_slug","environment_slug","pipeline_slug","source","valid","spec_hash","diagnostics","impact_report_slug","created_at","updated_at"],"type":"object"},"PipelineValidationResultSource":{"description":"Product boundary that recorded the validation result.","enum":["unknown","api","execute","revalidate"],"example":"revalidate","type":"string","x-enum-varnames":["PipelineValidationResultSourceUnknown","PipelineValidationResultSourceAPI","PipelineValidationResultSourceExecute","PipelineValidationResultSourceRevalidate"]},"PipelineVersion":{"allOf":[{"$ref":"#/components/schemas/PipelineVersionRef"},{"properties":{"spec":{"$ref":"#/components/schemas/PipelineSpec"}},"required":["spec"],"type":"object"}]},"PipelineVersionListResponse":{"description":"List of persisted versions for a pipeline.","properties":{"versions":{"items":{"$ref":"#/components/schemas/PipelineVersionRef"},"type":"array"}},"required":["versions"],"type":"object"},"PipelineVersionRef":{"description":"Persisted immutable version metadata for a pipeline.","properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"git_commit_sha":{"description":"Source git commit for Git-authored pipeline versions when available.","example":"f4a1920c8e6b66e9a07a3f1a4ec67631a7de91ef","nullable":true,"type":"string"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"short_spec_hash":{"description":"Short display prefix derived from spec_hash. The full spec_hash remains the canonical identifier.","example":"6d7b6f5f6c8","type":"string"},"spec_hash":{"description":"Immutable hash of the persisted pipeline version.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","type":"string"}},"required":["spec_hash","short_spec_hash","pipeline_slug","created_at"],"type":"object"},"PipelineWebhookConfig":{"additionalProperties":false,"description":"Safe generic webhook configuration without verification secret values.","properties":{"enabled_key_versions":{"items":{"minimum":1,"type":"integer"},"type":"array"},"input_mappings":{"items":{"$ref":"#/components/schemas/PipelineWebhookInputMapping"},"maxItems":100,"type":"array"},"receiver_id":{"pattern":"^[A-Za-z0-9_-]{32,128}$","type":"string"},"secret_configured":{"type":"boolean"},"verification_strategy":{"$ref":"#/components/schemas/PipelineWebhookVerificationStrategy"}},"required":["receiver_id","verification_strategy","input_mappings","enabled_key_versions","secret_configured"],"type":"object"},"PipelineWebhookConfigInput":{"additionalProperties":false,"description":"Generic webhook configuration. Receiver identity and verification keys are product-issued.","properties":{"input_mappings":{"items":{"$ref":"#/components/schemas/PipelineWebhookInputMapping"},"maxItems":100,"type":"array"}},"required":["input_mappings"],"type":"object"},"PipelineWebhookDelivery":{"additionalProperties":false,"description":"Operator-safe generic pipeline webhook delivery diagnostic. Request bodies, mapped values, headers, signatures, credentials, and encrypted envelopes are never returned.","properties":{"attempt_number":{"maximum":10,"minimum":1,"type":"integer"},"completed_at":{"$ref":"#/components/schemas/NullableTimestamp"},"delivery_id":{"maxLength":128,"minLength":1,"type":"string"},"duplicate_count":{"minimum":0,"type":"integer"},"failure_kind":{"enum":["data_source","platform"],"nullable":true,"type":"string"},"failure_reason":{"description":"Sanitized machine-readable failure reason.","maxLength":100,"nullable":true,"type":"string"},"last_duplicate_at":{"$ref":"#/components/schemas/NullableTimestamp"},"linked_run_slug":{"$ref":"#/components/schemas/NullableSlug"},"mapped_input_names":{"description":"Input names supplied by mapping; values are never exposed.","items":{"type":"string"},"type":"array"},"next_retry_at":{"$ref":"#/components/schemas/NullableTimestamp"},"payload_digest":{"pattern":"^[0-9a-f]{64}$","type":"string"},"payload_size_bytes":{"format":"int64","minimum":0,"type":"integer"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"received_at":{"$ref":"#/components/schemas/Timestamp"},"receiver_id":{"maxLength":128,"minLength":1,"type":"string"},"replay_available":{"type":"boolean"},"replay_unavailable_reason":{"maxLength":100,"nullable":true,"type":"string"},"started_at":{"$ref":"#/components/schemas/NullableTimestamp"},"status":{"$ref":"#/components/schemas/PipelineWebhookDeliveryStatus"},"trigger_revision":{"format":"int64","minimum":1,"type":"integer"},"trigger_slug":{"$ref":"#/components/schemas/Slug"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["receiver_id","delivery_id","payload_digest","payload_size_bytes","trigger_slug","trigger_revision","pipeline_slug","status","mapped_input_names","linked_run_slug","attempt_number","duplicate_count","failure_kind","failure_reason","next_retry_at","received_at","started_at","completed_at","last_duplicate_at","updated_at","replay_available","replay_unavailable_reason"],"type":"object"},"PipelineWebhookDeliveryListResponse":{"description":"Paginated operator-safe webhook delivery diagnostics for one trigger.","properties":{"deliveries":{"items":{"$ref":"#/components/schemas/PipelineWebhookDelivery"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"},"prev_cursor":{"nullable":true,"type":"string"}},"required":["deliveries","has_more"],"type":"object"},"PipelineWebhookDeliveryStatus":{"description":"Safe durable delivery execution state.","enum":["queued","running","succeeded","failed","rejected"],"type":"string","x-enum-varnames":["PipelineWebhookDeliveryStatusQueued","PipelineWebhookDeliveryStatusRunning","PipelineWebhookDeliveryStatusSucceeded","PipelineWebhookDeliveryStatusFailed","PipelineWebhookDeliveryStatusRejected"]},"PipelineWebhookInputMapping":{"additionalProperties":false,"description":"Maps one JSON Pointer in a verified webhook body to one declared runtime input.","properties":{"json_pointer":{"maxLength":500,"pattern":"^(|/.*)$","type":"string"},"runtime_input_key":{"maxLength":100,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"}},"required":["json_pointer","runtime_input_key"],"type":"object"},"PipelineWebhookSecretIssuance":{"additionalProperties":false,"description":"Webhook verification key material returned once on issuance.","properties":{"key_version":{"minimum":1,"type":"integer"},"value":{"maxLength":128,"minLength":43,"type":"string"}},"required":["key_version","value"],"type":"object"},"PipelineWebhookVerificationStrategy":{"enum":["hmac_sha256"],"type":"string","x-enum-varnames":["PipelineWebhookVerificationStrategyHmacSha256"]},"PostgresConfig":{"additionalProperties":false,"description":"PostgreSQL connection configuration (no credentials)","properties":{"allow_private_hosts":{"description":"Allow connections to private, loopback, or internal network hosts when private host access is available for the deployment.","example":false,"type":"boolean"},"connect_timeout":{"description":"Connection timeout in seconds (optional, defaults to 5)","example":10,"maximum":300,"minimum":1,"type":"integer"},"database":{"description":"Database name","example":"app_production","minLength":1,"type":"string"},"host":{"description":"PostgreSQL server hostname or IP address","example":"db.example.com","minLength":1,"type":"string"},"port":{"default":5432,"description":"PostgreSQL server port","example":5432,"maximum":65535,"minimum":1,"type":"integer"},"ssl_mode":{"description":"PostgreSQL SSL mode","enum":["disable","allow","prefer","require","verify-ca","verify-full"],"example":"require","type":"string"}},"required":["host","port","database"],"type":"object"},"PostgresCredentials":{"additionalProperties":false,"description":"PostgreSQL credentials (write-only, never returned)","properties":{"password":{"description":"PostgreSQL password","example":"SecurePass123!","minLength":1,"type":"string"},"username":{"description":"PostgreSQL username","example":"app_user","minLength":1,"type":"string"}},"required":["username","password"],"type":"object"},"PostgresStatement":{"description":"PostgreSQL query statement with {{paramName}} placeholders","properties":{"sql":{"description":"PostgreSQL SQL statement with {{paramName}} placeholders","example":"SELECT * FROM users WHERE id = {{user_id}} LIMIT {{limit}}","minLength":1,"type":"string"},"type":{"description":"Data source type discriminator","enum":["postgres"],"type":"string","x-enum-varnames":["PostgresStatementTypePostgres"]}},"required":["type","sql"],"type":"object"},"Project":{"description":"Organization-scoped workspace for future apps and pipelines","properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"name":{"$ref":"#/components/schemas/Name"},"pipeline_backend":{"allOf":[{"$ref":"#/components/schemas/ProjectPipelineBackend"}],"description":"Project-owned git backend identity, or null when unset.","nullable":true},"slug":{"$ref":"#/components/schemas/Slug"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","name","pipeline_backend","created_at","updated_at"],"type":"object"},"ProjectEnvironment":{"description":"Environment enabled for a project.","properties":{"enabled_at":{"$ref":"#/components/schemas/Timestamp"},"environment_color":{"$ref":"#/components/schemas/EnvironmentColor"},"environment_description":{"allOf":[{"$ref":"#/components/schemas/EnvironmentDescription"}],"nullable":true},"environment_name":{"$ref":"#/components/schemas/Name"},"environment_protected":{"description":"Whether protected runtime-changing operations require explicit confirmation for this environment.","type":"boolean"},"environment_slug":{"$ref":"#/components/schemas/Slug"},"is_default":{"description":"Whether this is the project's default environment.","example":true,"type":"boolean"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["environment_slug","environment_name","environment_description","environment_color","environment_protected","is_default","enabled_at","updated_at"],"type":"object"},"ProjectEnvironmentListResponse":{"description":"Paginated list of project-enabled environments","properties":{"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-05-25T10:30:00Z_prod","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-05-25T10:10:00Z_dev","nullable":true,"type":"string"},"project_environments":{"items":{"$ref":"#/components/schemas/ProjectEnvironment"},"type":"array"}},"required":["project_environments","has_more"],"type":"object"},"ProjectListResponse":{"description":"Paginated list of projects","properties":{"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-05-12T10:30:00Z_default","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-05-12T10:10:00Z_operations","nullable":true,"type":"string"},"projects":{"items":{"$ref":"#/components/schemas/Project"},"type":"array"}},"required":["projects","has_more"],"type":"object"},"ProjectPipelineBackend":{"additionalProperties":false,"description":"Project-owned git backend identity for Git-authored pipelines.","properties":{"data_source_slug":{"$ref":"#/components/schemas/Slug"},"first_commit_sha":{"description":"Exact repository commit first validated when this backend was registered.","maxLength":64,"minLength":7,"nullable":true,"type":"string"},"pipeline_dir":{"description":"Repository-relative directory containing canonical pipeline specs.","example":"pipelines","maxLength":1024,"minLength":1,"type":"string"},"repo":{"description":"Normalized remote repository URL resolved from the configured git-compatible data source.","example":"https://github.com/Braidplane/acme-pipelines.git","type":"string"},"tracked_branch":{"description":"Writable tracked branch used for reconcile, publish, transfer, and delete routing.","example":"main","maxLength":255,"minLength":1,"type":"string"}},"required":["data_source_slug","repo","tracked_branch","pipeline_dir","first_commit_sha"],"type":"object"},"ProofAssessmentTarget":{"additionalProperties":false,"properties":{"environment_slug":{"$ref":"#/components/schemas/Slug"},"pipeline_path":{"maxLength":1024,"minLength":1,"type":"string"},"project_slug":{"$ref":"#/components/schemas/Slug"},"target_ref":{"maxLength":255,"minLength":1,"type":"string"}},"required":["project_slug","environment_slug","target_ref","pipeline_path"],"type":"object"},"ProofBigQueryTarget":{"additionalProperties":false,"properties":{"connector_type":{"enum":["bigquery"],"type":"string"},"dataset_id":{"maxLength":1024,"minLength":1,"type":"string"},"project_id":{"maxLength":1024,"minLength":1,"type":"string"},"table_id":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["connector_type","project_id","dataset_id","table_id"],"type":"object"},"ProofCandidateIdentity":{"additionalProperties":false,"description":"Exact tenant, target, Git candidate, compiled pipeline, binding, capability, compiler, and policy identity.","properties":{"binding_fingerprint":{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"},"capability_fingerprint":{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"},"change_request_id":{"maxLength":255,"minLength":1,"type":"string"},"compiler_version":{"maxLength":255,"minLength":1,"type":"string"},"environment_slug":{"$ref":"#/components/schemas/Slug"},"head_sha":{"pattern":"^[0-9a-fA-F]{40}([0-9a-fA-F]{24})?$","type":"string"},"organization_slug":{"$ref":"#/components/schemas/Slug"},"pipeline_path":{"maxLength":1024,"minLength":1,"type":"string"},"policy_version":{"maxLength":255,"minLength":1,"type":"string"},"project_slug":{"$ref":"#/components/schemas/Slug"},"provider_connection_slug":{"$ref":"#/components/schemas/Slug"},"repository_id":{"maxLength":255,"minLength":1,"type":"string"},"spec_hash":{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"},"target_ref":{"maxLength":255,"minLength":1,"type":"string"}},"required":["organization_slug","project_slug","environment_slug","provider_connection_slug","repository_id","change_request_id","head_sha","target_ref","pipeline_path","spec_hash","binding_fingerprint","capability_fingerprint","compiler_version","policy_version"],"type":"object"},"ProofClaim":{"additionalProperties":false,"description":"One immutable clause result with explicit evidence requirement, actual level, freshness, verdict, and sanitized references.","properties":{"actual_evidence_level":{"allOf":[{"$ref":"#/components/schemas/ProofEvidenceLevel"}],"nullable":true},"description":{"minLength":1,"type":"string"},"diagnostics":{"items":{"$ref":"#/components/schemas/ProofDiagnostic"},"maxItems":100,"type":"array"},"evidence":{"items":{"$ref":"#/components/schemas/ProofEvidenceReference"},"maxItems":100,"type":"array"},"expires_at":{"format":"date-time","nullable":true,"type":"string"},"identity":{"$ref":"#/components/schemas/ProofClaimIdentity"},"observed_at":{"format":"date-time","nullable":true,"type":"string"},"required_evidence_level":{"$ref":"#/components/schemas/ProofEvidenceLevel"},"verdict":{"$ref":"#/components/schemas/ProofVerdict"}},"required":["identity","description","required_evidence_level","actual_evidence_level","observed_at","expires_at","verdict","evidence","diagnostics"],"type":"object"},"ProofClaimFamily":{"description":"Bounded connector-neutral family of an evaluated pipeline promise.","enum":["source_identity","destination_identity","access_capability","fields_types","cursor_checkpoint","delete_behavior","write_mode","coercion","idempotency","replay","drift_impact"],"type":"string","x-enum-varnames":["ProofClaimFamilySourceIdentity","ProofClaimFamilyDestinationIdentity","ProofClaimFamilyAccessCapability","ProofClaimFamilyFieldsTypes","ProofClaimFamilyCursorCheckpoint","ProofClaimFamilyDeleteBehavior","ProofClaimFamilyWriteMode","ProofClaimFamilyCoercion","ProofClaimFamilyIdempotency","ProofClaimFamilyReplay","ProofClaimFamilyDriftImpact"]},"ProofClaimIdentity":{"additionalProperties":false,"description":"Stable family and canonical semantic path within one immutable pipeline version.","properties":{"family":{"$ref":"#/components/schemas/ProofClaimFamily"},"pipeline_version_hash":{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"},"semantic_path":{"maxLength":1024,"minLength":1,"pattern":"^/","type":"string"}},"required":["family","pipeline_version_hash","semantic_path"],"type":"object"},"ProofDiagnostic":{"additionalProperties":false,"description":"Sanitized operator-facing diagnostic safe for a protected receipt.","properties":{"code":{"minLength":1,"type":"string"},"remediation":{"minLength":1,"type":"string"},"retryable":{"type":"boolean"},"summary":{"minLength":1,"type":"string"}},"required":["code","summary","remediation","retryable"],"type":"object"},"ProofDriveFileTarget":{"additionalProperties":false,"properties":{"connector_type":{"enum":["google_workspace"],"type":"string"},"file_id":{"description":"Stable file ID for read/update or folder ID for create/list. Only metadata is observed.","maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"operation":{"enum":["read","create","update","list"],"type":"string"},"resource":{"enum":["file"],"type":"string"}},"required":["connector_type","resource","file_id","operation"],"type":"object"},"ProofEvidenceLevel":{"description":"How directly a Proof claim was evaluated; levels are not interchangeable.","enum":["static","cached_observed","live_read_only","bounded_execution"],"type":"string","x-enum-varnames":["ProofEvidenceLevelStatic","ProofEvidenceLevelCachedObserved","ProofEvidenceLevelLiveReadOnly","ProofEvidenceLevelBoundedExecution"]},"ProofEvidenceReference":{"additionalProperties":false,"description":"Sanitized digest reference to protected evidence; never a raw provider payload or URL with query parameters.","properties":{"digest":{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"},"kind":{"$ref":"#/components/schemas/ProofEvidenceReferenceKind"}},"required":["kind","digest"],"type":"object"},"ProofEvidenceReferenceKind":{"description":"Kind of sanitized evidence reference retained for a Proof claim.","enum":["validation","introspection","execution"],"example":"validation","type":"string","x-enum-varnames":["ProofEvidenceReferenceKindValidation","ProofEvidenceReferenceKindIntrospection","ProofEvidenceReferenceKindExecution"]},"ProofHubSpotTarget":{"additionalProperties":false,"properties":{"account_id":{"format":"int64","minimum":1,"type":"integer"},"connector_type":{"enum":["hubspot"],"type":"string"}},"required":["connector_type","account_id"],"type":"object"},"ProofLifecycleLink":{"additionalProperties":false,"description":"Append-only record linking an exact receipt to later deployment or run evidence.","properties":{"current_version_spec_hash":{"nullable":true,"type":"string"},"identifier":{"minLength":1,"type":"string"},"kind":{"$ref":"#/components/schemas/ProofLifecycleLinkKind"},"linked_at":{"format":"date-time","type":"string"},"pipeline_slug":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"nullable":true},"receipt_id":{"$ref":"#/components/schemas/Slug"},"retain_until":{"format":"date-time","type":"string"},"run_slug":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"nullable":true},"status":{"description":"Informational comparison with the current deployment or executed run version.","enum":["matched","expired","superseded","version_mismatch","deployment_mismatch"],"type":"string","x-enum-varnames":["ProofLifecycleLinkStatusMatched","ProofLifecycleLinkStatusExpired","ProofLifecycleLinkStatusSuperseded","ProofLifecycleLinkStatusVersionMismatch","ProofLifecycleLinkStatusDeploymentMismatch"]}},"required":["kind","receipt_id","identifier","linked_at","retain_until","status","pipeline_slug","run_slug","current_version_spec_hash"],"type":"object"},"ProofLifecycleLinkKind":{"description":"Kind of append-only lifecycle record linked to a Proof receipt.","enum":["deployment","run"],"example":"deployment","type":"string","x-enum-varnames":["ProofLifecycleLinkKindDeployment","ProofLifecycleLinkKindRun"]},"ProofMongoDBTarget":{"additionalProperties":false,"description":"Name-filtered collection metadata on the bound data source. No documents are counted or sampled.","properties":{"collection":{"maxLength":128,"minLength":1,"type":"string"},"connector_type":{"enum":["mongodb"],"type":"string"},"database":{"maxLength":128,"minLength":1,"type":"string"},"host":{"maxLength":253,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"}},"required":["connector_type","host","port","database","collection"],"type":"object"},"ProofMySQLTarget":{"additionalProperties":false,"description":"Selected table on the bound data source. Host, port and database must match its configuration; native metadata does not execute the pipeline's SQL.","properties":{"connector_type":{"enum":["mysql"],"type":"string"},"database":{"maxLength":128,"minLength":1,"type":"string"},"host":{"maxLength":253,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"},"schema":{"maxLength":128,"minLength":1,"type":"string"},"table":{"maxLength":128,"minLength":1,"type":"string"}},"required":["connector_type","host","port","database","schema","table"],"type":"object"},"ProofObservationIntent":{"additionalProperties":false,"description":"Explicit confirmation of this user's unexpired preview. Current authorization, policy, candidate, bindings, target and credential are checked again. Replay returns the same job without dispatching it twice.","properties":{"intent_token":{"maxLength":16384,"minLength":1,"type":"string"},"request_digest":{"pattern":"^sha256:[a-f0-9]{64}$","type":"string"}},"required":["intent_token","request_digest"],"type":"object"},"ProofObservationJob":{"description":"Sanitized job state; no target, credential payload, or provider metadata is included. A complete outcome describes metadata collection, not pipeline success. Terminal outcomes are absent while pending or running.","properties":{"cancellation_requested":{"type":"boolean"},"deadline_at":{"format":"date-time","type":"string"},"outcome":{"$ref":"#/components/schemas/ProofObservationOutcome"},"request_digest":{"pattern":"^sha256:[a-f0-9]{64}$","type":"string"},"slug":{"$ref":"#/components/schemas/Slug"},"state":{"enum":["pending","running","finished"],"type":"string","x-enum-varnames":["ProofObservationJobStatePending","ProofObservationJobStateRunning","ProofObservationJobStateFinished"]}},"required":["slug","state","request_digest","deadline_at","cancellation_requested"],"type":"object"},"ProofObservationOutcome":{"enum":["complete","unsupported","denied","unreachable","rate_limited","timed_out","over_budget","canceled","worker_lost","partial","provider_error","attestation_failed","cleanup_uncertain"],"type":"string","x-enum-varnames":["ProofObservationOutcomeComplete","ProofObservationOutcomeUnsupported","ProofObservationOutcomeDenied","ProofObservationOutcomeUnreachable","ProofObservationOutcomeRateLimited","ProofObservationOutcomeTimedOut","ProofObservationOutcomeOverBudget","ProofObservationOutcomeCanceled","ProofObservationOutcomeWorkerLost","ProofObservationOutcomePartial","ProofObservationOutcomeProviderError","ProofObservationOutcomeAttestationFailed","ProofObservationOutcomeCleanupUncertain"]},"ProofObservationPolicy":{"properties":{"settings":{"$ref":"#/components/schemas/ProofObservationPolicyInput"},"version":{"type":"string"}},"required":["version","settings"],"type":"object"},"ProofObservationPolicyInput":{"additionalProperties":false,"description":"Per-connector cumulative limits in a rolling hour. Each observation is additionally capped at two requests, 1000 fields and one MiB. No retries or chargeable jobs are allowed.","properties":{"enabled":{"type":"boolean"},"evidence_ttl_seconds":{"maximum":3600,"minimum":60,"type":"integer"},"max_bytes":{"format":"int64","maximum":67108864,"minimum":1024,"type":"integer"},"max_requests":{"format":"int64","maximum":120,"minimum":2,"type":"integer"},"max_rows":{"format":"int64","maximum":1000000,"minimum":1,"type":"integer"},"timeout_seconds":{"maximum":30,"minimum":1,"type":"integer"}},"required":["enabled","timeout_seconds","evidence_ttl_seconds","max_requests","max_rows","max_bytes"],"type":"object"},"ProofObservationPreview":{"description":"Review the exact candidate, target, credential version and limits before confirming. Preparation performs no provider call and reserves no job. The opaque token expires within one minute, is bound to this user, and must not be logged or retained.","properties":{"candidate":{"$ref":"#/components/schemas/ProofCandidateIdentity"},"claim":{"$ref":"#/components/schemas/ProofClaimIdentity"},"credential_version":{"type":"string"},"data_source_slug":{"$ref":"#/components/schemas/Slug"},"evidence_expires_at":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":"string"},"intent_token":{"maxLength":16384,"minLength":1,"type":"string"},"max_bytes":{"format":"int64","type":"integer"},"max_requests":{"format":"int64","type":"integer"},"max_rows":{"format":"int64","type":"integer"},"metadata_expires_at":{"format":"date-time","type":"string"},"operation":{"enum":["hubspot.contact_metadata","bigquery.table_metadata","google_workspace.worksheet_metadata","google_workspace.file_metadata","postgres.table_metadata","mysql.table_metadata","s3.object_metadata","mongodb.collection_metadata"],"type":"string","x-enum-varnames":["ProofObservationOperationContactMetadata","ProofObservationOperationTableMetadata","ProofObservationOperationWorksheetMetadata","ProofObservationOperationFileMetadata","ProofObservationOperationPostgresTableMetadata","ProofObservationOperationMySQLTableMetadata","ProofObservationOperationS3ObjectMetadata","ProofObservationOperationMongoDBCollectionMetadata"]},"policy_version":{"type":"string"},"rate_window_seconds":{"type":"integer"},"request_digest":{"pattern":"^sha256:[a-f0-9]{64}$","type":"string"},"target":{"$ref":"#/components/schemas/ProofObservationTarget"},"timeout_seconds":{"type":"integer"}},"required":["intent_token","request_digest","candidate","claim","operation","target","data_source_slug","credential_version","policy_version","expires_at","evidence_expires_at","metadata_expires_at","rate_window_seconds","timeout_seconds","max_rows","max_bytes","max_requests"],"type":"object"},"ProofObservationPreviewInput":{"additionalProperties":false,"properties":{"candidate_slug":{"$ref":"#/components/schemas/Slug"},"step_slug":{"$ref":"#/components/schemas/Slug"},"target":{"$ref":"#/components/schemas/ProofObservationTarget"}},"required":["candidate_slug","step_slug","target"],"type":"object"},"ProofObservationTarget":{"description":"Exact connector-owned metadata resource. Selectors from another variant are rejected. No records or pipeline operations are executed.","discriminator":{"mapping":{"bigquery":"#/components/schemas/ProofBigQueryTarget","google_workspace":"#/components/schemas/ProofWorkspaceTarget","hubspot":"#/components/schemas/ProofHubSpotTarget","mongodb":"#/components/schemas/ProofMongoDBTarget","mysql":"#/components/schemas/ProofMySQLTarget","postgres":"#/components/schemas/ProofPostgresTarget","s3":"#/components/schemas/ProofS3Target"},"propertyName":"connector_type"},"oneOf":[{"$ref":"#/components/schemas/ProofHubSpotTarget"},{"$ref":"#/components/schemas/ProofBigQueryTarget"},{"$ref":"#/components/schemas/ProofWorkspaceTarget"},{"$ref":"#/components/schemas/ProofPostgresTarget"},{"$ref":"#/components/schemas/ProofMySQLTarget"},{"$ref":"#/components/schemas/ProofS3Target"},{"$ref":"#/components/schemas/ProofMongoDBTarget"}]},"ProofPostgresTarget":{"additionalProperties":false,"description":"Selected table on the bound data source. Host, port and database must match its configuration; native metadata does not execute the pipeline's SQL.","properties":{"connector_type":{"enum":["postgres"],"type":"string"},"database":{"maxLength":128,"minLength":1,"type":"string"},"host":{"maxLength":253,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"},"schema":{"maxLength":128,"minLength":1,"type":"string"},"table":{"maxLength":128,"minLength":1,"type":"string"}},"required":["connector_type","host","port","database","schema","table"],"type":"object"},"ProofReceipt":{"additionalProperties":false,"description":"Immutable, tenant-scoped, sanitized informational Braidplane Proof receipt.","properties":{"aggregate_verdict":{"$ref":"#/components/schemas/ProofVerdict"},"candidate":{"$ref":"#/components/schemas/ProofCandidateIdentity"},"claims":{"items":{"$ref":"#/components/schemas/ProofClaim"},"maxItems":1000,"minItems":1,"type":"array"},"created_at":{"format":"date-time","type":"string"},"id":{"$ref":"#/components/schemas/Slug"},"lifecycle_links":{"items":{"$ref":"#/components/schemas/ProofLifecycleLink"},"maxItems":1000,"type":"array"},"retain_until":{"format":"date-time","type":"string"},"schema_version":{"enum":[1],"type":"integer"},"supersedes_receipt_id":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"nullable":true}},"required":["schema_version","id","candidate","claims","aggregate_verdict","supersedes_receipt_id","created_at","retain_until","lifecycle_links"],"type":"object"},"ProofReceiptListResponse":{"additionalProperties":false,"description":"Paginated list of Proof Preview receipts in a project environment.","properties":{"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"},"prev_cursor":{"nullable":true,"type":"string"},"receipts":{"items":{"$ref":"#/components/schemas/ProofReceipt"},"type":"array"}},"required":["receipts","has_more"],"type":"object"},"ProofS3Target":{"additionalProperties":false,"description":"Exact object on the bound S3 data source. Only HEAD metadata is read; the object body is never downloaded.","properties":{"bucket":{"maxLength":63,"minLength":1,"type":"string"},"connector_type":{"enum":["s3"],"type":"string"},"endpoint":{"maxLength":1024,"type":"string"},"key":{"maxLength":1024,"minLength":1,"type":"string"},"region":{"maxLength":64,"minLength":1,"type":"string"}},"required":["connector_type","endpoint","region","bucket","key"],"type":"object"},"ProofTargetContext":{"properties":{"environment_slug":{"$ref":"#/components/schemas/Slug"},"pipeline_directory":{"type":"string"},"project_slug":{"$ref":"#/components/schemas/Slug"},"target_ref":{"type":"string"}},"required":["project_slug","environment_slug","target_ref","pipeline_directory"],"type":"object"},"ProofVerdict":{"description":"Clause or aggregate result. Superseded is derived when a later immutable receipt points to this receipt.","enum":["passed","failed","unverified","inconclusive","stale","superseded"],"type":"string","x-enum-varnames":["ProofVerdictPassed","ProofVerdictFailed","ProofVerdictUnverified","ProofVerdictInconclusive","ProofVerdictStale","ProofVerdictSuperseded"]},"ProofWorksheetTarget":{"additionalProperties":false,"properties":{"connector_type":{"enum":["google_workspace"],"type":"string"},"range":{"maxLength":64,"pattern":"^[A-Z]+[1-9][0-9]*:[A-Z]+[1-9][0-9]*$","type":"string"},"resource":{"enum":["spreadsheet"],"type":"string"},"spreadsheet_id":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"worksheet_id":{"minimum":0,"type":"integer"}},"required":["connector_type","resource","spreadsheet_id","worksheet_id","range"],"type":"object"},"ProofWorkspaceTarget":{"discriminator":{"mapping":{"file":"#/components/schemas/ProofDriveFileTarget","spreadsheet":"#/components/schemas/ProofWorksheetTarget"},"propertyName":"resource"},"oneOf":[{"$ref":"#/components/schemas/ProofWorksheetTarget"},{"$ref":"#/components/schemas/ProofDriveFileTarget"}]},"ProviderConnectorInstall":{"additionalProperties":false,"description":"Safe provider connector install metadata. The provider authorization URL carries the opaque state value; Braidplane stores only a hash.","properties":{"authorization_url":{"description":"Provider authorization URL containing an opaque state value","format":"uri","type":"string"},"expires_at":{"$ref":"#/components/schemas/Timestamp"},"intent":{"$ref":"#/components/schemas/ProviderInstallIntent"},"provider":{"$ref":"#/components/schemas/ProviderKey"},"requested_scopes":{"items":{"type":"string"},"type":"array"},"slug":{"$ref":"#/components/schemas/Slug"}},"required":["slug","provider","authorization_url","expires_at","intent","requested_scopes"],"type":"object"},"ProviderDataSourceInstall":{"additionalProperties":false,"description":"Safe OAuth-first onboarding result. The data source is inactive until the callback stores and validates the provider grant.","properties":{"data_source":{"$ref":"#/components/schemas/DataSource"},"install":{"$ref":"#/components/schemas/ProviderConnectorInstall"}},"required":["data_source","install"],"type":"object"},"ProviderGitConfig":{"additionalProperties":false,"description":"Provider-managed Git repository selection. The native Git endpoint is resolved from the stable provider identity at runtime.","properties":{"base_path":{"description":"Optional base path within the repository for resolving relative file paths","example":"data","type":"string"},"repository":{"$ref":"#/components/schemas/ProviderRepository"}},"required":["repository"],"type":"object"},"ProviderInstallIntent":{"description":"Intent carried by a provider connector install","enum":["create_grant","rotate_grant"],"example":"create_grant","type":"string"},"ProviderKey":{"description":"Backend-registered provider key for connector OAuth2 flows","example":"fakecrm","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_-]*$","type":"string"},"ProviderRepository":{"additionalProperties":false,"description":"Stable provider repository identity and safe display metadata. Native Git endpoints and credentials are resolved internally and are never returned here.","properties":{"default_branch":{"description":"Provider-reported default branch when available","example":"main","nullable":true,"type":"string"},"full_name":{"description":"Provider namespace and repository display path","example":"acme/pipelines","minLength":1,"type":"string"},"id":{"description":"Stable provider repository or project identifier","example":"123456","minLength":1,"type":"string"},"name":{"description":"Repository display name","example":"pipelines","minLength":1,"type":"string"},"web_url":{"description":"Safe provider web URL for display and navigation","example":"https://gitlab.com/acme/pipelines","format":"uri","type":"string"}},"required":["id","name","full_name","web_url"],"type":"object"},"ProviderRepositoryListResponse":{"additionalProperties":false,"properties":{"repositories":{"items":{"$ref":"#/components/schemas/ProviderRepository"},"type":"array"}},"required":["repositories"],"type":"object"},"PublishPipelineDraftRequest":{"additionalProperties":false,"description":"Request to publish a saved draft as proposal-oriented Git branch work while keeping the materialized canonical artifact unchanged.","properties":{"expected_spec_hash":{"description":"Canonical pipeline version hash the editor believes is current.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","nullable":true,"type":"string"},"force":{"default":false,"description":"Whether to queue the proposal when the expected materialized version is stale.","example":false,"type":"boolean"}},"type":"object"},"Query":{"description":"A saved query definition","properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"data_source_slug":{"$ref":"#/components/schemas/Slug"},"deleted_at":{"$ref":"#/components/schemas/NullableTimestamp"},"description":{"description":"Description of what the query does","example":"Fetch all users who logged in within the last 30 days","type":"string"},"expected_input_contract":{"$ref":"#/components/schemas/PipelineSchemaContract"},"name":{"description":"Human-readable name of the query","example":"Get Active Users","type":"string"},"parameters":{"description":"Parameter definitions for the query","items":{"$ref":"#/components/schemas/QueryParameter"},"type":"array"},"query_statement":{"$ref":"#/components/schemas/QueryStatement"},"row_limit":{"description":"Maximum number of result rows, capped by the server limit. HTTP top-level JSON array elements each count as one row; objects and scalar/text responses count as one document, while null and opaque files have no JSON rows. Exceeding the effective limit fails with EXECUTION_ROW_LIMIT_EXCEEDED; response-byte limits apply independently.","example":1000,"type":"integer"},"slug":{"$ref":"#/components/schemas/Slug"},"timeout_seconds":{"description":"Query execution timeout in seconds","example":30,"type":"integer"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","name","data_source_slug","query_statement","parameters","row_limit","timeout_seconds","created_at","updated_at"],"type":"object"},"QueryExecutionListResponse":{"description":"Paginated list of query executions","properties":{"executions":{"items":{"$ref":"#/components/schemas/QueryExecutionRecord"},"type":"array"},"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-02-15T10:30:00Z_abc123","type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-02-15T10:10:00Z_xyz789","nullable":true,"type":"string"}},"required":["executions","has_more"],"type":"object"},"QueryExecutionRecord":{"description":"Query execution record","properties":{"executed_at":{"$ref":"#/components/schemas/Timestamp"},"result":{"$ref":"#/components/schemas/QueryExecutionResult"},"slug":{"$ref":"#/components/schemas/Slug"},"status":{"description":"Execution status","example":"success","type":"string"}},"required":["slug","status","result","executed_at"],"type":"object"},"QueryExecutionResult":{"discriminator":{"mapping":{"ftp":"#/components/schemas/FTPExecutionResult","git":"#/components/schemas/GitExecutionResult","http":"#/components/schemas/HTTPExecutionResult","mongodb":"#/components/schemas/MongoDBExecutionResult","object_rows":"#/components/schemas/ObjectRowsExecutionResult","s3":"#/components/schemas/S3ExecutionResult","sql":"#/components/schemas/SQLExecutionResult","workspace_file":"#/components/schemas/WorkspaceFileExecutionResult"},"propertyName":"result_type"},"oneOf":[{"$ref":"#/components/schemas/SQLExecutionResult"},{"$ref":"#/components/schemas/MongoDBExecutionResult"},{"$ref":"#/components/schemas/HTTPExecutionResult"},{"$ref":"#/components/schemas/ObjectRowsExecutionResult"},{"$ref":"#/components/schemas/FTPExecutionResult"},{"$ref":"#/components/schemas/GitExecutionResult"},{"$ref":"#/components/schemas/S3ExecutionResult"},{"$ref":"#/components/schemas/WorkspaceFileExecutionResult"}]},"QueryListResponse":{"description":"Paginated list of queries","properties":{"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-02-15T10:30:00Z_abc123","type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-02-15T10:10:00Z_xyz789","nullable":true,"type":"string"},"queries":{"items":{"$ref":"#/components/schemas/Query"},"type":"array"}},"required":["queries","has_more"],"type":"object"},"QueryParameter":{"description":"Parameter definition for a query. Parameters are referenced in query statements using {{paramName}} placeholders (case-sensitive)","properties":{"data_type":{"description":"Data type of the parameter","enum":["text","integer","boolean","date","uuid"],"example":"integer","type":"string"},"default_value":{"description":"Default value for the parameter (JSON-encoded)","example":"100","type":"string"},"description":{"description":"Human-readable description of the parameter","example":"Maximum number of results to return","type":"string"},"is_required":{"default":false,"description":"Whether this parameter must be provided","example":true,"type":"boolean"},"name":{"description":"Parameter name (used as {{name}} placeholder in query; case-sensitive matching)","example":"user_id","type":"string"},"slug":{"$ref":"#/components/schemas/Slug"}},"required":["name","data_type"],"type":"object"},"QueryStatement":{"discriminator":{"mapping":{"bigquery":"#/components/schemas/BigQueryStatement","ftp":"#/components/schemas/FTPStatement","git":"#/components/schemas/GitStatement","google_workspace":"#/components/schemas/GoogleWorkspaceStatement","http":"#/components/schemas/HTTPStatement","hubspot":"#/components/schemas/HubSpotStatement","mongodb":"#/components/schemas/MongoDBStatement","mysql":"#/components/schemas/MySQLStatement","postgres":"#/components/schemas/PostgresStatement","s3":"#/components/schemas/S3Statement","snowflake":"#/components/schemas/SnowflakeStatement"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/PostgresStatement"},{"$ref":"#/components/schemas/MySQLStatement"},{"$ref":"#/components/schemas/BigQueryStatement"},{"$ref":"#/components/schemas/GoogleWorkspaceStatement"},{"$ref":"#/components/schemas/SnowflakeStatement"},{"$ref":"#/components/schemas/MongoDBStatement"},{"$ref":"#/components/schemas/HTTPStatement"},{"$ref":"#/components/schemas/HubSpotStatement"},{"$ref":"#/components/schemas/FTPStatement"},{"$ref":"#/components/schemas/GitStatement"},{"$ref":"#/components/schemas/S3Statement"}]},"RecoverPipelineRunRequest":{"additionalProperties":false,"properties":{"protected_environment_confirmation":{"$ref":"#/components/schemas/NullableSlug"}},"type":"object"},"ResendVerificationEmailRequest":{"additionalProperties":false,"properties":{"email":{"$ref":"#/components/schemas/Email"}},"required":["email"],"type":"object"},"Role":{"description":"Global user role. This is distinct from an organization membership role.","enum":["user","super_admin"],"example":"user","type":"string"},"RoleListResponse":{"description":"Paginated list of roles","properties":{"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-02-15T10:30:00Z_abc123","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-02-15T10:10:00Z_xyz789","nullable":true,"type":"string"},"roles":{"items":{"$ref":"#/components/schemas/OrgRole"},"type":"array"}},"required":["roles","has_more"],"type":"object"},"RuntimeVariable":{"description":"Non-secret runtime variable scoped to one organization runtime environment.","properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"description":{"allOf":[{"$ref":"#/components/schemas/RuntimeVariableDescription"}],"nullable":true},"environment_slug":{"$ref":"#/components/schemas/Slug"},"key":{"$ref":"#/components/schemas/RuntimeVariableKey"},"updated_at":{"$ref":"#/components/schemas/Timestamp"},"value":{"description":"String representation of the scalar value.","example":"dev/dir","type":"string"},"value_type":{"$ref":"#/components/schemas/RuntimeVariableValueType"}},"required":["environment_slug","key","value_type","value","description","created_at","updated_at"],"type":"object"},"RuntimeVariableDescription":{"description":"Optional operator description for a non-secret runtime variable.","example":"S3 prefix used by this project environment","maxLength":2000,"type":"string"},"RuntimeVariableKey":{"description":"Runtime variable key referenced as `{{runtime.env.key}}` in pipeline specs.","example":"s3_prefix","maxLength":100,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"RuntimeVariableListResponse":{"description":"Paginated list of organization runtime environment variables","properties":{"has_more":{"description":"Whether there are more results","example":false,"type":"boolean"},"next_cursor":{"description":"Cursor for fetching the next page","example":"2026-05-25T10:30:00Z_s3_prefix","nullable":true,"type":"string"},"prev_cursor":{"description":"Cursor for fetching the previous page","example":"2026-05-25T10:10:00Z_batch_size","nullable":true,"type":"string"},"runtime_variables":{"items":{"$ref":"#/components/schemas/RuntimeVariable"},"type":"array"}},"required":["runtime_variables","has_more"],"type":"object"},"RuntimeVariableValueType":{"description":"Scalar runtime variable value type.","enum":["text","integer","boolean","date","uuid"],"example":"text","type":"string","x-enum-varnames":["RuntimeVariableValueTypeText","RuntimeVariableValueTypeInteger","RuntimeVariableValueTypeBoolean","RuntimeVariableValueTypeDate","RuntimeVariableValueTypeUUID"]},"S3Config":{"additionalProperties":false,"description":"S3-compatible object store connection configuration (no credentials)","properties":{"allow_private_hosts":{"description":"Allow endpoint hosts that resolve to private, loopback, or internal network addresses when private host access is available for the deployment.","example":false,"type":"boolean"},"bucket":{"description":"Default bucket used by connection tests, introspection, and operations that omit bucket","example":"braidplane-fixtures","minLength":1,"type":"string"},"endpoint":{"description":"Optional S3-compatible endpoint URL. Omit for AWS S3; set for MinIO or LocalStack.","example":"http://localhost:39000","format":"uri","minLength":1,"type":"string"},"force_path_style":{"description":"Force path-style addressing for S3-compatible providers such as MinIO","example":true,"type":"boolean"},"prefix":{"description":"Optional key prefix used for schema introspection and relative operation keys","example":"exports/","type":"string"},"region":{"description":"AWS region or S3-compatible signing region","example":"us-east-1","minLength":1,"type":"string"},"timeout_seconds":{"default":5,"description":"Request timeout in seconds, capped by configured execution limits","example":10,"maximum":300,"minimum":1,"type":"integer"}},"required":["region","bucket"],"type":"object"},"S3Credentials":{"additionalProperties":false,"description":"Static S3 access key credentials (write-only, never returned). Access keys are encrypted at rest and never returned in data source responses.","properties":{"access_key_id":{"description":"Static S3 access key ID","example":"AKIA...","minLength":1,"type":"string","writeOnly":true},"secret_access_key":{"description":"Static S3 secret access key","example":"secret","minLength":1,"type":"string","writeOnly":true},"session_token":{"description":"Optional temporary-session token","example":"session-token","minLength":1,"type":"string","writeOnly":true}},"required":["access_key_id","secret_access_key"],"type":"object"},"S3ExecutionResult":{"description":"Result of S3 object operation execution","properties":{"duration_ms":{"description":"Execution duration in milliseconds","example":120,"type":"integer"},"error":{"description":"Error message (only present if success is false)","example":"S3 object not found","type":"string"},"payload":{"description":"S3-specific result data","properties":{"column_names":{"description":"Parsed field names (read operation)","example":["col_0","col_1"],"items":{"type":"string"},"type":"array"},"file":{"allOf":[{"$ref":"#/components/schemas/FilePayloadMetadata"}],"nullable":true},"format":{"description":"Detected, selected, or serialized file format","enum":["csv","json","file","spreadsheet"],"example":"spreadsheet","type":"string"},"is_headless_csv":{"description":"Whether parsed CSV had no header row and synthetic column names were used","example":true,"type":"boolean"},"is_headless_spreadsheet":{"description":"Whether parsed spreadsheet data had no header row and synthetic column names were used","example":true,"type":"boolean"},"operation":{"description":"Executed S3 operation","enum":["read","write"],"example":"read","type":"string"},"range":{"description":"Selected spreadsheet A1 range when supplied","example":"A1:D200","type":"string"},"row_count":{"description":"Number of parsed rows (read operation)","example":2,"type":"integer"},"rows":{"description":"Parsed data rows (read operation)","items":{"additionalProperties":true,"type":"object"},"type":"array"},"sheet":{"description":"Selected spreadsheet sheet name when format is spreadsheet","example":"Orders","type":"string"},"target_path":{"description":"Resolved S3 object key used for the operation","example":"exports/users-2026-03-21.csv","type":"string"},"written_bytes":{"description":"Number of bytes written (write operation)","example":128,"type":"integer"},"written_rows":{"description":"Number of rows written when serializing tabular content (write operation)","example":2,"type":"integer"}},"required":["operation","format"],"type":"object"},"result_type":{"allOf":[{"$ref":"#/components/schemas/ExecutionResultResultType"},{"enum":["s3"],"type":"string"}],"description":"Type discriminator for S3 results","example":"s3"},"success":{"description":"Whether execution succeeded","example":true,"type":"boolean"},"type":{"description":"Vendor type (always s3)","example":"s3","type":"string"}},"required":["result_type","type","payload","duration_ms","success"],"type":"object"},"S3Statement":{"additionalProperties":false,"description":"S3 object read/write statement with {{paramName}} placeholders","oneOf":[{"properties":{"operation":{"enum":["read"],"type":"string","x-enum-varnames":["S3ReadStatementOperationRead"]}},"required":["type","operation","key"],"title":"S3ReadStatement"},{"properties":{"operation":{"enum":["write"],"type":"string","x-enum-varnames":["S3WriteStatementOperationWrite"]}},"required":["type","operation","key","content"],"title":"S3WriteStatement"}],"properties":{"bucket":{"description":"Optional bucket override. Omit to use the data source bucket.","example":"braidplane-fixtures","minLength":1,"type":"string"},"content":{"description":"Content to write when operation is write. Pipeline sinks normally bind this through {{input}}.","example":[{"email":"alice@example.com","id":1}],"oneOf":[{"additionalProperties":true,"type":"object"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"string"}]},"content_type":{"description":"Optional object Content-Type metadata override","example":"application/json","minLength":1,"type":"string"},"delimiter":{"description":"Optional CSV delimiter (single character)","example":",","maxLength":1,"minLength":1,"type":"string"},"format":{"default":"auto","description":"Optional file format override. Use file for native opaque file/blob payloads. Spreadsheet mode supports Excel workbook files and normalizes the selected sheet/range to rows.","enum":["auto","csv","json","file","spreadsheet"],"example":"csv","type":"string","x-enum-varnames":["S3StatementFormatAuto","S3StatementFormatCsv","S3StatementFormatJson","S3StatementFormatFile","S3StatementFormatSpreadsheet"]},"has_header":{"description":"Optional CSV/spreadsheet header override","example":true,"type":"boolean"},"key":{"description":"Object key with {{paramName}} placeholders. Relative keys are resolved below the configured prefix.","example":"exports/users-{{runtime.run_date}}.csv","minLength":1,"type":"string"},"metadata":{"additionalProperties":{"type":"string"},"description":"Optional user metadata to attach to the written object","example":{"source":"braidplane"},"type":"object"},"operation":{"description":"S3 object operation","enum":["read","write"],"example":"read","type":"string"},"overwrite":{"default":true,"description":"Whether to replace an existing object when operation is write","example":true,"type":"boolean"},"range":{"description":"Optional spreadsheet A1 range for reads or start cell for writes. Sheet names must be supplied through `sheet`.","example":"A1:D200","minLength":1,"type":"string"},"sheet":{"description":"Optional spreadsheet sheet name. If omitted for reads, the first workbook sheet is used.","example":"Orders","minLength":1,"type":"string"},"type":{"description":"Data source type discriminator","enum":["s3"],"type":"string","x-enum-varnames":["S3StatementTypeS3"]}},"required":["type"],"type":"object"},"SQLExecutionResult":{"description":"Result of SQL-shaped query execution (PostgreSQL, MySQL, BigQuery)","properties":{"duration_ms":{"description":"Execution duration in milliseconds","example":245,"type":"integer"},"error":{"description":"Error message (only present if success is false)","example":"Database connection timeout","type":"string"},"payload":{"description":"SQL-specific result data","properties":{"column_names":{"description":"Column names (optional metadata)","example":["id","email","last_login_at"],"items":{"type":"string"},"type":"array"},"row_count":{"description":"Number of rows returned","example":2,"type":"integer"},"rows":{"description":"Result rows (each row is a key-value map)","example":[{"email":"user1@example.com","id":1,"last_login_at":"2026-02-15T10:30:00Z"},{"email":"user2@example.com","id":2,"last_login_at":"2026-02-18T14:25:00Z"}],"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["rows","row_count"],"type":"object"},"result_type":{"allOf":[{"$ref":"#/components/schemas/ExecutionResultResultType"},{"enum":["sql"],"type":"string"}],"description":"Type discriminator for SQL results","example":"sql"},"success":{"description":"Whether execution succeeded","example":true,"type":"boolean"},"type":{"description":"Vendor type (postgres, mysql, bigquery)","example":"postgres","type":"string"}},"required":["result_type","type","payload","duration_ms","success"],"type":"object"},"SQLSchemaResponse":{"description":"SQL database schema introspection result (unified for PostgreSQL, MySQL, BigQuery, SQLite, etc.)","properties":{"schema_type":{"description":"Schema category identifier","enum":["sql"],"example":"sql","type":"string"},"tables":{"description":"List of tables in the database","items":{"$ref":"#/components/schemas/TableInfo"},"type":"array"},"type":{"description":"SQL database vendor type","enum":["postgres","mysql","bigquery","snowflake","sqlite"],"example":"postgres","type":"string"}},"required":["schema_type","type","tables"],"type":"object"},"SavePipelineDraftRequest":{"additionalProperties":false,"description":"Request to save a draft pipeline definition. Pipeline slug is immutable and defined only by the pipeline_slug path parameter.","properties":{"expected_spec_hash":{"description":"Canonical pipeline version hash the editor was opened from.","example":"6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","nullable":true,"type":"string"},"spec":{"$ref":"#/components/schemas/PipelineSpecUpdate"}},"required":["spec"],"type":"object"},"SelectProviderRepositoryRequest":{"additionalProperties":false,"properties":{"repository_id":{"description":"Stable provider repository or project identifier returned by the repository list endpoint","minLength":1,"type":"string"}},"required":["repository_id"],"type":"object"},"SetProjectPipelineBackendCreateWithoutOwner":{"description":"Validation-only shape rejected because repository creation requires provider_owner.","not":{"required":["provider_owner"]},"properties":{"mode":{"enum":["create_from_template"],"type":"string"}},"required":["mode"],"type":"object"},"SetProjectPipelineBackendCreateWithoutRepositoryName":{"description":"Validation-only shape rejected because repository creation requires repository_name.","not":{"required":["repository_name"]},"properties":{"mode":{"enum":["create_from_template"],"type":"string"}},"required":["mode"],"type":"object"},"SetProjectPipelineBackendRequest":{"additionalProperties":false,"description":"Request to attach a project's git pipeline backend.\nA managed GitHub App attachment also binds the verified installation's publishing identity\nas a project-scoped organization service proposal authority.\n","not":{"anyOf":[{"$ref":"#/components/schemas/SetProjectPipelineBackendCreateWithoutOwner"},{"$ref":"#/components/schemas/SetProjectPipelineBackendCreateWithoutRepositoryName"}]},"properties":{"data_source_slug":{"$ref":"#/components/schemas/Slug"},"mode":{"description":"Required backend attach mode.\n`adopt_existing` makes the target repo/branch authoritative and imports the pipeline files already present there.\n`create_from_template` creates a private repository through an unmanaged GitHub connection and then imports its exact first commit.\nManaged GitHub App sources use `adopt_existing` because each source is bound to one selected repository.\n","enum":["adopt_existing","create_from_template"],"example":"adopt_existing","type":"string"},"pipeline_dir":{"description":"Repository-relative directory containing canonical pipeline specs.","example":"pipelines","maxLength":1024,"minLength":1,"type":"string"},"provider_owner":{"description":"Provider user or organization that will own a newly created repository.","maxLength":255,"minLength":1,"type":"string"},"repository_name":{"description":"Name of a private repository to create from the current Braidplane template.","maxLength":100,"minLength":1,"type":"string"},"tracked_branch":{"description":"Writable tracked branch for the project backend.","example":"main","maxLength":255,"minLength":1,"type":"string"}},"required":["data_source_slug","tracked_branch","pipeline_dir","mode"],"type":"object"},"Slug":{"description":"URL-friendly identifier","example":"acme-corp","maxLength":100,"minLength":1,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"SnowflakeConfig":{"additionalProperties":false,"description":"Snowflake warehouse session configuration (no credentials)","properties":{"account":{"description":"Snowflake account identifier","example":"xy12345.eu-central-1","minLength":1,"type":"string"},"connect_timeout":{"description":"Timeout in seconds for session startup and, separately, connection verification. Defaults to 30 seconds.","example":15,"maximum":300,"minimum":1,"type":"integer"},"database":{"description":"Snowflake database containing the configured schema","example":"ANALYTICS","minLength":1,"type":"string"},"role":{"description":"Optional Snowflake role assumed for the session","example":"BRAIDPLANE_READER","minLength":1,"type":"string"},"schema":{"description":"Snowflake schema used for the session and schema introspection","example":"PUBLIC","minLength":1,"type":"string"},"warehouse":{"description":"Snowflake virtual warehouse used to execute queries and writes","example":"BRAIDPLANE_WH","minLength":1,"type":"string"},"wif_objects":{"description":"Explicit table privileges for self-service workload identity onboarding and verification. Requires a dedicated role. No future or wildcard grants.","items":{"$ref":"#/components/schemas/SnowflakeObjectGrant"},"maxItems":100,"minItems":1,"type":"array"}},"required":["account","warehouse","database","schema"],"type":"object"},"SnowflakeCredentials":{"description":"Snowflake authentication selection. Password authentication is available where provider policy permits. Workload identity requires a saved organization/connection/account identity and customer-configured Snowflake trust; Braidplane provisions the identity asynchronously and returns the saved connection inactive while provisioning is pending; test the stored connection after identity readiness and Snowflake trust are configured. Tokens and token paths are never customer inputs or returned in responses.","discriminator":{"mapping":{"password":"#/components/schemas/SnowflakePasswordCredentials","workload_identity":"#/components/schemas/SnowflakeWorkloadIdentityCredentials"},"propertyName":"auth_type"},"oneOf":[{"$ref":"#/components/schemas/SnowflakePasswordCredentials"},{"$ref":"#/components/schemas/SnowflakeWorkloadIdentityCredentials"}]},"SnowflakeObjectGrant":{"additionalProperties":false,"description":"An existing table in the configured database and schema. Names are exact, case-sensitive identifiers without SQL quoting or qualification.","properties":{"name":{"maxLength":255,"minLength":1,"type":"string"},"privilege":{"description":"SELECT for a source; INSERT for an append-only sink.","enum":["SELECT","INSERT"],"type":"string"}},"required":["name","privilege"],"type":"object"},"SnowflakeOnboarding":{"additionalProperties":false,"properties":{"active":{"description":"True only after identity readiness and stored connection verification.","type":"boolean"},"audience":{"type":"string"},"diagnostic":{"description":"Safe readiness or verification instructions.","type":"string"},"identity_state":{"enum":["pending","ready","failed","revoking","disabled"],"type":"string","x-enum-varnames":["SnowflakeOnboardingIdentityStatePending","SnowflakeOnboardingIdentityStateReady","SnowflakeOnboardingIdentityStateFailed","SnowflakeOnboardingIdentityStateRevoking","SnowflakeOnboardingIdentityStateDisabled"]},"issuer":{"type":"string"},"sql":{"description":"Customer-admin script. Review and execute only in the exact configured account.","type":"string"},"subject":{"type":"string"}},"required":["identity_state","active","issuer","subject","audience","sql","diagnostic"],"type":"object"},"SnowflakePasswordCredentials":{"additionalProperties":false,"description":"Snowflake username and password authentication credentials","properties":{"auth_type":{"enum":["password"],"example":"password","type":"string","x-enum-varnames":["SnowflakePasswordCredentialsAuthTypePassword"]},"password":{"description":"Snowflake password","minLength":1,"type":"string","writeOnly":true},"username":{"description":"Snowflake username, required only for password authentication","minLength":1,"type":"string","writeOnly":true}},"required":["auth_type","username","password"],"type":"object"},"SnowflakeStatement":{"additionalProperties":false,"description":"Snowflake SQL statement with parameterized {{paramName}} placeholders","properties":{"sql":{"description":"Snowflake SQL text; values are bound through the driver and never interpolated","example":"SELECT * FROM ANALYTICS.PUBLIC.ORDERS WHERE REGION = {{region}}","minLength":1,"type":"string"},"type":{"description":"Data source type discriminator","enum":["snowflake"],"type":"string"}},"required":["type","sql"],"type":"object"},"SnowflakeWorkloadIdentityCredentials":{"additionalProperties":false,"description":"Snowflake workload identity authentication. Save the connection and configure Snowflake trust, then test the stored connection after identity reconciliation is ready. Braidplane provisions and revokes the exact identity automatically. Customer identities use short-lived OIDC tokens obtained at runtime; the staging fixture token-file mode is separate.","properties":{"auth_type":{"enum":["workload_identity"],"example":"workload_identity","type":"string","x-enum-varnames":["SnowflakeWorkloadIdentityCredentialsAuthTypeWorkloadIdentity"]}},"required":["auth_type"],"type":"object"},"StartProviderConnectorInstallRequest":{"additionalProperties":false,"description":"Starts a provider OAuth2 install for an existing data source grant create or rotation flow. The backend-owned provider adapter selects the requested scopes.","properties":{"access_mode":{"$ref":"#/components/schemas/GoogleWorkspaceAccessMode"},"data_source_slug":{"$ref":"#/components/schemas/Slug"},"intent":{"$ref":"#/components/schemas/ProviderInstallIntent"}},"required":["data_source_slug","intent"],"type":"object"},"StartProviderDataSourceInstallRequest":{"additionalProperties":false,"description":"Starts OAuth-first onboarding for a new provider-backed data source.","properties":{"config":{"anyOf":[{"$ref":"#/components/schemas/HubSpotConfig"},{"$ref":"#/components/schemas/BigQueryConfig"},{"$ref":"#/components/schemas/GoogleWorkspacePendingInstallConfig"}]},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":true,"description":"Whether direct mutating operations and pipeline sink use are blocked for this data source.","type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"type":{"description":"Provider-backed data source type","enum":["hubspot","bigquery","google_workspace"],"type":"string","x-enum-varnames":["StartProviderDataSourceInstallRequestTypeHubspot","StartProviderDataSourceInstallRequestTypeBigquery","StartProviderDataSourceInstallRequestTypeGoogleWorkspace"]}},"required":["name","type","config"],"type":"object"},"TableInfo":{"description":"Schema information for a database table","properties":{"columns":{"description":"List of columns in the table","items":{"$ref":"#/components/schemas/ColumnInfo"},"type":"array"},"name":{"description":"Table name","example":"users","type":"string"}},"required":["name","columns"],"type":"object"},"TermsAcceptanceRequest":{"additionalProperties":false,"description":"Explicit, versioned acceptance required for account creation or invitation acceptance.","properties":{"terms_accepted":{"description":"Explicit confirmation that the displayed terms and privacy notice were accepted.","enum":[true],"type":"boolean"},"terms_document_version":{"description":"Version identifier displayed when acceptance was collected.","example":"pre-alpha-2026-07-19","minLength":1,"type":"string"}},"required":["terms_accepted","terms_document_version"],"type":"object"},"TestBigQueryDataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/BigQueryConfig"},"credentials":{"$ref":"#/components/schemas/BigQueryCredentials"},"type":{"enum":["bigquery"],"type":"string","x-enum-varnames":["TestBigQueryDataSourceConnectionRequestTypeBigquery"]}},"required":["type","config","credentials"],"type":"object"},"TestDataSourceConnectionRequest":{"description":"Request to test data source connection without creating a data source","discriminator":{"mapping":{"bigquery":"#/components/schemas/TestBigQueryDataSourceConnectionRequest","ftp":"#/components/schemas/TestFTPDataSourceConnectionRequest","git":"#/components/schemas/TestGitDataSourceConnectionRequest","github":"#/components/schemas/TestGitHubDataSourceConnectionRequest","gitlab":"#/components/schemas/TestGitLabDataSourceConnectionRequest","http":"#/components/schemas/TestHTTPDataSourceConnectionRequest","hubspot":"#/components/schemas/TestHubSpotDataSourceConnectionRequest","mongodb":"#/components/schemas/TestMongoDBDataSourceConnectionRequest","mysql":"#/components/schemas/TestMySQLDataSourceConnectionRequest","postgres":"#/components/schemas/TestPostgresDataSourceConnectionRequest","s3":"#/components/schemas/TestS3DataSourceConnectionRequest","snowflake":"#/components/schemas/TestSnowflakeDataSourceConnectionRequest"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/TestPostgresDataSourceConnectionRequest"},{"$ref":"#/components/schemas/TestMySQLDataSourceConnectionRequest"},{"$ref":"#/components/schemas/TestBigQueryDataSourceConnectionRequest"},{"$ref":"#/components/schemas/TestSnowflakeDataSourceConnectionRequest"},{"$ref":"#/components/schemas/TestHTTPDataSourceConnectionRequest"},{"$ref":"#/components/schemas/TestHubSpotDataSourceConnectionRequest"},{"$ref":"#/components/schemas/TestMongoDBDataSourceConnectionRequest"},{"$ref":"#/components/schemas/TestFTPDataSourceConnectionRequest"},{"$ref":"#/components/schemas/TestGitDataSourceConnectionRequest"},{"$ref":"#/components/schemas/TestGitHubDataSourceConnectionRequest"},{"$ref":"#/components/schemas/TestGitLabDataSourceConnectionRequest"},{"$ref":"#/components/schemas/TestS3DataSourceConnectionRequest"}]},"TestFTPDataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/FTPConfig"},"credentials":{"$ref":"#/components/schemas/FTPCredentials"},"type":{"enum":["ftp"],"type":"string","x-enum-varnames":["TestFTPDataSourceConnectionRequestTypeFtp"]}},"required":["type","config","credentials"],"type":"object"},"TestGitDataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/GitConfig"},"credentials":{"$ref":"#/components/schemas/GitCredentials"},"type":{"enum":["git"],"type":"string","x-enum-varnames":["TestGitDataSourceConnectionRequestTypeGit"]}},"required":["type","config","credentials"],"type":"object"},"TestGitHubDataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/GitHubRepositoryConfig"},"type":{"enum":["github"],"type":"string","x-enum-varnames":["TestGitHubDataSourceConnectionRequestTypeGithub"]}},"required":["type","config"],"type":"object"},"TestGitLabDataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/GitLabRepositoryConfig"},"type":{"enum":["gitlab"],"type":"string","x-enum-varnames":["TestGitLabDataSourceConnectionRequestTypeGitlab"]}},"required":["type","config"],"type":"object"},"TestHTTPDataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/HTTPConfig"},"credentials":{"$ref":"#/components/schemas/HTTPCredentials"},"type":{"enum":["http"],"type":"string","x-enum-varnames":["TestHTTPDataSourceConnectionRequestTypeHttp"]}},"required":["type","config","credentials"],"type":"object"},"TestHubSpotDataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/HubSpotConfig"},"credentials":{"$ref":"#/components/schemas/HubSpotCredentials"},"type":{"enum":["hubspot"],"type":"string","x-enum-varnames":["TestHubSpotDataSourceConnectionRequestTypeHubspot"]}},"required":["type","config","credentials"],"type":"object"},"TestMongoDBDataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/MongoDBConfig"},"credentials":{"$ref":"#/components/schemas/MongoDBCredentials"},"type":{"enum":["mongodb"],"type":"string","x-enum-varnames":["TestMongoDBDataSourceConnectionRequestTypeMongodb"]}},"required":["type","config","credentials"],"type":"object"},"TestMySQLDataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/MySQLConfig"},"credentials":{"$ref":"#/components/schemas/MySQLCredentials"},"type":{"enum":["mysql"],"type":"string","x-enum-varnames":["TestMySQLDataSourceConnectionRequestTypeMysql"]}},"required":["type","config","credentials"],"type":"object"},"TestPostgresDataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/PostgresConfig"},"credentials":{"$ref":"#/components/schemas/PostgresCredentials"},"type":{"enum":["postgres"],"type":"string","x-enum-varnames":["TestPostgresDataSourceConnectionRequestTypePostgres"]}},"required":["type","config","credentials"],"type":"object"},"TestS3DataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/S3Config"},"credentials":{"$ref":"#/components/schemas/S3Credentials"},"type":{"enum":["s3"],"type":"string","x-enum-varnames":["TestS3DataSourceConnectionRequestTypeS3"]}},"required":["type","config","credentials"],"type":"object"},"TestSnowflakeDataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/SnowflakeConfig"},"credentials":{"$ref":"#/components/schemas/SnowflakeCredentials"},"type":{"enum":["snowflake"],"type":"string"}},"required":["type","config","credentials"],"type":"object"},"Timestamp":{"example":"2025-10-04T12:34:56Z","format":"date-time","type":"string"},"UUID":{"example":"123e4567-e89b-12d3-a456-426614174000","format":"uuid","type":"string"},"UpdateAPIKey":{"additionalProperties":false,"properties":{"can_manage_api_keys":{"description":"Enables or disables API key management. Bearer API keys cannot change this field.","type":"boolean"},"description":{"example":"Used by the nightly workflow sync","maxLength":1000,"type":"string"},"expires_at":{"$ref":"#/components/schemas/NullableTimestamp"},"name":{"$ref":"#/components/schemas/Name"}},"required":["name"],"type":"object"},"UpdateAlertDestination":{"additionalProperties":false,"description":"Full replacement of mutable alert destination fields.","properties":{"enabled":{"example":true,"type":"boolean"},"name":{"$ref":"#/components/schemas/Name"},"non_secret_config":{"$ref":"#/components/schemas/AlertDestinationConfig"},"type":{"$ref":"#/components/schemas/AlertDestinationType"}},"required":["name","type","non_secret_config","enabled"],"type":"object"},"UpdateAlertPolicy":{"additionalProperties":false,"description":"Full replacement of mutable alert policy fields and destination bindings.","not":{"anyOf":[{"$ref":"#/components/schemas/AlertPolicyOrganizationScopeWithProject"},{"$ref":"#/components/schemas/AlertPolicyOrganizationScopeWithEnvironment"},{"$ref":"#/components/schemas/AlertPolicyProjectScopeWithoutProject"},{"$ref":"#/components/schemas/AlertPolicyProjectScopeWithEnvironment"},{"$ref":"#/components/schemas/AlertPolicyProjectEnvironmentScopeWithoutProject"},{"$ref":"#/components/schemas/AlertPolicyProjectEnvironmentScopeWithoutEnvironment"}]},"properties":{"destination_slugs":{"items":{"$ref":"#/components/schemas/Slug"},"minItems":1,"type":"array"},"enabled":{"example":true,"type":"boolean"},"environment_slug":{"$ref":"#/components/schemas/NullableSlug"},"lifecycle_state":{"$ref":"#/components/schemas/AlertPolicyLifecycleState"},"name":{"$ref":"#/components/schemas/Name"},"notification_type":{"$ref":"#/components/schemas/AlertPolicyNotificationType"},"project_slug":{"$ref":"#/components/schemas/NullableSlug"},"scope":{"$ref":"#/components/schemas/AlertPolicyScope"},"severity":{"$ref":"#/components/schemas/AlertPolicySeverity"},"source_action":{"$ref":"#/components/schemas/AlertPolicySourceAction"},"source_kind":{"$ref":"#/components/schemas/AlertPolicySourceKind"},"source_ref":{"$ref":"#/components/schemas/AlertPolicySourceRef"}},"required":["name","scope","destination_slugs","enabled"],"type":"object"},"UpdateDataSourceCredentialsRequest":{"additionalProperties":false,"description":"Request to update credentials for an existing data source","properties":{"credentials":{"$ref":"#/components/schemas/DataSourceCredentials"}},"required":["credentials"],"type":"object"},"UpdateDataSourceRef":{"additionalProperties":false,"description":"Request to update a pipeline-scoped logical data source reference.","properties":{"data_source_type":{"$ref":"#/components/schemas/DataSourceType"},"name":{"$ref":"#/components/schemas/Name"},"protected_environment_confirmation":{"$ref":"#/components/schemas/NullableSlug"},"required_capabilities":{"items":{"$ref":"#/components/schemas/DataSourceRefCapability"},"minItems":1,"type":"array","uniqueItems":true}},"required":["name","data_source_type","required_capabilities"],"type":"object"},"UpdateDataSourceRequest":{"additionalProperties":false,"description":"Request to partially update mutable data source fields","minProperties":1,"properties":{"config":{"$ref":"#/components/schemas/DataSourceConfig"},"is_active":{"description":"Snowflake only. False disables the connection and requests WIF revocation; true requests provisioning again but WIF remains inactive until explicit verification passes.","type":"boolean"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"default":false,"description":"Whether the data source is read-only. Read-only data sources cannot be used as pipeline sinks.","type":"boolean"}},"type":"object"},"UpdateEnvironment":{"additionalProperties":false,"description":"Request to update runtime environment catalog metadata.","properties":{"color":{"$ref":"#/components/schemas/EnvironmentColor"},"description":{"$ref":"#/components/schemas/EnvironmentDescription"},"name":{"$ref":"#/components/schemas/Name"},"protected":{"default":false,"description":"Whether this catalog environment requires explicit confirmation before protected runtime-changing operations.","example":true,"type":"boolean"},"protected_environment_confirmation":{"$ref":"#/components/schemas/NullableSlug"}},"required":["name","color","protected"],"type":"object"},"UpdateMember":{"additionalProperties":false,"properties":{"role":{"$ref":"#/components/schemas/MemberRole"}},"required":["role"],"type":"object"},"UpdateODCSContract":{"additionalProperties":false,"properties":{"name":{"maxLength":255,"minLength":1,"type":"string"},"status":{"enum":["active","archived"],"type":"string"}},"required":["name","status"],"type":"object"},"UpdateOrgRole":{"additionalProperties":false,"properties":{"name":{"$ref":"#/components/schemas/Name"},"permissions":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array"}},"required":["name","permissions"],"type":"object"},"UpdateOrganization":{"additionalProperties":false,"properties":{"name":{"$ref":"#/components/schemas/Name"}},"required":["name"],"type":"object"},"UpdatePersonalAccessToken":{"additionalProperties":false,"properties":{"can_manage_personal_access_tokens":{"description":"Enables or disables personal access token management. Bearer PATs cannot change this field.","type":"boolean"},"description":{"example":"Used by the CLI for draft workflows","maxLength":1000,"nullable":true,"type":"string"},"expires_at":{"$ref":"#/components/schemas/NullableTimestamp"},"name":{"$ref":"#/components/schemas/Name"}},"required":["name"],"type":"object"},"UpdatePipeline":{"additionalProperties":false,"description":"Request to propose a change to an existing Git-authored pipeline. Pipeline slug is immutable and defined only by the pipeline_slug path parameter.","properties":{"spec":{"$ref":"#/components/schemas/PipelineSpecUpdate"}},"required":["spec"],"type":"object"},"UpdatePipelineTrigger":{"additionalProperties":false,"description":"Request to fully replace mutable fields for an environment-scoped pipeline trigger definition.","not":{"anyOf":[{"$ref":"#/components/schemas/PipelineTriggerScheduleWithoutScheduleConfig"},{"$ref":"#/components/schemas/PipelineTriggerWebhookWithoutWebhookConfig"},{"$ref":"#/components/schemas/PipelineTriggerScheduleWithWebhookConfig"},{"$ref":"#/components/schemas/PipelineTriggerWebhookWithScheduleConfig"}]},"properties":{"enabled":{"description":"Whether the trigger can submit future runs. Enabling requires a valid target version policy.","example":true,"type":"boolean"},"name":{"$ref":"#/components/schemas/Name"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"retry_policy":{"$ref":"#/components/schemas/PipelineTriggerRetryPolicy"},"runtime_input_keys":{"description":"Safe per-run input keys this trigger may provide. Runtime input values are never persisted on the trigger.","example":["tenant_id","dry_run"],"items":{"maxLength":100,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"type":"array","uniqueItems":true},"schedule":{"$ref":"#/components/schemas/PipelineTriggerScheduleConfig"},"type":{"$ref":"#/components/schemas/PipelineTriggerType"},"version_policy":{"$ref":"#/components/schemas/PipelineTriggerVersionPolicy"},"webhook":{"$ref":"#/components/schemas/PipelineWebhookConfigInput"}},"required":["name","type","enabled","pipeline_slug","version_policy","runtime_input_keys","retry_policy"],"type":"object"},"UpdateProject":{"additionalProperties":false,"description":"Request to update a project","properties":{"name":{"$ref":"#/components/schemas/Name"}},"required":["name"],"type":"object"},"UpdateQuery":{"additionalProperties":false,"description":"Request body for updating a query","properties":{"description":{"description":"Optional description of what the query does","example":"Updated description","type":"string"},"expected_input_contract":{"$ref":"#/components/schemas/PipelineSchemaContract"},"name":{"description":"Human-readable name of the query","example":"Get Recent Active Users","maxLength":255,"minLength":1,"type":"string"},"parameters":{"description":"Parameter definitions for the query","items":{"$ref":"#/components/schemas/QueryParameter"},"type":"array"},"query_statement":{"$ref":"#/components/schemas/QueryStatement"},"row_limit":{"description":"Maximum number of result rows, capped by the server limit. HTTP top-level JSON array elements each count as one row; objects and scalar/text responses count as one document, while null and opaque files have no JSON rows. Exceeding the effective limit fails with EXECUTION_ROW_LIMIT_EXCEEDED; response-byte limits apply independently.","example":500,"maximum":10000,"minimum":1,"type":"integer"},"timeout_seconds":{"description":"Query execution timeout in seconds","example":15,"maximum":300,"minimum":1,"type":"integer"}},"required":["name","query_statement"],"type":"object"},"UpdateUserPassword":{"additionalProperties":false,"properties":{"current_password":{"$ref":"#/components/schemas/Password"},"new_password":{"$ref":"#/components/schemas/Password"}},"required":["current_password","new_password"],"type":"object"},"UpdateUserProfile":{"additionalProperties":false,"minProperties":1,"properties":{"avatar_url":{"description":"Optional profile picture URL. Send an empty string to clear it.","example":"https://example.com/avatar.jpg","format":"uri","type":"string"},"billing_address":{"$ref":"#/components/schemas/BillingAddress"},"full_name":{"$ref":"#/components/schemas/Name"},"job_title":{"description":"Optional job title. Send an empty string to clear it.","example":"Operations Manager","maxLength":120,"type":"string"},"locale":{"description":"User's preferred locale (BCP 47 language tag)","example":"pl","type":"string"},"mfa_email_enabled":{"description":"Enables email MFA for email/password sign-in","type":"boolean"},"phone_number":{"description":"Optional phone number. Send an empty string to clear it.","example":"+48123123123","maxLength":32,"type":"string"},"timezone":{"description":"Optional IANA timezone. Send an empty string to clear it.","example":"Europe/Warsaw","maxLength":64,"type":"string"}},"type":"object"},"UpsertBillingProfile":{"additionalProperties":false,"description":"Billing profile invoice details supplied during upgrade or billing settings flows","properties":{"address":{"$ref":"#/components/schemas/BillingProfileAddress"},"billing_email":{"$ref":"#/components/schemas/Email"},"billing_name":{"example":"Acme Corp Sp. z o.o.","maxLength":255,"minLength":1,"type":"string"},"country":{"description":"ISO 3166-1 alpha-2 country code used for invoicing and tax handling","example":"PL","maxLength":2,"minLength":2,"type":"string"},"tax_id":{"description":"Optional VAT or tax identifier for organization billing profiles","example":"PL1234567890","maxLength":64,"nullable":true,"type":"string"}},"required":["billing_name","billing_email","country"],"type":"object"},"UpsertDataSourceBinding":{"additionalProperties":false,"description":"Request to bind a logical data source ref to a concrete organization-owned data source.","properties":{"data_source_slug":{"$ref":"#/components/schemas/Slug"},"protected_environment_confirmation":{"$ref":"#/components/schemas/NullableSlug"}},"required":["data_source_slug"],"type":"object"},"UpsertEnvironmentSecret":{"additionalProperties":false,"description":"Request to create or replace a write-only environment secret for an organization runtime environment.","properties":{"description":{"$ref":"#/components/schemas/EnvironmentSecretDescription"},"protected_environment_confirmation":{"$ref":"#/components/schemas/NullableSlug"},"value":{"description":"Plaintext secret value accepted only on create or update. It is encrypted and never returned by read APIs.","example":"secret-value","maxLength":20000,"minLength":1,"type":"string","writeOnly":true}},"required":["value"],"type":"object"},"UpsertRuntimeVariable":{"additionalProperties":false,"description":"Request to create or replace a non-secret runtime variable for an organization runtime environment.","properties":{"description":{"$ref":"#/components/schemas/RuntimeVariableDescription"},"protected_environment_confirmation":{"$ref":"#/components/schemas/NullableSlug"},"value":{"description":"String representation of the scalar value. It is validated according to value_type.","example":"dev/dir","maxLength":4000,"minLength":1,"type":"string"},"value_type":{"$ref":"#/components/schemas/RuntimeVariableValueType"}},"required":["value_type","value"],"type":"object"},"User":{"properties":{"avatar_url":{"description":"Optional profile picture URL","example":"https://example.com/avatar.jpg","format":"uri","type":"string"},"billing_address":{"$ref":"#/components/schemas/BillingAddress"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"email":{"$ref":"#/components/schemas/Email"},"full_name":{"$ref":"#/components/schemas/Name"},"has_local_password":{"description":"Whether this account has a local password that can be changed after current-password verification","example":true,"type":"boolean"},"job_title":{"description":"Optional job title","example":"Operations Manager","maxLength":120,"type":"string"},"locale":{"description":"User's preferred locale (e.g., en-US, pl)","example":"en-US","type":"string"},"mfa_email_enabled":{"description":"Whether email MFA is enabled for email/password sign-in","example":true,"type":"boolean"},"phone_number":{"description":"Optional phone number in a user-entered international format","example":"+48123123123","maxLength":32,"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"slug":{"$ref":"#/components/schemas/Slug"},"timezone":{"description":"Optional IANA timezone","example":"Europe/Warsaw","maxLength":64,"type":"string"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","full_name","email","role","locale","mfa_email_enabled","has_local_password","created_at","updated_at"],"type":"object"},"ValidationError":{"description":"Field-level validation error","properties":{"code":{"description":"Specific validation error code for i18n","example":"EMAIL_INVALID","type":"string"},"details":{"additionalProperties":true,"description":"Additional validation context","example":{"expected_format":"user@example.com","provided_value":"not-an-email"},"type":"object"},"field":{"description":"Name of the field that failed validation","example":"email","type":"string"},"message":{"description":"Human-readable validation error message","example":"Invalid email format","type":"string"}},"required":["field","code","message"],"type":"object"},"WorkspaceFileExecutionResult":{"description":"Result of Workspace file object operation execution","properties":{"duration_ms":{"description":"Execution duration in milliseconds","example":120,"type":"integer"},"error":{"description":"Error message (only present if success is false)","example":"Workspace file object not found","type":"string"},"payload":{"description":"Workspace file-specific result data","properties":{"column_names":{"description":"Parsed field names (read operation)","example":["col_0","col_1"],"items":{"type":"string"},"type":"array"},"file":{"allOf":[{"$ref":"#/components/schemas/FilePayloadMetadata"}],"nullable":true},"file_id":{"type":"string"},"format":{"description":"Detected, selected, or serialized file format","enum":["csv","json","file"],"example":"json","type":"string"},"is_headless_csv":{"description":"Whether parsed CSV had no header row and synthetic column names were used","example":true,"type":"boolean"},"mime_type":{"type":"string"},"name":{"type":"string"},"operation":{"description":"Executed Workspace file operation","enum":["read","create","update"],"example":"read","type":"string"},"row_count":{"description":"Number of parsed rows (read operation)","example":2,"type":"integer"},"rows":{"description":"Parsed data rows (read operation)","items":{"additionalProperties":true,"type":"object"},"type":"array"},"target_path":{"description":"Resolved stable Workspace file ID used for the operation","example":"file-id","type":"string"},"written_bytes":{"description":"Number of bytes written (create or update operation)","example":128,"type":"integer"},"written_rows":{"description":"Number of rows written when serializing tabular content (create or update operation)","example":2,"type":"integer"}},"required":["operation","format"],"type":"object"},"result_type":{"allOf":[{"$ref":"#/components/schemas/ExecutionResultResultType"},{"enum":["workspace_file"],"type":"string"}],"description":"Type discriminator for Workspace file results","example":"workspace_file"},"success":{"description":"Whether execution succeeded","example":true,"type":"boolean"},"type":{"description":"Vendor type (always google_workspace)","example":"google_workspace","type":"string"}},"required":["result_type","type","payload","duration_ms","success"],"type":"object"}},"securitySchemes":{"BearerAuth":{"scheme":"bearer","type":"http"}}},"info":{"description":"Braidplane backend API for multi-tenant operational data workflows.\nIt provides authentication, organization management, data source connectivity,\nquery execution, and pipeline orchestration endpoints used by the SSR frontend.\n","title":"Braidplane API","version":"0.0.1"},"openapi":"3.0.4","paths":{"/auth/email/resend-verification":{"post":{"description":"Sends a fresh verification email to an unverified account.\nThe response is intentionally generic and does not expose account state.\n","operationId":"resendVerificationEmail","requestBody":{"content":{"application/json":{"example":{"email":"john.doe@example.com"},"schema":{"$ref":"#/components/schemas/ResendVerificationEmailRequest"}}},"required":true},"responses":{"204":{"description":"Verification resend request accepted"},"400":{"description":"Invalid request body or validation error"}},"summary":"Resend verification email","tags":["authentication"]}},"/auth/email/verify":{"post":{"description":"Verifies a user's email address using the token sent to their email during registration.\nTokens are single-use and expire after 24 hours.\n","operationId":"verifyEmail","requestBody":{"content":{"application/json":{"example":{"token":"abc123-secure-token-xyz789"},"schema":{"$ref":"#/components/schemas/EmailVerificationRequest"}}},"required":true},"responses":{"204":{"description":"Email successfully verified"},"400":{"description":"Invalid or expired token"}},"summary":"Verify email address","tags":["authentication"]}},"/auth/google":{"get":{"description":"Redirects the user to Google's OAuth consent screen. \nAfter the user authenticates with Google, they will be redirected back to the backend callback endpoint.\n","operationId":"initiateGoogleAuth","responses":{"302":{"description":"Redirect to Google OAuth consent screen","headers":{"Location":{"description":"Google OAuth authorization URL","schema":{"example":"https://accounts.google.com/o/oauth2/v2/auth?client_id=...","format":"uri","type":"string"}}}}},"summary":"Initiate Google OAuth flow","tags":["authentication"]},"post":{"operationId":"registerGoogleAccount","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"additionalProperties":false,"properties":{"_csrf":{"description":"Browser form CSRF token.","type":"string"},"terms_accepted":{"enum":[true],"type":"boolean"},"terms_document_version":{"minLength":1,"type":"string"}},"required":["terms_accepted","terms_document_version"],"type":"object"}}},"required":true},"responses":{"302":{"description":"Redirect to Google OAuth consent screen"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Current terms acceptance is required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Account creation is disabled"}},"summary":"Start Google account registration with accepted terms","tags":["authentication"]}},"/auth/google/callback":{"get":{"description":"Callback endpoint that Google redirects to after user authentication. \nExchanges the authorization code for user information, creates or finds the user in the database, \nestablishes a session, and redirects back to the frontend.\n","operationId":"handleGoogleCallback","parameters":[{"description":"Authorization code provided by Google","in":"query","name":"code","required":true,"schema":{"example":"4/0AeanS0aRXqzQGLfI...","type":"string"}},{"description":"CSRF protection token","in":"query","name":"state","schema":{"example":"random-state-string","type":"string"}},{"description":"Error code from Google if authentication failed","in":"query","name":"error","schema":{"example":"access_denied","type":"string"}}],"responses":{"302":{"description":"Redirect to frontend (success or error)","headers":{"Location":{"description":"Frontend URL with session cookie set (success) or error page with error details (failure)","schema":{"example":"http://localhost:3000","format":"uri","type":"string"}},"Set-Cookie":{"description":"Session cookie (HttpOnly, SameSite=Lax) - only set on success","schema":{"example":"session_id=abc123; HttpOnly; SameSite=Lax; Path=/; Max-Age=604800","type":"string"}}}}},"summary":"Handle Google OAuth callback","tags":["authentication"]}},"/auth/password/forgot":{"post":{"description":"Requests a password reset email for the supplied address.\nThe response is intentionally identical whether or not the account exists.\n","operationId":"requestPasswordReset","requestBody":{"content":{"application/json":{"example":{"email":"john.doe@example.com"},"schema":{"$ref":"#/components/schemas/PasswordForgotRequest"}}},"required":true},"responses":{"204":{"description":"Password reset request accepted"},"400":{"description":"Invalid request body or validation error"}},"summary":"Request password reset","tags":["authentication"]}},"/auth/password/reset":{"post":{"description":"Resets a user's password using a single-use reset token.\nTokens expire after 24 hours.\n","operationId":"resetPassword","requestBody":{"content":{"application/json":{"example":{"password":"NewSecurePass123!","token":"reset-token-abc123"},"schema":{"$ref":"#/components/schemas/PasswordResetRequest"}}},"required":true},"responses":{"204":{"description":"Password successfully reset"},"400":{"description":"Invalid request, token, or expired token"}},"summary":"Reset password","tags":["authentication"]}},"/github-app-connection/callback":{"get":{"operationId":"completeOrganizationGitHubAppInstall","parameters":[{"in":"query","name":"state","required":true,"schema":{"maxLength":256,"minLength":32,"type":"string"}},{"in":"query","name":"code","required":true,"schema":{"maxLength":1024,"minLength":1,"type":"string"}},{"in":"query","name":"installation_id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubAppConnection"}}},"description":"Verified installation binding"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid or expired installation state"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"}},"summary":"Complete managed GitHub App installation","tags":["organizations"]}},"/member-invitations":{"get":{"description":"Lists pending invitations addressed to the authenticated user's verified email address.","operationId":"listMyMemberInvitations","parameters":[{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/MemberInvitationsFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberInvitationListResponse"}}},"description":"List of pending invitations"}},"summary":"List my pending member invitations","tags":["members"]}},"/member-invitations/accept":{"post":{"description":"Accepts a pending invitation after the authenticated user has proved control of the invited email address. Pending invitations are unique per organization/email; one verified email can accept multiple pending invitations across organizations, and each accepted membership uses the role captured on that invitation.","operationId":"acceptMemberInvitation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberInvitationAcceptanceTokenRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberInvitationAcceptance"}}},"description":"Invitation accepted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invitation not found or no longer pending"}},"summary":"Accept a member invitation","tags":["members"]}},"/member-invitations/decline":{"post":{"description":"Declines a pending invitation addressed to the authenticated user's verified email address without creating organization membership.","operationId":"declineMemberInvitation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberInvitationTokenRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberInvitation"}}},"description":"Invitation declined"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invitation not found or no longer pending"}},"summary":"Decline a member invitation","tags":["members"]}},"/member-invitations/{slug}/{invitation_slug}/accept":{"post":{"description":"Accepts a pending invitation from the authenticated user's invitation list without exposing invitation token material.","operationId":"acceptMyMemberInvitation","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/InvitationSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermsAcceptanceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberInvitationAcceptance"}}},"description":"Invitation accepted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invitation not found or no longer pending"}},"summary":"Accept one of my pending member invitations","tags":["members"]}},"/member-invitations/{slug}/{invitation_slug}/decline":{"post":{"description":"Declines a pending invitation from the authenticated user's invitation list without exposing invitation token material.","operationId":"declineMyMemberInvitation","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/InvitationSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberInvitation"}}},"description":"Invitation declined"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invitation not found or no longer pending"}},"summary":"Decline one of my pending member invitations","tags":["members"]}},"/organizations":{"get":{"description":"Lists all organizations the authenticated user is a member of.","operationId":"listOrganizations","parameters":[{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/OrganizationsFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"example":{"has_more":false,"next_cursor":null,"organizations":[{"created_at":"2025-10-04T10:30:00Z","entitlement":{"activated_at":null,"expires_at":null,"limits":{"data_sources":3,"deployed_pipelines":2,"members":3,"pipeline_runs":null,"projects":1},"plan_code":"free_trial","retention_ends_at":null,"status":"pending"},"member_role":"admin","name":"Acme Corp","slug":"acme-corp","updated_at":"2025-10-04T10:30:00Z"}],"prev_cursor":null},"schema":{"$ref":"#/components/schemas/OrganizationListResponse"}}},"description":"List of organizations"}},"summary":"List user's organizations","tags":["organizations"]},"post":{"description":"Creates a new organization. The authenticated user is added as an admin member.","operationId":"createOrganization","requestBody":{"content":{"application/json":{"example":{"name":"Acme Corp","slug":"acme-corp"},"schema":{"$ref":"#/components/schemas/NewOrganization"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"created_at":"2025-10-04T10:30:00Z","entitlement":{"activated_at":null,"expires_at":null,"limits":{"data_sources":3,"deployed_pipelines":2,"members":3,"pipeline_runs":null,"projects":1},"plan_code":"free_trial","retention_ends_at":null,"status":"pending"},"name":"Acme Corp","slug":"acme-corp","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/Organization"}}},"description":"Organization created"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization already exists"}},"summary":"Create an organization","tags":["organizations"]}},"/organizations/{slug}":{"delete":{"description":"Permanently removes the organization, its memberships and settings. Remove projects and data sources first. Unresolved processing blocks deletion. Pending Snowflake workload identity cleanup also blocks deletion; retry after cleanup completes. Minimal legal-acceptance evidence is retained independently.","operationId":"deleteOrganization","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"confirmation":{"description":"The exact organization slug.","type":"string"}},"required":["confirmation"],"type":"object"}}},"required":true},"responses":{"204":{"description":"Organization deleted"},"400":{"description":"Invalid confirmation"},"401":{"description":"Authentication required"},"403":{"description":"Forbidden"},"404":{"description":"Organization not found"},"409":{"description":"Remove projects and data sources, resolve outstanding processing, and wait for Snowflake workload identity cleanup before retrying"}},"summary":"Delete an organization","tags":["organizations"]},"get":{"description":"Returns the organization identified by its slug.","operationId":"getOrganization","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2025-10-04T10:30:00Z","entitlement":{"activated_at":null,"expires_at":null,"limits":{"data_sources":3,"deployed_pipelines":2,"members":3,"pipeline_runs":null,"projects":1},"plan_code":"free_trial","retention_ends_at":null,"status":"pending"},"name":"Acme Corp","slug":"acme-corp","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/Organization"}}},"description":"Organization details"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"}},"summary":"Get an organization","tags":["organizations"]},"put":{"description":"Updates the organization identified by its slug. Full replacement of mutable fields.","operationId":"updateOrganization","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"example":{"name":"Acme Corporation"},"schema":{"$ref":"#/components/schemas/UpdateOrganization"}}},"required":true},"responses":{"204":{"description":"Organization updated"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"}},"summary":"Update an organization","tags":["organizations"]}},"/organizations/{slug}/alert-delivery-attempts":{"get":{"description":"List recent tenant-scoped alert delivery attempt diagnostics for a bounded set of notification records. This endpoint is intended for notification-list diagnostics and returns safe delivery state and metadata only.","operationId":"listAlertDeliveryAttempts","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/NotificationSlugsParam"},{"$ref":"#/components/parameters/LimitPerNotificationParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDeliveryAttemptListResponse"}}},"description":"Recent alert delivery attempts for the requested notifications"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"}},"summary":"List alert delivery attempts","tags":["notifications"]}},"/organizations/{slug}/alert-destinations":{"get":{"description":"Lists tenant-scoped destinations that alert policies can target. Destination records expose only non-secret configuration.","operationId":"listAlertDestinations","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/AlertDestinationFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationListResponse"}}},"description":"Paginated list of alert destinations"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"}},"summary":"List alert destinations","tags":["notifications"]},"post":{"description":"Creates an alert destination from non-secret destination configuration.","operationId":"createAlertDestination","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"example":{"name":"Operations Email","non_secret_config":{"recipients":["ops@example.com"]},"slug":"ops-email","type":"email"},"schema":{"$ref":"#/components/schemas/NewAlertDestination"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestination"}}},"description":"Alert destination created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid alert destination request"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Alert destination slug already exists in organization"}},"summary":"Create an alert destination","tags":["notifications"]}},"/organizations/{slug}/alert-destinations/{alert_destination_slug}":{"delete":{"description":"Deletes an alert destination and removes policy bindings to it. Existing notification records remain unchanged.","operationId":"deleteAlertDestination","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/AlertDestinationSlugParam"}],"responses":{"204":{"description":"Alert destination deleted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or alert destination not found"}},"summary":"Delete an alert destination","tags":["notifications"]},"get":{"description":"Returns one tenant-scoped alert destination without secret material.","operationId":"getAlertDestination","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/AlertDestinationSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestination"}}},"description":"Alert destination details"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or alert destination not found"}},"summary":"Get an alert destination","tags":["notifications"]},"put":{"description":"Replaces mutable alert destination fields. Secret material remains outside this resource.","operationId":"updateAlertDestination","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/AlertDestinationSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAlertDestination"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestination"}}},"description":"Alert destination updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid alert destination update"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or alert destination not found"}},"summary":"Update an alert destination","tags":["notifications"]}},"/organizations/{slug}/alert-destinations/{alert_destination_slug}/test":{"post":{"description":"Enqueues a safe test notification through one enabled tenant-scoped alert destination. Test attempts are ephemeral and do not create notification records or alert delivery diagnostics.","operationId":"testAlertDestination","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/AlertDestinationSlugParam"}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationTestResponse"}}},"description":"Alert destination test accepted for delivery"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Alert destination is disabled or has invalid test configuration"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or alert destination not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Alert destination type does not support test delivery"}},"summary":"Test an alert destination","tags":["notifications"]}},"/organizations/{slug}/alert-policies":{"get":{"description":"Lists tenant-scoped alert policies that select notifications for delivery.","operationId":"listAlertPolicies","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/AlertPolicyFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertPolicyListResponse"}}},"description":"Paginated list of alert policies"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"}},"summary":"List alert policies","tags":["notifications"]},"post":{"description":"Creates a policy that selects notification records and binds delivery destinations.","operationId":"createAlertPolicy","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"example":{"destination_slugs":["ops-email"],"environment_slug":"production","lifecycle_state":"open","name":"Critical pipeline failures","notification_type":"pipeline.retry_exhausted","project_slug":"operations","scope":"project_environment","severity":"critical","slug":"pipeline-critical-email","source_kind":"pipeline_run","source_ref":"daily-ledger"},"schema":{"$ref":"#/components/schemas/NewAlertPolicy"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertPolicy"}}},"description":"Alert policy created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid alert policy request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, environment, or destination not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Alert policy slug already exists in organization"}},"summary":"Create an alert policy","tags":["notifications"]}},"/organizations/{slug}/alert-policies/{alert_policy_slug}":{"delete":{"description":"Deletes an alert policy. Notification records selected by previous policy evaluations remain durable records.","operationId":"deleteAlertPolicy","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/AlertPolicySlugParam"}],"responses":{"204":{"description":"Alert policy deleted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or alert policy not found"}},"summary":"Delete an alert policy","tags":["notifications"]},"get":{"description":"Returns one tenant-scoped alert policy and its destination bindings.","operationId":"getAlertPolicy","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/AlertPolicySlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertPolicy"}}},"description":"Alert policy details"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or alert policy not found"}},"summary":"Get an alert policy","tags":["notifications"]},"put":{"description":"Replaces mutable alert policy fields and destination bindings.","operationId":"updateAlertPolicy","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/AlertPolicySlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAlertPolicy"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertPolicy"}}},"description":"Alert policy updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid alert policy update"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, environment, destination, or alert policy not found"}},"summary":"Update an alert policy","tags":["notifications"]}},"/organizations/{slug}/alert-policy-source-metadata":{"get":{"description":"Lists API-discoverable event source entity/action metadata and scoped source-ref choices for alert policy selectors.","operationId":"listAlertPolicySourceMetadata","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"description":"Alert policy scope used to constrain source-ref choices.","in":"query","name":"scope","schema":{"$ref":"#/components/schemas/AlertPolicyScope"}},{"$ref":"#/components/parameters/ProjectSlugQueryParam"},{"$ref":"#/components/parameters/EnvironmentSlugQueryParam"},{"description":"Optional source entity kind filter.","in":"query","name":"source_kind","schema":{"$ref":"#/components/schemas/EventEntityType"}},{"description":"Optional source action filter.","in":"query","name":"source_action","schema":{"$ref":"#/components/schemas/EventAction"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertPolicySourceMetadataResponse"}}},"description":"Source selector metadata for alert policies"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"}},"summary":"List alert policy source metadata","tags":["notifications"]}},"/organizations/{slug}/api-keys":{"get":{"description":"Lists API keys for an organization. An API key principal must have management enabled and api_keys:read permission, and receives only keys with its own role. Raw tokens and token hashes are never returned.","operationId":"listAPIKeys","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/APIKeysFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyListResponse"}}},"description":"List of API keys"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The authenticated principal cannot list API keys"}},"summary":"List API keys","tags":["api-keys"]},"post":{"description":"Creates an organization-scoped API key and returns the raw token once. A management-enabled API key must also have api_keys:create permission and may assign only its own role. Bearer-created keys always have management disabled.","operationId":"createAPIKey","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"example":{"name":"Workflow automation","role":"viewer"},"schema":{"$ref":"#/components/schemas/NewAPIKey"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyWithToken"}}},"description":"API key created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The authenticated principal cannot manage API keys, attempted to delegate management capability, or selected a role exceeding its delegation boundary"}},"summary":"Create an API key","tags":["api-keys"]}},"/organizations/{slug}/api-keys/{api_key_slug}":{"delete":{"description":"Revokes the API key so its bearer token can no longer authenticate. A management-enabled API key may revoke only keys with its own role.","operationId":"deleteAPIKey","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/APIKeySlugParam"}],"responses":{"204":{"description":"API key revoked"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The authenticated principal cannot revoke this API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"API key not found"}},"summary":"Revoke an API key","tags":["api-keys"]},"get":{"description":"Returns safe API key metadata. A management-enabled API key may read only keys with its own role. Raw tokens and token hashes are never returned.","operationId":"getAPIKey","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/APIKeySlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}},"description":"API key details"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The authenticated principal cannot read this API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"API key not found"}},"summary":"Get an API key","tags":["api-keys"]},"put":{"description":"Updates API key metadata. The API key role is immutable; revoke and recreate a key to change privileges. A management-enabled API key may update only keys with its own role and may not enable or disable management capability.","operationId":"updateAPIKey","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/APIKeySlugParam"}],"requestBody":{"content":{"application/json":{"example":{"name":"Workflow automation"},"schema":{"$ref":"#/components/schemas/UpdateAPIKey"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}},"description":"API key updated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The authenticated principal cannot update this API key or attempted to change management capability"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"API key not found"}},"summary":"Update an API key","tags":["api-keys"]}},"/organizations/{slug}/api-keys/{api_key_slug}/delete":{"post":{"description":"Permanently deletes revoked API key metadata for an organization. This remains session-only. Active API keys must be revoked before deletion. Raw tokens and token hashes are never returned.","operationId":"deleteRevokedAPIKey","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/APIKeySlugParam"}],"responses":{"204":{"description":"Revoked API key metadata deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"API key must be revoked before deletion"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to delete API keys"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"API key not found"}},"summary":"Delete a revoked API key","tags":["api-keys"]}},"/organizations/{slug}/api-keys/{api_key_slug}/rotate":{"post":{"description":"Replaces the API key token hash and returns the new raw token once. The API key slug, role, metadata, and management capability remain unchanged. A management-enabled API key may rotate only keys with its own role. Revoked API keys cannot be rotated.","operationId":"rotateAPIKey","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/APIKeySlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyWithToken"}}},"description":"API key token rotated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The authenticated principal cannot rotate this API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"API key not found or revoked"}},"summary":"Rotate an API key token","tags":["api-keys"]}},"/organizations/{slug}/billing-profile":{"get":{"description":"Returns the organization's billing profile. Only session users with organization billing profile permission can access this resource.","operationId":"getOrganizationBillingProfile","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"responses":{"200":{"content":{"application/json":{"example":{"address":{"city":"Warsaw","line1":"1 Main Street","postal_code":"00-001"},"billing_email":"billing@acme.example","billing_name":"Acme Corp Sp. z o.o.","country":"PL","created_at":"2026-05-29T10:30:00Z","owner_slug":"acme-corp","owner_type":"organization","tax_id":"PL1234567890","updated_at":"2026-05-29T10:30:00Z"},"schema":{"$ref":"#/components/schemas/BillingProfile"}}},"description":"Organization billing profile"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or billing profile not found"}},"summary":"Get organization billing profile","tags":["billing"]},"put":{"description":"Reserved for a future agreed upgrade flow. The current no-card trial does not collect self-service billing details and returns 501 after organization authorization.","operationId":"upsertOrganizationBillingProfile","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"example":{"address":{"city":"Warsaw","line1":"1 Main Street","postal_code":"00-001"},"billing_email":"billing@acme.example","billing_name":"Acme Corp Sp. z o.o.","country":"PL","tax_id":"PL1234567890"},"schema":{"$ref":"#/components/schemas/UpsertBillingProfile"}}},"required":true},"responses":{"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Self-service billing is not implemented"}},"summary":"Upsert organization billing profile","tags":["billing"]}},"/organizations/{slug}/data-sources":{"get":{"description":"Lists all data sources in the organization.","operationId":"listDataSources","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/DataSourcesFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"example":{"data_sources":[{"config":{"database":"app_production","host":"db.example.com","port":5432},"created_at":"2025-10-04T10:30:00Z","is_active":true,"last_tested_at":"2025-10-04T10:30:00Z","name":"Production Database","slug":"prod-db","test_error":null,"type":"postgres","updated_at":"2025-10-04T10:30:00Z"},{"config":{"database":"analytics","host":"analytics.example.com","port":3306},"created_at":"2025-10-03T09:15:00Z","is_active":false,"last_tested_at":"2025-10-03T15:20:00Z","name":"Analytics Database","slug":"analytics-db","test_error":"Connection timeout","type":"mysql","updated_at":"2025-10-03T15:20:00Z"}],"has_more":false,"next_cursor":null,"prev_cursor":null},"schema":{"$ref":"#/components/schemas/DataSourceListResponse"}}},"description":"List of data sources"}},"summary":"List data sources","tags":["data-sources"]},"post":{"description":"Creates a new data source in the organization.","operationId":"createDataSource","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"example":{"config":{"connect_timeout":10,"database":"app_production","host":"db.example.com","port":5432},"credentials":{"password":"SecurePass123!","username":"app_user"},"name":"Production Database","slug":"prod-db","type":"postgres"},"schema":{"$ref":"#/components/schemas/CreateDataSourceRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"config":{"database":"app_production","host":"db.example.com","port":5432},"created_at":"2025-10-04T10:30:00Z","is_active":true,"last_tested_at":null,"name":"Production Database","slug":"prod-db","test_error":null,"type":"postgres","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/DataSource"}}},"description":"Data source created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (validation error, malformed JSON)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source already exists"}},"summary":"Create a data source","tags":["data-sources"]}},"/organizations/{slug}/data-sources/test-connection":{"post":{"description":"Tests connection using draft data source configuration and credentials without creating a data source.","operationId":"testDataSourceConnection","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"example":{"config":{"connect_timeout":10,"database":"app_production","host":"db.example.com","port":5432},"credentials":{"password":"SecurePass123!","username":"app_user"},"type":"postgres"},"schema":{"$ref":"#/components/schemas/TestDataSourceConnectionRequest"}}},"required":true},"responses":{"204":{"description":"Connection test successful"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (validation error, malformed JSON)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Connection test failed"}},"summary":"Test data source connection","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}":{"delete":{"description":"Soft-deletes a data source from the organization. Normal list, get, update, credential, schema, query, and execution paths treat deleted data sources as not found or unavailable until restored.","operationId":"deleteDataSource","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"204":{"description":"Data source deleted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"}},"summary":"Delete a data source","tags":["data-sources"]},"get":{"description":"Retrieves a data source by slug.","operationId":"getDataSource","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"200":{"content":{"application/json":{"example":{"config":{"database":"app_production","host":"db.example.com","port":5432},"created_at":"2025-10-04T10:30:00Z","is_active":true,"last_tested_at":"2025-10-04T10:30:00Z","name":"Production Database","slug":"prod-db","test_error":null,"type":"postgres","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/DataSource"}}},"description":"Data source details"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"}},"summary":"Get a data source","tags":["data-sources"]},"patch":{"description":"Partially updates mutable data source fields.","operationId":"updateDataSource","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"requestBody":{"content":{"application/json":{"example":{"config":{"connect_timeout":15,"database":"app_production","host":"db.example.com","port":5432},"name":"Production Database (Updated)"},"schema":{"$ref":"#/components/schemas/UpdateDataSourceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"config":{"database":"app_production","host":"db.example.com","port":5432},"created_at":"2025-10-04T10:30:00Z","is_active":true,"last_tested_at":"2025-10-04T10:30:00Z","name":"Production Database (Updated)","slug":"prod-db","test_error":null,"type":"postgres","updated_at":"2025-10-04T11:00:00Z"},"schema":{"$ref":"#/components/schemas/DataSource"}}},"description":"Data source updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (validation error)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"}},"summary":"Update a data source","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/branches":{"get":{"description":"Lists remote branches for a git-compatible data source. Only git, GitHub, and GitLab data sources support this endpoint.","operationId":"listDataSourceBranches","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"200":{"content":{"application/json":{"example":{"branches":[{"is_default":true,"name":"main"},{"is_default":false,"name":"release"}]},"schema":{"$ref":"#/components/schemas/DataSourceBranchListResponse"}}},"description":"Git branches listed successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input or unsupported data source type"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Branch listing failed because the remote repository could not be reached"}},"summary":"List data source branches","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/credentials":{"patch":{"description":"Updates credentials for an existing data source and re-tests the connection.","operationId":"updateDataSourceCredentials","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"requestBody":{"content":{"application/json":{"example":{"credentials":{"password":"NewSecurePass456!","username":"app_user"}},"schema":{"$ref":"#/components/schemas/UpdateDataSourceCredentialsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"config":{"database":"app_production","host":"db.example.com","port":5432},"created_at":"2025-10-04T10:30:00Z","is_active":true,"last_tested_at":"2025-10-04T10:30:00Z","name":"Production Database","slug":"prod-db","test_error":null,"type":"postgres","updated_at":"2025-10-04T11:00:00Z"},"schema":{"$ref":"#/components/schemas/DataSource"}}},"description":"Data source credentials updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (validation error)"},"403":{"content":{"application/json":{"example":{"error_code":"connection_failed","message":"Failed to connect to data source with new credentials: authentication failed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Credentials test failed (unable to connect with new credentials)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"}},"summary":"Update data source credentials","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/gitlab-connection":{"post":{"description":"Replaces this source's authorization owner without changing its identity, selected repository, or read-only restriction.","operationId":"attachDataSourceOrganizationGitLabConnection","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"204":{"description":"Data source attached"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request or stale repository/target configuration"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required organization or data-source permissions missing"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, source, or connection not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Configuration changed concurrently; reload and retry"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request failed"}},"summary":"Explicitly attach an existing GitLab source to its organization's shared connection","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/google-workspace/files":{"get":{"description":"One bounded page of authorized file metadata, including My Drive and shared drives. No file contents or credentials are returned.","operationId":"listGoogleWorkspaceFiles","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"in":"query","name":"folder_id","schema":{"maxLength":256,"type":"string"}},{"in":"query","name":"drive_id","schema":{"maxLength":256,"type":"string"}},{"in":"query","name":"mime_type","schema":{"maxLength":256,"type":"string"}},{"in":"query","name":"page_token","schema":{"maxLength":2048,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceFileDiscovery"}}},"description":"One page of files"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input or data source type"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Missing data source permission"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Google Workspace provider or discovery is unavailable"}},"summary":"Discover grant-accessible Google files","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/google-workspace/files/verify":{"post":{"description":"Verify file access with the connected account grant and expected source revision without changing the source target.","operationId":"verifyGoogleWorkspaceFiles","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceVerificationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceFileDiscovery"}}},"description":"Verified file metadata"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid selection"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission or Google account mismatch"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Source revision changed; reload before selecting"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workspace or provider verification unavailable"}},"summary":"Verify Google file access","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/google-workspace/files/{file_id}":{"get":{"operationId":"getGoogleWorkspaceFile","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"in":"path","name":"file_id","required":true,"schema":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceFile"}}},"description":"Target metadata"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Target not accessible"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Provider unavailable"}},"summary":"Read target metadata without contents","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/google-workspace/picker":{"get":{"description":"Public browser configuration and connected account hint for an active selected-file source. Requires data-source update permission. No backend credentials are returned.","operationId":"getGoogleWorkspacePicker","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspacePicker"}}},"description":"Picker configuration"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Reconnect with selected-file access"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workspace Picker unavailable"}},"summary":"Get Google Picker configuration","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/google-workspace/spreadsheets/{file_id}/worksheets":{"get":{"operationId":"getGoogleWorkspaceWorksheets","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"in":"path","name":"file_id","required":true,"schema":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceSchemaResponse"}}},"description":"Target metadata"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Target not accessible"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Provider unavailable"}},"summary":"Read target metadata without contents","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/proof":{"get":{"operationId":"getDataSourceProofConfiguration","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceProofConfiguration"}}},"description":"Current settings and actionable eligibility status"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request or stale repository/target configuration"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required organization or data-source permissions missing"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, source, or connection not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request failed"}},"summary":"Get a data source's Proof settings and available assessment targets","tags":["proof"]},"parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"put":{"description":"Uses the selected data source's verified repository and provider connection.\nEnabling requires explicit project, environment, ref and pipeline paths.\nDisabling preserves targets and immutable history without disabling Git operations.\nCheck publication is separate from assessment and environment observation policy.\n","operationId":"setDataSourceProofConfiguration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceProofSettings"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceProofConfiguration"}}},"description":"Saved settings"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request or stale repository/target configuration"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required organization or data-source permissions missing"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, source, or connection not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Configuration changed concurrently; reload and retry"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request failed"}},"summary":"Configure optional Proof assessments for a managed Git data source","tags":["proof"]}},"/organizations/{slug}/data-sources/{ds_slug}/provider-grant/refresh":{"post":{"description":"Forces an OAuth2 provider grant refresh and returns safe credential metadata only.","operationId":"refreshDataSourceProviderGrant","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialMetadata"}}},"description":"Provider grant refreshed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source does not use an OAuth2 provider grant or refresh failed with a safe validation error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to refresh this provider grant"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source or credential not found"}},"summary":"Refresh data source provider grant","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/provider-grant/revoke":{"post":{"description":"Revokes an OAuth2 provider grant, clears runtime usability, and returns safe credential metadata only.","operationId":"revokeDataSourceProviderGrant","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialMetadata"}}},"description":"Provider grant revoked"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source does not use an OAuth2 provider grant"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to revoke this provider grant"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source or credential not found"}},"summary":"Revoke data source provider grant","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/provider-grant/rotate":{"post":{"description":"Starts a new OAuth2 install for the existing data source. The current grant remains active until the callback succeeds or the user revokes it.","operationId":"rotateDataSourceProviderGrant","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"description":"Workspace file access mode. Defaults to selected_files. Other providers reject this parameter.","in":"query","name":"access_mode","schema":{"$ref":"#/components/schemas/GoogleWorkspaceAccessMode"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectorInstall"}}},"description":"Provider grant rotation started"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source does not use an OAuth2 provider grant or rotation cannot be started"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to rotate this provider grant"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source or credential not found"}},"summary":"Rotate data source provider grant","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/provider-repositories":{"get":{"description":"Lists safe repository metadata visible through the data source's active provider authorization. Credential values and native Git clone URLs are never returned.","operationId":"listDataSourceProviderRepositories","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderRepositoryListResponse"}}},"description":"Provider repositories listed successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unsupported data source or unavailable provider authorization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"}},"summary":"List repositories available to a provider-backed data source","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/provider-repository":{"put":{"description":"Verifies the stable repository identity through the active provider authorization, stores only safe repository metadata, derives the native Git endpoint internally, and tests the resulting connection.","operationId":"selectDataSourceProviderRepository","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectProviderRepositoryRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSource"}}},"description":"Provider repository selected and connection tested"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid or inaccessible repository selection"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source or repository not found"}},"summary":"Bind one verified provider repository to a data source","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/queries":{"get":{"description":"List all queries for a data source in the organization","operationId":"listQueries","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/QueryFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"},{"description":"Include soft-deleted queries in the result set. Requires query restore permission.","in":"query","name":"include_deleted","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryListResponse"}}},"description":"List of queries"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"}},"summary":"List queries","tags":["queries"]},"post":{"description":"Create a new query for the data source","operationId":"createQuery","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"requestBody":{"content":{"application/json":{"examples":{"MongoDBQuery":{"summary":"MongoDB query example","value":{"description":"Find users with status active","name":"Find Active Users","parameters":[{"data_type":"text","default_value":"active","is_required":true,"name":"user_status","slug":"user-status"},{"data_type":"text","default_value":"2026-01-01","is_required":false,"name":"min_date","slug":"min-date"}],"query_statement":{"collection":"users","filter":{"created_at":{"$gte":"{{min_date}}"},"status":"{{user_status}}"},"limit_value":100,"operation":"find","projection":{"_id":1,"created_at":1,"email":1},"sort":{"created_at":-1},"type":"mongodb"},"row_limit":1000,"slug":"find-active-users","timeout_seconds":30}},"PostgreSQLQuery":{"summary":"PostgreSQL query example","value":{"description":"Fetch all users who logged in within the last 30 days","name":"Get Active Users","parameters":[{"data_type":"date","default_value":"2026-01-24","is_required":true,"name":"min_login_date","slug":"min-login-date"},{"data_type":"boolean","default_value":"true","is_required":true,"name":"is_active","slug":"is-active"},{"data_type":"integer","default_value":"100","is_required":false,"name":"limit","slug":"limit"}],"query_statement":{"sql":"SELECT id, email, last_login_at FROM users WHERE last_login_at \u003e {{min_login_date}} AND is_active = {{is_active}} LIMIT {{limit}}","type":"postgres"},"row_limit":1000,"slug":"get-active-users","timeout_seconds":30}}},"schema":{"$ref":"#/components/schemas/NewQuery"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Query"}}},"description":"Query created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request (validation error)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or data source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Query already exists"}},"summary":"Create a query","tags":["queries"]}},"/organizations/{slug}/data-sources/{ds_slug}/queries/{query_slug}":{"delete":{"description":"Soft-deletes a query. Normal query list, get, update, and execute paths treat deleted queries as not found.","operationId":"deleteQuery","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"$ref":"#/components/parameters/QuerySlugParam"}],"responses":{"204":{"description":"Query deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Query not found"}},"summary":"Delete a query","tags":["queries"]},"get":{"description":"Retrieve details of a specific query including parameter definitions","operationId":"getQuery","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"$ref":"#/components/parameters/QuerySlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Query"}}},"description":"Query details"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Query or organization not found"}},"summary":"Get a query","tags":["queries"]},"put":{"description":"Update an existing query (full replacement)","operationId":"updateQuery","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"$ref":"#/components/parameters/QuerySlugParam"}],"requestBody":{"content":{"application/json":{"example":{"description":"Updated description","name":"Get Recent Active Users","query_statement":"SELECT id, email, last_login_at FROM users WHERE last_login_at \u003e NOW() - INTERVAL '7 days' LIMIT $1","row_limit":500,"timeout_seconds":15},"schema":{"$ref":"#/components/schemas/UpdateQuery"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Query"}}},"description":"Query updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Query not found"}},"summary":"Update a query","tags":["queries"]}},"/organizations/{slug}/data-sources/{ds_slug}/queries/{query_slug}/execute":{"post":{"description":"Execute a query with provided parameters and return results","operationId":"executeQuery","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"$ref":"#/components/parameters/QuerySlugParam"}],"requestBody":{"content":{"application/json":{"example":{"parameters":{"is_active":true,"limit":50}},"schema":{"$ref":"#/components/schemas/ExecuteQueryRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"duration_ms":245,"row_count":2,"rows":[{"email":"user1@example.com","id":1,"last_login_at":"2026-02-15T10:30:00Z"},{"email":"user2@example.com","id":2,"last_login_at":"2026-02-18T14:25:00Z"}],"status":"success"},"schema":{"$ref":"#/components/schemas/QueryExecutionResult"}}},"description":"Query executed successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request (parameter validation failed)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Query not found"},"408":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Query execution timeout"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Query execution failed (database error, connection error, etc.)"}},"summary":"Execute a query","tags":["queries"]}},"/organizations/{slug}/data-sources/{ds_slug}/queries/{query_slug}/executions":{"get":{"description":"List execution history for a specific query","operationId":"listQueryExecutions","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"$ref":"#/components/parameters/QuerySlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/QueryExecutionFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryExecutionListResponse"}}},"description":"List of query executions"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Query or organization not found"}},"summary":"List query executions","tags":["queries"]}},"/organizations/{slug}/data-sources/{ds_slug}/queries/{query_slug}/executions/{execution_slug}":{"get":{"description":"Retrieve details of a specific query execution","operationId":"getQueryExecution","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"$ref":"#/components/parameters/QuerySlugParam"},{"$ref":"#/components/parameters/QueryExecutionSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryExecutionRecord"}}},"description":"Query execution details"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Query execution, query, or organization not found"}},"summary":"Get query execution","tags":["queries"]}},"/organizations/{slug}/data-sources/{ds_slug}/queries/{query_slug}/purge":{"delete":{"description":"Permanently deletes a soft-deleted query and its execution history. Active queries must be soft-deleted before purge.","operationId":"purgeQuery","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"$ref":"#/components/parameters/QuerySlugParam"}],"responses":{"204":{"description":"Query purged successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Query not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Query must be soft-deleted before purge"}},"summary":"Permanently purge a deleted query","tags":["queries"]}},"/organizations/{slug}/data-sources/{ds_slug}/queries/{query_slug}/restore":{"post":{"description":"Restores a previously soft-deleted query and preserves its execution history.","operationId":"restoreQuery","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"$ref":"#/components/parameters/QuerySlugParam"}],"responses":{"204":{"description":"Query restored successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Query not found"}},"summary":"Restore a query","tags":["queries"]}},"/organizations/{slug}/data-sources/{ds_slug}/restore":{"post":{"description":"Restores a soft-deleted data source. Retained schema metadata, queries, and query executions become visible again through normal paths unless they have their own tombstone.","operationId":"restoreDataSource","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"204":{"description":"Data source restored successfully"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"}},"summary":"Restore a data source","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/schema":{"get":{"description":"Returns cached schema metadata without contacting the provider. When no cache has been imported yet, the response is the connector-appropriate empty schema shape. Use POST on this endpoint to perform a live refresh/import.","operationId":"introspectDataSourceSchema","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"200":{"content":{"application/json":{"examples":{"DocumentSchema":{"summary":"Document database schema with collections (MongoDB, etc.)","value":{"collections":[{"fields":[{"name":"_id","type":"objectid"},{"name":"email","type":"string"},{"name":"created_at","type":"date"}],"name":"users"}],"schema_type":"document","type":"mongodb"}},"HTTPSchema":{"summary":"HTTP/OpenAPI schema with operations","value":{"operations":[{"description":"List all users","id":"listUsers","method":"GET","path":"/users"},{"description":"Create a new user","id":"createUser","method":"POST","path":"/users"}],"schema_type":"http"}},"SQLSchema":{"summary":"SQL schema (PostgreSQL, MySQL, BigQuery, SQLite) with tables and columns","value":{"schema_type":"sql","tables":[{"columns":[{"name":"id","type":"integer"},{"name":"email","type":"varchar"},{"name":"created_at","type":"timestamp"}],"name":"users"},{"columns":[{"name":"id","type":"integer"},{"name":"user_id","type":"integer"},{"name":"total","type":"numeric"}],"name":"orders"}],"type":"postgres"}}},"schema":{"$ref":"#/components/schemas/IntrospectSchemaResponse"}}},"description":"Cached schema returned, or an empty connector schema when no cache exists yet"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request (validation error)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Cached schema could not be decoded"}},"summary":"Get cached data source schema","tags":["data-sources"]},"post":{"description":"Queues live connector schema refresh/import work. Reads remain cache-only; the worker updates cached schema metadata and import state after provider work completes. Duplicate requests while an import is already running return the existing importing state without enqueueing another job.","operationId":"refreshDataSourceSchema","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceSchemaImportResponse"}}},"description":"Schema import accepted or already in progress"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"}},"summary":"Refresh data source schema","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/snowflake-onboarding":{"get":{"description":"Returns public identity claims, lifecycle state, and a deterministic SQL script for the customer administrator to review and run. Braidplane never executes this script. Verify using the stored connection test; disable using is_active false on the data source.","operationId":"getSnowflakeOnboarding","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnowflakeOnboarding"}}},"description":"Snowflake onboarding instructions"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Connection lacks valid onboarding settings or selected objects"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found or customer workload identity is not enabled for this connection"}},"summary":"Get Snowflake workload identity onboarding","tags":["data-sources"]}},"/organizations/{slug}/data-sources/{ds_slug}/test-connection":{"post":{"description":"Tests the persisted data source connection using stored configuration and encrypted credentials.","operationId":"testStoredDataSourceConnection","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"}],"responses":{"204":{"description":"Connection test successful"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Connection test failed"}},"summary":"Test stored data source connection","tags":["data-sources"]}},"/organizations/{slug}/environments":{"get":{"description":"Lists runtime environment catalog entries in the organization. Deleted entries are excluded unless requested.","operationId":"listEnvironments","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/EnvironmentsFieldParam"},{"description":"Include deleted environments in the catalog list.","in":"query","name":"include_deleted","schema":{"default":false,"type":"boolean"}},{"description":"Sort order (asc for ascending, desc for descending)","in":"query","name":"order","schema":{"default":"desc","enum":["asc","desc"],"example":"desc","type":"string","x-enum-varnames":["ListEnvironmentsParamsOrderAsc","ListEnvironmentsParamsOrderDesc"]}},{"description":"Page direction (next for forward navigation, prev for backward navigation)","in":"query","name":"direction","schema":{"default":"next","enum":["next","prev"],"example":"next","type":"string","x-enum-varnames":["ListEnvironmentsParamsDirectionNext","ListEnvironmentsParamsDirectionPrev"]}}],"responses":{"200":{"content":{"application/json":{"example":{"environments":[{"created_at":"2026-05-25T10:30:00Z","delete_reason":null,"deleted_at":null,"description":"Protected production runtime target","name":"Production","slug":"prod","updated_at":"2026-05-25T10:30:00Z"}],"has_more":false,"next_cursor":null,"prev_cursor":null},"schema":{"$ref":"#/components/schemas/EnvironmentListResponse"}}},"description":"List of environments"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"}},"summary":"List environments","tags":["environments"]},"post":{"description":"Creates an organization-scoped runtime environment catalog entry. Environment slugs are unique within the organization.","operationId":"createEnvironment","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"example":{"description":"Protected production runtime target","name":"Production","slug":"prod"},"schema":{"$ref":"#/components/schemas/NewEnvironment"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"Environment created"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Environment slug already exists in organization"}},"summary":"Create an environment","tags":["environments"]}},"/organizations/{slug}/environments/{environment_slug}":{"delete":{"description":"Soft-deletes an environment catalog entry so it can no longer be newly enabled for projects.","operationId":"deleteEnvironment","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/ProtectedEnvironmentConfirmationParam"},{"description":"Optional operator-supplied reason for deleting the environment.","in":"query","name":"delete_reason","schema":{"maxLength":2000,"type":"string"}}],"responses":{"204":{"description":"Environment deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid delete request or protected environment confirmation"},"404":{"description":"Organization or environment not found"}},"summary":"Delete an environment","tags":["environments"]},"get":{"description":"Returns an organization-scoped runtime environment catalog entry.","operationId":"getEnvironment","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"Environment details"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or environment not found"}},"summary":"Get an environment","tags":["environments"]},"put":{"description":"Updates mutable environment catalog metadata. Full replacement of mutable fields.","operationId":"updateEnvironment","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"}],"requestBody":{"content":{"application/json":{"example":{"description":"Protected production runtime target","name":"Production"},"schema":{"$ref":"#/components/schemas/UpdateEnvironment"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"Environment updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid update request or protected environment confirmation"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or environment not found"}},"summary":"Update an environment","tags":["environments"]}},"/organizations/{slug}/environments/{environment_slug}/runtime-variables":{"get":{"description":"Lists non-secret product-managed runtime variables for one organization runtime environment.","operationId":"listEnvironmentRuntimeVariables","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"description":"Sort order (asc for ascending, desc for descending)","in":"query","name":"order","schema":{"default":"desc","enum":["asc","desc"],"example":"desc","type":"string","x-enum-varnames":["ListEnvironmentRuntimeVariablesParamsOrderAsc","ListEnvironmentRuntimeVariablesParamsOrderDesc"]}},{"description":"Page direction (next for forward navigation, prev for backward navigation)","in":"query","name":"direction","schema":{"default":"next","enum":["next","prev"],"example":"next","type":"string","x-enum-varnames":["ListEnvironmentRuntimeVariablesParamsDirectionNext","ListEnvironmentRuntimeVariablesParamsDirectionPrev"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeVariableListResponse"}}},"description":"List of runtime variables"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or environment not found"}},"summary":"List environment runtime variables","tags":["environments"]}},"/organizations/{slug}/environments/{environment_slug}/runtime-variables/{runtime_variable_key}":{"delete":{"description":"Removes one runtime variable from an organization runtime environment.","operationId":"deleteEnvironmentRuntimeVariable","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/RuntimeVariableKeyParam"},{"$ref":"#/components/parameters/ProtectedEnvironmentConfirmationParam"}],"responses":{"204":{"description":"Runtime variable deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid delete request or protected environment confirmation"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, environment, or runtime variable not found"}},"summary":"Delete an environment runtime variable","tags":["environments"]},"get":{"description":"Returns one non-secret runtime variable for an organization runtime environment.","operationId":"getEnvironmentRuntimeVariable","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/RuntimeVariableKeyParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeVariable"}}},"description":"Runtime variable details"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, environment, or runtime variable not found"}},"summary":"Get an environment runtime variable","tags":["environments"]},"put":{"description":"Creates or replaces one non-secret runtime variable for an organization runtime environment.","operationId":"upsertEnvironmentRuntimeVariable","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/RuntimeVariableKeyParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertRuntimeVariable"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeVariable"}}},"description":"Runtime variable upserted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid runtime variable key, type, value, or protected confirmation"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or environment not found"}},"summary":"Upsert an environment runtime variable","tags":["environments"]}},"/organizations/{slug}/environments/{environment_slug}/secrets":{"get":{"description":"Lists safe metadata for write-only environment secrets. Plaintext secret values are never returned.","operationId":"listEnvironmentSecrets","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"description":"Sort order (asc for ascending, desc for descending)","in":"query","name":"order","schema":{"default":"desc","enum":["asc","desc"],"example":"desc","type":"string","x-enum-varnames":["ListEnvironmentSecretsParamsOrderAsc","ListEnvironmentSecretsParamsOrderDesc"]}},{"description":"Page direction (next for forward navigation, prev for backward navigation)","in":"query","name":"direction","schema":{"default":"next","enum":["next","prev"],"example":"next","type":"string","x-enum-varnames":["ListEnvironmentSecretsParamsDirectionNext","ListEnvironmentSecretsParamsDirectionPrev"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentSecretListResponse"}}},"description":"List of environment secret metadata"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or environment not found"}},"summary":"List environment secrets","tags":["environments"]}},"/organizations/{slug}/environments/{environment_slug}/secrets/{environment_secret_key}":{"delete":{"description":"Removes one environment secret metadata row and revokes its encrypted credential payload.","operationId":"deleteEnvironmentSecret","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/EnvironmentSecretKeyParam"},{"$ref":"#/components/parameters/ProtectedEnvironmentConfirmationParam"}],"responses":{"204":{"description":"Environment secret deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid delete request or protected environment confirmation"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, environment, or environment secret not found"}},"summary":"Delete an environment secret","tags":["environments"]},"get":{"description":"Returns safe metadata for one write-only environment secret. Plaintext secret values are never returned.","operationId":"getEnvironmentSecret","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/EnvironmentSecretKeyParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentSecret"}}},"description":"Environment secret metadata"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, environment, or environment secret not found"}},"summary":"Get environment secret metadata","tags":["environments"]},"put":{"description":"Creates or replaces one write-only environment secret. The submitted plaintext value is encrypted through the shared credential lifecycle and is not returned.","operationId":"upsertEnvironmentSecret","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/EnvironmentSecretKeyParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertEnvironmentSecret"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentSecret"}}},"description":"Environment secret upserted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid environment secret key, value, or protected confirmation"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or environment not found"}},"summary":"Upsert an environment secret","tags":["environments"]}},"/organizations/{slug}/events":{"get":{"description":"List tenant-scoped durable event records with optional actor, entity, and action filters","operationId":"listEvents","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/EventFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"},{"description":"Filter by actor type","in":"query","name":"actor_type","schema":{"$ref":"#/components/schemas/EventActorType"}},{"description":"Filter by actor slug","in":"query","name":"actor_slug","schema":{"$ref":"#/components/schemas/Slug"}},{"description":"Filter by affected entity type","in":"query","name":"entity_type","schema":{"$ref":"#/components/schemas/EventEntityType"}},{"description":"Filter by affected entity slug","in":"query","name":"entity_slug","schema":{"$ref":"#/components/schemas/Slug"}},{"description":"Filter by event action","in":"query","name":"action","schema":{"$ref":"#/components/schemas/EventAction"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventListResponse"}}},"description":"Paginated list of durable event records"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"}},"summary":"List organization events","tags":["events"]}},"/organizations/{slug}/github-app-connection":{"delete":{"operationId":"disconnectOrganizationGitHubAppConnection","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"responses":{"204":{"description":"Connection revoked in Braidplane"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"}},"summary":"Disconnect the managed GitHub App installation","tags":["organizations"]},"get":{"operationId":"getOrganizationGitHubAppConnection","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubAppConnection"}}},"description":"Verified installation binding"},"204":{"description":"No GitHub App installation is bound"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"}},"summary":"Get the managed GitHub App connection","tags":["organizations"]}},"/organizations/{slug}/github-app-connection/install":{"post":{"operationId":"startOrganizationGitHubAppInstall","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubAppInstallStart"}}},"description":"GitHub-hosted installation URL"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"}},"summary":"Start managed GitHub App installation","tags":["organizations"]}},"/organizations/{slug}/gitlab-connection":{"delete":{"operationId":"disconnectOrganizationGitLabConnection","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialMetadata"}}},"description":"Revoked connection metadata"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization management permission required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or connection not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request failed"}},"summary":"Revoke the shared GitLab connection for all attached data sources","tags":["data-sources"]},"get":{"operationId":"getOrganizationGitLabConnection","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialMetadata"}}},"description":"Organization GitLab connection"},"204":{"description":"No connection has been configured"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request or stale repository/target configuration"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required organization or data-source permissions missing"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, source, or connection not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request failed"}},"summary":"Read the shared GitLab connection's safe credential metadata","tags":["data-sources"]},"parameters":[{"$ref":"#/components/parameters/SlugParam"}]},"/organizations/{slug}/gitlab-connection/authorization":{"post":{"operationId":"startOrganizationGitLabAuthorization","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"include_write_scopes":{"description":"Explicitly authorize Git writes; data-source read-only restrictions still apply.","type":"boolean"}},"required":["include_write_scopes"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectorInstall"}}},"description":"Single-use authorization flow"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request or stale repository/target configuration"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required organization or data-source permissions missing"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, source, or connection not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Configuration changed concurrently; reload and retry"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request failed"}},"summary":"Authorize or replace the shared organization GitLab OAuth connection","tags":["data-sources"]}},"/organizations/{slug}/gitlab-connection/repositories":{"get":{"operationId":"listOrganizationGitLabRepositories","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderRepositoryListResponse"}}},"description":"Verified provider repository inventory"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request or stale repository/target configuration"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required organization or data-source permissions missing"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, source, or connection not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request failed"}},"summary":"List repositories accessible to the shared organization GitLab connection","tags":["data-sources"]}},"/organizations/{slug}/member-invitations":{"get":{"description":"Lists pending and historical member invitations for the organization. Pending invitations are separate from active members.","operationId":"listMemberInvitations","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/MemberInvitationsFieldParam"},{"$ref":"#/components/parameters/MemberInvitationStatusParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberInvitationListResponse"}}},"description":"List of member invitations"}},"summary":"List organization member invitations","tags":["members"]},"post":{"description":"Creates a pending organization member invitation by email address. The returned invitation does not include the raw acceptance token.","operationId":"createMemberInvitation","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"example":{"email":"jane.doe@example.com","role":"viewer"},"schema":{"$ref":"#/components/schemas/NewMemberInvitation"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberInvitation"}}},"description":"Invitation created"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Email is already a member or already has a pending invitation"}},"summary":"Invite a member to an organization","tags":["members"]}},"/organizations/{slug}/member-invitations/{invitation_slug}":{"get":{"description":"Returns one organization member invitation without exposing its raw acceptance token.","operationId":"getMemberInvitation","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/InvitationSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberInvitation"}}},"description":"Invitation details"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invitation not found"}},"summary":"Get a member invitation","tags":["members"]}},"/organizations/{slug}/member-invitations/{invitation_slug}/resend":{"post":{"description":"Rotates the invitation acceptance token and queues another invitation email. Old links must not grant membership.","operationId":"resendMemberInvitation","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/InvitationSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberInvitation"}}},"description":"Invitation resent"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invitation not found"}},"summary":"Resend a member invitation","tags":["members"]}},"/organizations/{slug}/member-invitations/{invitation_slug}/revoke":{"post":{"description":"Revokes a pending invitation so its acceptance link can no longer grant membership.","operationId":"revokeMemberInvitation","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/InvitationSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberInvitation"}}},"description":"Invitation revoked"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invitation not found"}},"summary":"Revoke a member invitation","tags":["members"]}},"/organizations/{slug}/members":{"get":{"description":"Lists active organization members. Pending invitations are listed separately through the member invitation endpoints.","operationId":"listMembers","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/MembersFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"example":{"has_more":false,"members":[{"created_at":"2025-10-04T10:30:00Z","email":"john.doe@example.com","role":"admin","updated_at":"2025-10-04T10:30:00Z","user_slug":"johndoe"}],"next_cursor":null,"prev_cursor":null},"schema":{"$ref":"#/components/schemas/MemberListResponse"}}},"description":"List of members"}},"summary":"List organization members","tags":["members"]},"post":{"description":"Directly adds an existing user by slug. Use the member invitation endpoints to invite teammates by email.","operationId":"createMember","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"example":{"role":"viewer","user_slug":"johndoe"},"schema":{"$ref":"#/components/schemas/NewMember"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"created_at":"2025-10-04T10:30:00Z","email":"john.doe@example.com","role":"viewer","updated_at":"2025-10-04T10:30:00Z","user_slug":"johndoe"},"schema":{"$ref":"#/components/schemas/Member"}}},"description":"Member added"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"User is already a member"}},"summary":"Add an existing user directly to an organization","tags":["members"]}},"/organizations/{slug}/members/{user_slug}":{"delete":{"description":"Removes a user from the organization.","operationId":"removeMember","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/UserSlugParam"}],"responses":{"204":{"description":"Member removed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Member not found"}},"summary":"Remove a member","tags":["members"]},"put":{"description":"Updates a member's role in the organization. Full replacement.","operationId":"updateMember","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/UserSlugParam"}],"requestBody":{"content":{"application/json":{"example":{"role":"admin"},"schema":{"$ref":"#/components/schemas/UpdateMember"}}},"required":true},"responses":{"204":{"description":"Member updated"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Member not found"}},"summary":"Update a member","tags":["members"]}},"/organizations/{slug}/notifications":{"get":{"description":"List tenant-scoped generic notification records for operator review. Resolved notifications are excluded unless a resolved lifecycle filter is requested.","operationId":"listNotifications","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/NotificationFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"},{"description":"Filter by notification lifecycle state. Omit to list active unresolved notifications.","in":"query","name":"lifecycle_state","schema":{"$ref":"#/components/schemas/NotificationLifecycleState"}},{"description":"Filter by notification type","in":"query","name":"notification_type","schema":{"$ref":"#/components/schemas/NotificationType"}},{"description":"Filter by notification severity","in":"query","name":"severity","schema":{"$ref":"#/components/schemas/NotificationSeverity"}},{"description":"Filter by notification source entity type.","in":"query","name":"source_kind","schema":{"$ref":"#/components/schemas/AlertPolicySourceKind"}},{"description":"Filter by notification source action. Requires source_kind when provided.","in":"query","name":"source_action","schema":{"$ref":"#/components/schemas/AlertPolicySourceAction"}},{"description":"Filter by generic source ref or pipeline slug source ref.","in":"query","name":"source_ref","schema":{"$ref":"#/components/schemas/AlertPolicySourceRef"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationListResponse"}}},"description":"Paginated list of generic notification records"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"}},"summary":"List organization notifications","tags":["notifications"]}},"/organizations/{slug}/notifications/{notification_slug}":{"get":{"description":"Retrieve one tenant-scoped generic notification record by slug.","operationId":"getNotification","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/NotificationSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRecord"}}},"description":"Generic notification record"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to read notifications"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or notification not found"}},"summary":"Get an organization notification","tags":["notifications"]}},"/organizations/{slug}/notifications/{notification_slug}/acknowledge":{"post":{"description":"Mark one tenant-scoped notification record as operator-acknowledged while keeping it active until producer or operator resolution.","operationId":"acknowledgeNotification","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/NotificationSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRecord"}}},"description":"Acknowledged notification record"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to update notifications"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or notification not found"}},"summary":"Acknowledge an organization notification","tags":["notifications"]}},"/organizations/{slug}/notifications/{notification_slug}/delivery-attempts":{"get":{"description":"List tenant-scoped alert delivery attempt diagnostics for one notification record. The response exposes safe delivery state and metadata only, not raw provider responses or secret material.","operationId":"listNotificationDeliveryAttempts","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/NotificationSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/AlertDeliveryAttemptFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDeliveryAttemptListResponse"}}},"description":"Paginated list of alert delivery attempts for the notification"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or notification not found"}},"summary":"List notification alert delivery attempts","tags":["notifications"]}},"/organizations/{slug}/notifications/{notification_slug}/resolve":{"post":{"description":"Mark one tenant-scoped notification record as resolved and remove it from the active notification list. Later matching producer observations create a new active record.","operationId":"resolveNotification","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/NotificationSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRecord"}}},"description":"Resolved notification record"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to update notifications"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or notification not found"}},"summary":"Resolve an organization notification","tags":["notifications"]}},"/organizations/{slug}/pipeline-spec:format":{"post":{"description":"Formats syntactically valid JSON or YAML pipeline spec data into canonical ordering for editor,\nbuilder, preview, and CLI workflows. Callers must send the explicit input format; formatting uses\nonly spec-local structure and does not resolve\norganization or project resources, inspect connector schemas, or run runtime contract validation.\n","operationId":"formatPipelineSpec","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineSpecFormatRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineSpecFormatResponse"}}},"description":"Pipeline spec formatted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (malformed JSON or malformed slug)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"}},"summary":"Format a pipeline spec","tags":["pipelines"]}},"/organizations/{slug}/projects":{"get":{"description":"Lists projects in the organization.","operationId":"listProjects","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/ProjectsFieldParam"},{"description":"Sort order (asc for ascending, desc for descending)","in":"query","name":"order","schema":{"default":"desc","enum":["asc","desc"],"example":"desc","type":"string","x-enum-varnames":["ListProjectsParamsOrderAsc","ListProjectsParamsOrderDesc"]}},{"description":"Page direction (next for forward navigation, prev for backward navigation)","in":"query","name":"direction","schema":{"default":"next","enum":["next","prev"],"example":"next","type":"string","x-enum-varnames":["ListProjectsParamsDirectionNext","ListProjectsParamsDirectionPrev"]}}],"responses":{"200":{"content":{"application/json":{"example":{"has_more":false,"next_cursor":null,"prev_cursor":null,"projects":[{"created_at":"2026-05-12T10:30:00Z","name":"Data pipelines","slug":"data-pipelines","updated_at":"2026-05-12T10:30:00Z"}]},"schema":{"$ref":"#/components/schemas/ProjectListResponse"}}},"description":"List of projects"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"}},"summary":"List projects","tags":["projects"]},"post":{"description":"Creates a new project in the organization. Project slugs are unique within the organization.","operationId":"createProject","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"example":{"name":"Operations","slug":"operations"},"schema":{"$ref":"#/components/schemas/NewProject"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"created_at":"2026-05-12T10:30:00Z","name":"Operations","slug":"operations","updated_at":"2026-05-12T10:30:00Z"},"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Project created"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Project slug already exists in organization"}},"summary":"Create a project","tags":["projects"]}},"/organizations/{slug}/projects/{project_slug}":{"delete":{"description":"Permanently deletes a project and its owned project-scoped resources.","operationId":"deleteProject","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"description":"When true, also removes tracked remote git pipeline files before deletion.","in":"query","name":"cleanup_remote","schema":{"default":false,"type":"boolean"}}],"responses":{"204":{"description":"Project deleted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or project not found"}},"summary":"Delete a project","tags":["projects"]},"get":{"description":"Returns a project identified by organization slug and project slug.","operationId":"getProject","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"}],"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2026-05-12T10:30:00Z","name":"Data pipelines","slug":"data-pipelines","updated_at":"2026-05-12T10:30:00Z"},"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Project details"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or project not found"}},"summary":"Get a project","tags":["projects"]},"put":{"description":"Updates a project identified by organization slug and project slug. Full replacement of mutable fields.","operationId":"updateProject","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"}],"requestBody":{"content":{"application/json":{"example":{"name":"Operations workspace"},"schema":{"$ref":"#/components/schemas/UpdateProject"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Project updated"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or project not found"}},"summary":"Update a project","tags":["projects"]}},"/organizations/{slug}/projects/{project_slug}/contracts":{"get":{"description":"Project-owned ODCS catalog. Recorded revisions are immutable and do not imply semantic validation.","operationId":"listODCSContracts","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODCSContractListResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Catalog resource or project not found"}},"summary":"listODCSContracts","tags":["contracts"]},"post":{"description":"Project-owned ODCS catalog. Recorded revisions are immutable and do not imply semantic validation.","operationId":"createODCSContract","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewODCSContract"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODCSContract"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Catalog resource or project not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Duplicate identity, revision, digest, or archived contract"}},"summary":"createODCSContract","tags":["contracts"]}},"/organizations/{slug}/projects/{project_slug}/contracts/{contract_slug}":{"get":{"description":"Project-owned ODCS catalog. Recorded revisions are immutable and do not imply semantic validation.","operationId":"getODCSContract","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/ContractSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODCSContract"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Catalog resource or project not found"}},"summary":"getODCSContract","tags":["contracts"]},"put":{"description":"Project-owned ODCS catalog. Recorded revisions are immutable and do not imply semantic validation.","operationId":"updateODCSContract","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/ContractSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateODCSContract"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODCSContract"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Catalog resource or project not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Duplicate identity, revision, digest, or archived contract"}},"summary":"updateODCSContract","tags":["contracts"]}},"/organizations/{slug}/projects/{project_slug}/contracts/{contract_slug}/impact":{"post":{"description":"Shows which pipelines in this project may be affected by a contract revision change. Identifies breaking changes, warnings, and changes that cannot be assessed. Impact on external consumers is unknown.","operationId":"previewODCSRevisionImpact","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/ContractSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODCSRevisionImpactRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODCSRevisionImpact"}}},"description":"Revision changes and affected pipeline ports"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Catalog resource or project not found"}},"summary":"Preview ODCS revision impact","tags":["contracts"]}},"/organizations/{slug}/projects/{project_slug}/contracts/{contract_slug}/revisions":{"get":{"description":"Project-owned ODCS catalog. Recorded revisions are immutable and do not imply semantic validation.","operationId":"listODCSRevisions","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/ContractSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODCSRevisionListResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Catalog resource or project not found"}},"summary":"listODCSRevisions","tags":["contracts"]},"post":{"description":"Project-owned ODCS catalog. Recorded revisions are immutable and do not imply semantic validation.","operationId":"createODCSRevision","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/ContractSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewODCSRevision"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODCSRevision"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Catalog resource or project not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Duplicate identity, revision, digest, or archived contract"}},"summary":"createODCSRevision","tags":["contracts"]}},"/organizations/{slug}/projects/{project_slug}/contracts/{contract_slug}/revisions/{revision_slug}":{"get":{"description":"Project-owned ODCS catalog. Recorded revisions are immutable and do not imply semantic validation.","operationId":"getODCSRevision","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/ContractSlugParam"},{"$ref":"#/components/parameters/RevisionSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODCSRevision"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Catalog resource or project not found"}},"summary":"getODCSRevision","tags":["contracts"]}},"/organizations/{slug}/projects/{project_slug}/data-source-refs":{"get":{"description":"Lists pipeline-scoped logical data source references aggregated across project pipelines.","operationId":"listDataSourceRefs","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceRefListResponse"}}},"description":"List of data source refs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or project not found"}},"summary":"List logical data source refs","tags":["data-sources"]}},"/organizations/{slug}/projects/{project_slug}/drift-impact-reports":{"get":{"description":"Lists persisted schema drift and contract impact reports for one project.","operationId":"listDriftImpactReports","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"in":"query","name":"pipeline_slug","schema":{"$ref":"#/components/schemas/Slug"}},{"in":"query","name":"data_source_slug","schema":{"$ref":"#/components/schemas/Slug"}},{"in":"query","name":"status","schema":{"$ref":"#/components/schemas/DriftImpactReportStatus"}},{"in":"query","name":"severity","schema":{"$ref":"#/components/schemas/DriftImpactReportSeverity"}},{"in":"query","name":"limit","schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftImpactReportListResponse"}}},"description":"Drift and impact reports"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or project not found"}},"summary":"List drift and impact reports","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/drift-impact-reports/{report_slug}":{"get":{"description":"Fetches one persisted schema drift or contract impact report.","operationId":"getDriftImpactReport","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"in":"path","name":"report_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftImpactReport"}}},"description":"Drift or impact report"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Report not found"}},"summary":"Get a drift or impact report","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments":{"get":{"description":"Lists environments enabled for a project.","operationId":"listProjectEnvironments","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/EnvironmentsFieldParam"},{"description":"Sort order (asc for ascending, desc for descending)","in":"query","name":"order","schema":{"default":"desc","enum":["asc","desc"],"example":"desc","type":"string","x-enum-varnames":["ListProjectEnvironmentsParamsOrderAsc","ListProjectEnvironmentsParamsOrderDesc"]}},{"description":"Page direction (next for forward navigation, prev for backward navigation)","in":"query","name":"direction","schema":{"default":"next","enum":["next","prev"],"example":"next","type":"string","x-enum-varnames":["ListProjectEnvironmentsParamsDirectionNext","ListProjectEnvironmentsParamsDirectionPrev"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectEnvironmentListResponse"}}},"description":"List of enabled project environments"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or project not found"}},"summary":"List project environments","tags":["environments"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}":{"delete":{"description":"Removes a project's opt-in to an environment.","operationId":"disableProjectEnvironment","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/ProtectedEnvironmentConfirmationParam"}],"responses":{"204":{"description":"Project environment disabled"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid disable request or protected environment confirmation"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, or environment not found"}},"summary":"Disable a project environment","tags":["environments"]},"put":{"description":"Enables an organization environment for a project. Setting `is_default` true makes it the project's sole default environment.","operationId":"enableProjectEnvironment","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"}],"requestBody":{"content":{"application/json":{"example":{"is_default":true},"schema":{"$ref":"#/components/schemas/EnableProjectEnvironmentRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectEnvironment"}}},"description":"Project environment enabled"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid enable request or protected environment confirmation"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, or environment not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Project environment default conflict"}},"summary":"Enable a project environment","tags":["environments"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/data-source-bindings":{"get":{"description":"Lists data source bindings for one enabled project environment.","operationId":"listDataSourceBindings","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceBindingListResponse"}}},"description":"List of environment data source bindings"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, or environment not found"}},"summary":"List data source bindings","tags":["data-sources"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipeline-deployments":{"get":{"description":"Lists deployed pipeline version pointers for one project environment.","operationId":"listPipelineDeployments","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineDeploymentListResponse"}}},"description":"Pipeline deployments in the environment"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Environment not found"}},"summary":"List pipeline deployments","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipeline-triggers":{"get":{"description":"Lists environment-scoped pipeline trigger definitions without secret values.","operationId":"listPipelineTriggers","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineTriggerListResponse"}}},"description":"List of pipeline triggers"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, or environment not found"}},"summary":"List pipeline triggers","tags":["pipelines"]},"post":{"description":"Creates an environment-scoped schedule or webhook trigger definition for a pipeline. Webhook secrets are returned only in this response.","operationId":"createPipelineTrigger","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewPipelineTrigger"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineTriggerIssuanceResponse"}}},"description":"Pipeline trigger created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid trigger definition"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, environment, pipeline, or pinned version not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline trigger slug already exists in the environment"}},"summary":"Create pipeline trigger","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipeline-triggers/{pipeline_trigger_slug}":{"delete":{"description":"Deletes one environment-scoped pipeline trigger definition.","operationId":"deletePipelineTrigger","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineTriggerSlugParam"}],"responses":{"204":{"description":"Pipeline trigger deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, environment, or trigger not found"}},"summary":"Delete pipeline trigger","tags":["pipelines"]},"get":{"description":"Returns one environment-scoped pipeline trigger definition without secret values.","operationId":"getPipelineTrigger","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineTriggerSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineTrigger"}}},"description":"Pipeline trigger details"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, environment, or trigger not found"}},"summary":"Get pipeline trigger","tags":["pipelines"]},"put":{"description":"Fully replaces mutable pipeline trigger definition fields and increments the trigger revision.","operationId":"updatePipelineTrigger","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineTriggerSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePipelineTrigger"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineTrigger"}}},"description":"Pipeline trigger updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid trigger definition"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, environment, trigger, pipeline, or pinned version not found"}},"summary":"Update pipeline trigger","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipeline-triggers/{pipeline_trigger_slug}/deliveries":{"get":{"description":"Lists operator-safe delivery diagnostics for one environment-scoped webhook trigger.","operationId":"listPipelineWebhookDeliveries","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineTriggerSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineWebhookDeliveryListResponse"}}},"description":"List of safe pipeline webhook delivery diagnostics"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid pagination parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, environment, or trigger not found"}},"summary":"List pipeline webhook deliveries","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipeline-triggers/{pipeline_trigger_slug}/deliveries/{delivery_id}":{"get":{"description":"Returns one operator-safe delivery diagnostic without request or mapped values.","operationId":"getPipelineWebhookDelivery","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineTriggerSlugParam"},{"$ref":"#/components/parameters/PipelineWebhookDeliveryIDParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineWebhookDelivery"}}},"description":"Safe pipeline webhook delivery diagnostic"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid delivery identity"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, environment, trigger, or delivery not found"}},"summary":"Get pipeline webhook delivery","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipeline-triggers/{pipeline_trigger_slug}/deliveries/{delivery_id}/replay":{"post":{"description":"Explicitly enqueues another attempt only when encrypted execution input is retained and no linked run requires the pipeline run replay contract.","operationId":"replayPipelineWebhookDelivery","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineTriggerSlugParam"},{"$ref":"#/components/parameters/PipelineWebhookDeliveryIDParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineWebhookDelivery"}}},"description":"Delivery replay durably queued"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Replay is unavailable for the delivery state or retention policy"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, environment, trigger, or delivery not found"}},"summary":"Replay a retained pipeline webhook delivery","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipeline-triggers/{pipeline_trigger_slug}/fires":{"get":{"description":"Lists persisted schedule-fire diagnostics for one environment-scoped pipeline trigger.","operationId":"listPipelineScheduleFires","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineTriggerSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineScheduleFireListResponse"}}},"description":"List of pipeline schedule fires"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid pagination or request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, environment, or trigger not found"}},"summary":"List pipeline schedule fires","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipeline-triggers/{pipeline_trigger_slug}/webhook-secret/rotate":{"post":{"description":"Issues a new webhook verification key version and returns its secret value once.","operationId":"rotatePipelineWebhookSecret","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineTriggerSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineWebhookSecretIssuance"}}},"description":"Rotated webhook verification secret"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Trigger is not a webhook trigger"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, environment, or trigger not found"}},"summary":"Rotate pipeline webhook verification secret","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipeline-validation":{"post":{"description":"Validates a pipeline spec against one enabled project environment. This is the shared validation surface for frontend builder preflight and CLI server-target validation. Validation applies the canonical pipeline spec validator: syntax/schema decoding, required fields, supported step kinds, graph and binding consistency, source/sink/transform target shape, and mutually exclusive operation references. Server validation resolves logical data-source refs through the selected project environment before checking org-scoped cached data-source schema metadata when the spec contains contracts or transforms that require schema context. It does not refresh schemas, call live connectors, run operations, or prove that referenced connector operations exist in the target environment. Failed validation results with a pipeline slug are stored as non-run diagnostic history for operator triage only when the caller is authorized to update pipeline history; the response body remains the source of truth for validation semantics. UI builder validation may still run earlier local checks for draft completeness and graph editing feedback; CLI --local validation uses the local validator without contacting this endpoint and therefore cannot check bindings or cached server-side schema metadata.\n","operationId":"validatePipeline","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineValidationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineValidationResponse"}}},"description":"Pipeline validation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (malformed JSON or malformed request shape)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"}},"summary":"Validate a pipeline spec","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipeline-validation-results":{"get":{"description":"Lists durable non-run validation results for one project runtime target. These records capture API, setup, revalidation, and execution preflight validation evidence without creating or implying a pipeline run.\n","operationId":"listPipelineValidationResults","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"description":"Filter by pipeline slug","in":"query","name":"pipeline_slug","schema":{"$ref":"#/components/schemas/Slug"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineValidationResultListResponse"}}},"description":"List of pipeline validation results"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid validation result list request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"}},"summary":"List pipeline validation results","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipeline-validation-results/{validation_slug}":{"get":{"description":"Returns one durable non-run pipeline validation result for operator triage.","operationId":"getPipelineValidationResult","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/ValidationSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineValidationResultRecord"}}},"description":"Pipeline validation result"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation result not found"}},"summary":"Get pipeline validation result","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipelines/{pipeline_slug}/deployment":{"get":{"description":"Retrieves the current deployed pipeline version for one environment.","operationId":"getPipelineDeployment","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineDeployment"}}},"description":"Pipeline deployment"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline deployment not found"}},"summary":"Get pipeline deployment","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipelines/{pipeline_slug}:deploy":{"post":{"description":"Points one project environment at an existing immutable pipeline version. Promotion between environments is modeled by deploying the same version hash to another environment; deployment does not reread source files or create a new pipeline version.\n","operationId":"deployPipeline","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineDeploymentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineDeployment"}}},"description":"Pipeline deployment updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (validation error, malformed JSON, malformed slug)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline, version, or environment not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Deployment precondition failed"}},"summary":"Deploy pipeline version","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipelines/{pipeline_slug}:execute":{"post":{"description":"Accepts a manual/API pipeline run for durable background execution and returns the persisted queued run record. Clients should poll the run detail endpoint, or use CLI watch, until the status reaches succeeded, failed, or canceled.\n","operationId":"executePipeline","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"requestBody":{"content":{"application/json":{"example":{"input":{"customer_id":"cus_123","dry_run":true},"run_slug":"acme-users-sync-run-001"},"schema":{"$ref":"#/components/schemas/ExecutePipelineRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineRunRecord"}}},"description":"Pipeline run accepted for background execution"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request (validation failed)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Start pipeline run","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipelines/{pipeline_slug}:revalidate":{"post":{"description":"Revalidates the current canonical pipeline against one project runtime target and stores the resulting non-run validation history record. This endpoint never creates a pipeline run.\n","operationId":"revalidatePipeline","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineValidationResultRecord"}}},"description":"Pipeline validation result"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline or runtime target not found"}},"summary":"Revalidate pipeline","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/proof-observation-policy":{"get":{"description":"Requires an authenticated user with environment read permission. Unavailable unless live observations are enabled.","operationId":"getProofObservationPolicy","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofObservationPolicy"}}},"description":"Observation control result","headers":{"Cache-Control":{"description":"Protected Proof responses must not be cached.","schema":{"enum":["no-store"],"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authenticated user required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation not authorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation control or selected resource not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation budget exhausted"}},"summary":"Get the environment observation policy","tags":["pipelines"]},"put":{"description":"Requires an authenticated user with environment update permission. Unavailable unless live observations are enabled.","operationId":"setProofObservationPolicy","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofObservationPolicyInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofObservationPolicy"}}},"description":"Observation control result","headers":{"Cache-Control":{"description":"Protected Proof responses must not be cached.","schema":{"enum":["no-store"],"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authenticated user required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation not authorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation control or selected resource not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation budget exhausted"}},"summary":"Replace the environment observation policy","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/proof-observation-previews":{"post":{"description":"Explicit user-scoped read-only Proof observation control. Unavailable unless live observations are enabled.","operationId":"prepareProofObservation","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofObservationPreviewInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofObservationPreview"}}},"description":"Observation control result","headers":{"Cache-Control":{"description":"Protected Proof responses must not be cached.","schema":{"enum":["no-store"],"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authenticated user required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation not authorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation control or selected resource not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation budget exhausted"}},"summary":"Preview an exact read-only observation","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/proof-observations":{"post":{"description":"Explicit user-scoped read-only Proof observation control. Unavailable unless live observations are enabled.","operationId":"authorizeProofObservation","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofObservationIntent"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofObservationJob"}}},"description":"Observation control result","headers":{"Cache-Control":{"description":"Protected Proof responses must not be cached.","schema":{"enum":["no-store"],"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authenticated user required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation not authorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation control or selected resource not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation budget exhausted"}},"summary":"Confirm a reviewed read-only observation","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/proof-observations/{observation_slug}":{"get":{"description":"Requires a user with pipeline read permission. Returns status without provider metadata or credentials, including after policy disable. Deadline expiry fences completion even if cleanup has not yet terminalized the stored state. Unavailable when live observation controls are disabled.","operationId":"getProofObservation","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/ProofObservationSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofObservationJob"}}},"description":"Protected observation control result","headers":{"Cache-Control":{"description":"Protected Proof responses must not be cached.","schema":{"enum":["no-store"],"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authenticated user required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation not authorized or evidence no longer usable"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Control or scoped resource not found"}},"summary":"Get observation status","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/proof-observations/{observation_slug}/cancel":{"post":{"description":"Requires a user with pipeline execute permission. Idempotently fences pending or running work; completed evidence stays immutable. Running cancellation is acknowledged through cancellation_requested until the worker or cleanup terminalizes it. No provider retry or refund of reserved budgets.","operationId":"cancelProofObservation","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/ProofObservationSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofObservationJob"}}},"description":"Protected observation control result","headers":{"Cache-Control":{"description":"Protected Proof responses must not be cached.","schema":{"enum":["no-store"],"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authenticated user required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation not authorized or evidence no longer usable"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Control or scoped resource not found"}},"summary":"Cancel an observation","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/proof-receipts":{"get":{"description":"Lists protected informational receipts for one project environment, newest first. Live claims and lifecycle links are projected against current state using the same rules as the receipt detail endpoint.","operationId":"listProofReceipts","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofReceiptListResponse"}}},"description":"Paginated list of Proof Preview receipts","headers":{"Cache-Control":{"description":"Protected Proof responses must not be cached.","schema":{"enum":["no-store"],"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Resource not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Receipt access audit unavailable"}},"summary":"List Proof Preview receipts","tags":["pipelines"]},"post":{"description":"Requires a user with pipeline execute, pipeline read, and data-source read permissions. Compiles one or two explicitly selected terminal observations for this exact candidate and environment. No provider call is dispatched. Complete metadata requires current policy, target, credential and unexpired evidence. Failed attempts use only retained outcome classifications and produce inconclusive or unverified claims without an actual evidence level, including after policy disable or credential loss. Pending, mismatched, corrupted, or expired records are rejected. Refresh creates a new immutable receipt and replay reuses its existing receipt.","operationId":"compileObservedProofReceipt","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompileObservedProofReceiptInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofReceipt"}}},"description":"Protected observation control result","headers":{"Cache-Control":{"description":"Protected Proof responses must not be cached.","schema":{"enum":["no-store"],"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authenticated user required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Observation not authorized or evidence no longer usable"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Control or scoped resource not found"}},"summary":"Compile a receipt from selected observations","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/proof-receipts/{receipt_slug}":{"get":{"description":"Returns a protected informational receipt. Explicitly authorized live claims are revalidated against current policy, target, credential, and expiry when live observation admission is configured.","operationId":"getProofReceipt","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/ProofReceiptSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofReceipt"}}},"description":"Proof Preview receipt","headers":{"Cache-Control":{"description":"Protected Proof responses must not be cached.","schema":{"enum":["no-store"],"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Proof receipt not found"}},"summary":"Get Proof Preview receipt","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/runs":{"get":{"description":"List persisted pipeline runs for one project environment with optional filters","operationId":"listPipelineRuns","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/RunFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"description":"Page direction (next for forward navigation, prev for backward navigation)","in":"query","name":"direction","schema":{"default":"next","enum":["next","prev"],"example":"next","type":"string","x-enum-varnames":["ListPipelineRunsParamsDirectionNext","ListPipelineRunsParamsDirectionPrev"]}},{"description":"Filter by run status","in":"query","name":"status","schema":{"enum":["queued","running","succeeded","failed","canceled"],"example":"failed","type":"string","x-enum-varnames":["ListPipelineRunsParamsStatusQueued","ListPipelineRunsParamsStatusRunning","ListPipelineRunsParamsStatusSucceeded","ListPipelineRunsParamsStatusFailed","ListPipelineRunsParamsStatusCanceled"]}},{"description":"Filter by pipeline slug","in":"query","name":"pipeline_slug","schema":{"$ref":"#/components/schemas/Slug"}},{"description":"Filter by run execution mode","in":"query","name":"mode","schema":{"$ref":"#/components/schemas/PipelineRunMode"}},{"description":"Filter by backfill series slug","in":"query","name":"backfill_series_slug","schema":{"$ref":"#/components/schemas/Slug"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineRunListResponse"}}},"description":"Paginated list of pipeline runs"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"}},"summary":"List pipeline runs","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/runs/{run_slug}":{"get":{"description":"Retrieve run metadata and diagnostics timeline for a persisted environment-scoped pipeline run","operationId":"getPipelineRun","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/RunSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineRunRecord"}}},"description":"Pipeline run details"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - caller not authorized to access this environment-scoped resource"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline run not found"}},"summary":"Get pipeline run details","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/runs/{run_slug}/trigger-retry-attempts":{"get":{"description":"Returns durable trigger retry decisions and execution handoff diagnostics for the run retry group.","operationId":"listPipelineRunTriggerRetryAttempts","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/RunSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineRunTriggerRetryAttemptListResponse"}}},"description":"Trigger retry attempts for the run retry group"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline run not found"}},"summary":"List trigger retry attempts for a pipeline run","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/runs/{run_slug}:recover":{"post":{"description":"Synchronously recovers a failed sink workflow from retained checkpoint inputs. Requires pipeline execute permission and protected-environment confirmation. Keeps the original environment, version, source windows and effect identity; skips confirmed safe effects and refuses unsafe or ledger-unknown retries. Missing input checkpoints and source/transform failures are unsupported.\n","operationId":"recoverPipelineRun","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/RunSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoverPipelineRunRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineRunRecord"}}},"description":"Recovery run with terminal delivery diagnostics, including failed recovery"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unsupported recovery or unsafe replay"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Run or retained checkpoint not found in the requested scope"}},"summary":"Recover sink delivery from pinned inputs","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/pipeline-backend":{"put":{"description":"Configures the git pipeline backend identity for a project.","operationId":"setProjectPipelineBackend","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"}],"requestBody":{"content":{"application/json":{"example":{"data_source_slug":"pipelines-git","mode":"adopt_existing","pipeline_dir":"pipelines","tracked_branch":"main"},"schema":{"$ref":"#/components/schemas/SetProjectPipelineBackendRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Project pipeline backend updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid repository, branch, pipeline path, or onboarding mode"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Provider connection lacks permission to validate or create the repository"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or project not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Backend identity conflict or migration conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Provider operation or repository cleanup could not be completed"}},"summary":"Set a project pipeline backend","tags":["projects"]}},"/organizations/{slug}/projects/{project_slug}/pipelines":{"get":{"description":"Lists persisted pipelines for a project.","operationId":"listPipelines","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineListResponse"}}},"description":"Paginated list of pipelines"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"}},"summary":"List pipelines","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/pipelines/{pipeline_slug}":{"get":{"description":"Retrieves a project-scoped pipeline definition by slug.","operationId":"getPipeline","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pipeline"}}},"description":"Pipeline details"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline not found"}},"summary":"Get a pipeline","tags":["pipelines"]},"put":{"description":"Queues a Git proposal for the existing pipeline source without mutating the materialized canonical version.","operationId":"updatePipeline","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePipeline"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pipeline"}}},"description":"Pipeline update proposal queued"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (validation error, malformed JSON)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline not found"}},"summary":"Propose a pipeline update","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/pipelines/{pipeline_slug}/data-source-refs":{"post":{"description":"Creates a pipeline-scoped logical data source reference used by portable pipeline specs.","operationId":"createDataSourceRef","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewDataSourceRef"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceRef"}}},"description":"Data source ref created"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, or pipeline not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source ref slug already exists for the pipeline"}},"summary":"Create a logical data source ref","tags":["data-sources"]}},"/organizations/{slug}/projects/{project_slug}/pipelines/{pipeline_slug}/data-source-refs/{data_source_ref_slug}":{"delete":{"description":"Deletes a pipeline-scoped logical data source reference and its environment bindings.","operationId":"deleteDataSourceRef","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"},{"$ref":"#/components/parameters/DataSourceRefSlugParam"}],"responses":{"204":{"description":"Data source ref deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid delete request or protected environment binding prevents cascade"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, pipeline, or data source ref not found"}},"summary":"Delete a logical data source ref","tags":["data-sources"]},"get":{"description":"Returns one pipeline-scoped logical data source reference.","operationId":"getDataSourceRef","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"},{"$ref":"#/components/parameters/DataSourceRefSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceRef"}}},"description":"Data source ref details"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, pipeline, or data source ref not found"}},"summary":"Get a logical data source ref","tags":["data-sources"]},"put":{"description":"Fully replaces mutable metadata for a pipeline-scoped logical data source reference.","operationId":"updateDataSourceRef","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"},{"$ref":"#/components/parameters/DataSourceRefSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDataSourceRef"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceRef"}}},"description":"Data source ref updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Update would make existing environment bindings incompatible"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, pipeline, or data source ref not found"}},"summary":"Update a logical data source ref","tags":["data-sources"]}},"/organizations/{slug}/projects/{project_slug}/pipelines/{pipeline_slug}/draft":{"delete":{"description":"Deletes the current draft for a pipeline. Requires a user principal from a session or PAT; organization API keys are rejected with AUTH_USER_PRINCIPAL_REQUIRED.","operationId":"deletePipelineDraft","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"responses":{"204":{"description":"Pipeline draft deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (validation error, malformed slug)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline draft not found"}},"summary":"Discard pipeline draft","tags":["pipelines"]},"get":{"description":"Retrieves the current draft for a pipeline. Requires a user principal from a session or PAT; organization API keys are rejected with AUTH_USER_PRINCIPAL_REQUIRED.","operationId":"getPipelineDraft","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineDraftResponse"}}},"description":"Pipeline draft details"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (validation error, malformed slug)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline draft not found"}},"summary":"Get pipeline draft","tags":["pipelines"]},"put":{"description":"Saves or updates proposal working state for an existing Git-authored pipeline without changing its materialized canonical version. Requires a user principal from a session or PAT; organization API keys are rejected with AUTH_USER_PRINCIPAL_REQUIRED.","operationId":"savePipelineDraft","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavePipelineDraftRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineDraftResponse"}}},"description":"Pipeline draft saved"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (validation error, malformed JSON)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline not found"},"409":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/PipelineDraftConflictResponse"}]}}},"description":"Drafts are not supported for this pipeline or the caller is editing a stale version"}},"summary":"Save pipeline draft","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/pipelines/{pipeline_slug}/draft:publish":{"post":{"description":"Records proposal continuity, queues an outbound Git branch update, and leaves the materialized canonical artifact unchanged. Requires a user principal from a session or PAT; organization API keys are rejected with AUTH_USER_PRINCIPAL_REQUIRED.","operationId":"publishPipelineDraft","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPipelineDraftRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pipeline"}}},"description":"Pipeline draft proposal queued"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (validation error, malformed slug)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline draft not found"},"409":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/PipelineDraftConflictResponse"}]}}},"description":"Drafts are not supported for this pipeline or the caller is publishing a stale version"}},"summary":"Propose pipeline draft","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/pipelines/{pipeline_slug}/draft:refresh-proposal":{"post":{"description":"Queues an idempotent provider read for the exact pull or merge request currently attached to this member draft. Requires a user principal from a session or PAT; organization API keys are rejected with AUTH_USER_PRINCIPAL_REQUIRED.","operationId":"refreshPipelineDraftProposal","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pipeline"}}},"description":"Proposal refresh queued"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input or no proposal is attached to this draft"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline draft not found"}},"summary":"Refresh pipeline draft proposal","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/pipelines/{pipeline_slug}/environments/{environment_slug}/data-source-bindings/{data_source_ref_slug}":{"delete":{"description":"Removes the concrete data source binding for one pipeline-scoped logical ref in one project environment.","operationId":"deleteDataSourceBinding","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/DataSourceRefSlugParam"},{"$ref":"#/components/parameters/ProtectedEnvironmentConfirmationParam"}],"responses":{"204":{"description":"Environment data source binding deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid delete request or protected environment confirmation"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, pipeline, environment, ref, or binding not found"}},"summary":"Delete a data source binding","tags":["data-sources"]},"get":{"description":"Returns the concrete data source bound to one pipeline-scoped logical ref in one project environment.","operationId":"getDataSourceBinding","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/DataSourceRefSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceBinding"}}},"description":"Environment data source binding details"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, pipeline, environment, ref, or binding not found"}},"summary":"Get a data source binding","tags":["data-sources"]},"put":{"description":"Binds one pipeline-scoped logical data source ref to one organization-owned concrete data source in a project environment.","operationId":"upsertDataSourceBinding","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/DataSourceRefSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertDataSourceBinding"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceBinding"}}},"description":"Environment data source binding upserted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Concrete data source is incompatible with the logical ref contract"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, project, pipeline, environment, ref, or concrete data source not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Concrete data source is inactive or otherwise unavailable"}},"summary":"Upsert a data source binding","tags":["data-sources"]}},"/organizations/{slug}/projects/{project_slug}/pipelines/{pipeline_slug}/versions":{"get":{"description":"Lists persisted versions for a pipeline, newest first.","operationId":"listPipelineVersions","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineVersionListResponse"}}},"description":"List of pipeline versions"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline not found"}},"summary":"List pipeline versions","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/pipelines/{pipeline_slug}/versions/{spec_hash}":{"get":{"description":"Retrieves an immutable pipeline version snapshot by full spec hash or an unambiguous short hash prefix.","operationId":"getPipelineVersion","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"},{"$ref":"#/components/parameters/PipelineVersionIdParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineVersion"}}},"description":"Pipeline version details"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline version not found"}},"summary":"Get a pipeline version","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/pipelines:reconcile":{"post":{"description":"Reconciles pipeline specs from the project's git pipeline source into DB-canonical storage.\nThe operation is synchronous for the MVP and returns a concrete per-pipeline reconciliation report.\n","operationId":"reconcilePipelines","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"}],"requestBody":{"content":{"application/json":{"example":{"dry_run":true,"pipeline_dir":"pipelines","pipeline_slugs":["acme-users-sync"]},"schema":{"$ref":"#/components/schemas/PipelineReconcileRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineReconcileResponse"}}},"description":"Pipeline reconcile completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid input (validation error, malformed JSON, malformed slug)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The Git source changed since preview; request a fresh preview before applying."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Git source unavailable or unsupported for reconciliation"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Reconcile Git-authored pipelines","tags":["pipelines"]}},"/organizations/{slug}/proof-configurations":{"get":{"operationId":"listProofConfigurations","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DataSourceProofConfiguration"},"type":"array"}}},"description":"Managed Git sources and their assessment settings"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request or stale repository/target configuration"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required organization or data-source permissions missing"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization, source, or connection not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request failed"}},"summary":"List data-source-owned Proof configurations","tags":["proof"]}},"/organizations/{slug}/provider-connectors/{provider}/data-source-installs":{"post":{"description":"Creates an inactive data source with a pending OAuth2 credential owner and starts a time-bound, single-use provider install. No static credential or token material is persisted before the callback succeeds.","operationId":"startProviderDataSourceInstall","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"description":"Provider key registered by the backend","in":"path","name":"provider","required":true,"schema":{"$ref":"#/components/schemas/ProviderKey"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartProviderDataSourceInstallRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDataSourceInstall"}}},"description":"Pending data source and provider install created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid provider-backed data source request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to create data sources for this organization"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Data source slug already exists"}},"summary":"Start provider-backed data source onboarding","tags":["data-sources"]}},"/organizations/{slug}/provider-connectors/{provider}/installs":{"post":{"description":"Creates a time-bound, single-use OAuth2 install and returns a provider authorization URL. Provider client secrets are backend configuration and are never supplied in this request.","operationId":"startProviderConnectorInstall","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"description":"Provider key registered by the backend","in":"path","name":"provider","required":true,"schema":{"$ref":"#/components/schemas/ProviderKey"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartProviderConnectorInstallRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectorInstall"}}},"description":"Provider install started"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid install request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to install provider connectors for this organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or data source not found"}},"summary":"Start provider connector install","tags":["data-sources"]}},"/organizations/{slug}/retention":{"get":{"description":"Returns the effective organization-owned runtime retention policy.","operationId":"getOrganizationRetentionPolicy","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRetentionPolicy"}}},"description":"Effective retention policy"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"}},"summary":"Get organization retention policy","tags":["organizations"]},"put":{"description":"Replaces the organization-owned runtime retention policy.","operationId":"updateOrganizationRetentionPolicy","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRetentionPolicy"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRetentionPolicy"}}},"description":"Updated effective retention policy"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid retention policy"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"}},"summary":"Update organization retention policy","tags":["organizations"]}},"/organizations/{slug}/retention/runs":{"get":{"description":"Returns sanitized product-level outcomes for system-managed organization retention maintenance.","operationId":"listOrganizationRetentionRuns","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRetentionRunList"}}},"description":"Retention maintenance schedule and recent runs"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization not found"}},"summary":"List organization retention maintenance runs","tags":["organizations"]}},"/organizations/{slug}/roles":{"get":{"description":"Lists active roles in the organization. Archived roles are excluded unless requested for recovery.","operationId":"listRoles","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/RolesFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"},{"description":"Include archived roles in the result set. Requires role restore permission.","in":"query","name":"include_deleted","schema":{"default":false,"type":"boolean"}},{"description":"Return only archived roles. Implies include_deleted and requires role restore permission.","in":"query","name":"only_deleted","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"example":{"has_more":false,"next_cursor":null,"prev_cursor":null,"roles":[{"created_at":"2025-10-04T10:30:00Z","deleted_at":null,"is_default":true,"name":"Admin","permissions":[{"action":"*","resource":"*"}],"slug":"admin","updated_at":"2025-10-04T10:30:00Z"},{"created_at":"2025-10-04T10:30:00Z","deleted_at":null,"is_default":true,"name":"Viewer","permissions":[{"action":"read","resource":"members"}],"slug":"viewer","updated_at":"2025-10-04T10:30:00Z"}]},"schema":{"$ref":"#/components/schemas/RoleListResponse"}}},"description":"List of roles"}},"summary":"List roles","tags":["roles"]},"post":{"description":"Creates a new role in the organization.","operationId":"createRole","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"example":{"name":"Editor","permissions":[{"action":"read","resource":"members"}],"slug":"editor"},"schema":{"$ref":"#/components/schemas/NewOrgRole"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"created_at":"2025-10-04T10:30:00Z","deleted_at":null,"is_default":false,"name":"Editor","permissions":[{"action":"read","resource":"members"}],"slug":"editor","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/OrgRole"}}},"description":"Role created"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Role already exists"}},"summary":"Create a role","tags":["roles"]}},"/organizations/{slug}/roles/{role_slug}":{"delete":{"description":"Archives a custom role from the organization. Normal role list, get, update, assignment, and authorization paths treat archived roles as unavailable until restored.","operationId":"deleteRole","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/RoleSlugParam"}],"responses":{"204":{"description":"Role archived"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Role not found"}},"summary":"Archive a role","tags":["roles"]},"get":{"description":"Returns the role identified by its slug.","operationId":"getRole","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/RoleSlugParam"}],"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2025-10-04T10:30:00Z","deleted_at":null,"is_default":false,"name":"Editor","permissions":[{"action":"read","resource":"members"}],"slug":"editor","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/OrgRole"}}},"description":"Role details"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Role not found"}},"summary":"Get a role","tags":["roles"]},"put":{"description":"Updates a role's name and permissions. Full replacement of mutable fields.","operationId":"updateRole","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/RoleSlugParam"}],"requestBody":{"content":{"application/json":{"example":{"name":"Senior Editor","permissions":[{"action":"read","resource":"members"},{"action":"update","resource":"members"}]},"schema":{"$ref":"#/components/schemas/UpdateOrgRole"}}},"required":true},"responses":{"204":{"description":"Role updated"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Role not found"}},"summary":"Update a role","tags":["roles"]}},"/organizations/{slug}/roles/{role_slug}/restore":{"post":{"description":"Restores an archived custom role so it can be assigned and used for organization-scoped authorization again.","operationId":"restoreRole","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/RoleSlugParam"}],"responses":{"204":{"description":"Role restored"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Role not found"}},"summary":"Restore a role","tags":["roles"]}},"/organizations/{slug}/security-audit-events":{"get":{"description":"List tenant-scoped security and administrative audit events retained in the online event history. Generic pre-prune archive and export workflows remain outside this endpoint.","operationId":"listSecurityAuditEvents","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/SecurityAuditEventFieldParam"},{"$ref":"#/components/parameters/SecurityAuditEventOrderParam"},{"$ref":"#/components/parameters/SecurityAuditEventPageDirectionParam"},{"$ref":"#/components/parameters/EventActorTypeFilterParam"},{"$ref":"#/components/parameters/EventActorSlugFilterParam"},{"$ref":"#/components/parameters/EventEntityTypeFilterParam"},{"$ref":"#/components/parameters/EventEntitySlugFilterParam"},{"$ref":"#/components/parameters/EventActionFilterParam"},{"$ref":"#/components/parameters/EventRequestIdFilterParam"},{"$ref":"#/components/parameters/EventOccurredFromFilterParam"},{"$ref":"#/components/parameters/EventOccurredBeforeFilterParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventListResponse"}}},"description":"Paginated list of retained security audit events"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"}},"summary":"List organization security audit events","tags":["events"]}},"/organizations/{slug}/security-audit-events/export":{"get":{"description":"Exports up to 10,000 matching tenant-scoped security audit events currently retained online as deterministic CSV ordered by occurrence time and event slug. Callers must narrow the occurred_from and occurred_before window when more records match. This is not the generic pre-prune archive workflow.","operationId":"exportSecurityAuditEvents","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/EventActorTypeFilterParam"},{"$ref":"#/components/parameters/EventActorSlugFilterParam"},{"$ref":"#/components/parameters/EventEntityTypeFilterParam"},{"$ref":"#/components/parameters/EventEntitySlugFilterParam"},{"$ref":"#/components/parameters/EventActionFilterParam"},{"$ref":"#/components/parameters/EventRequestIdFilterParam"},{"$ref":"#/components/parameters/EventOccurredFromFilterParam"},{"$ref":"#/components/parameters/EventOccurredBeforeFilterParam"}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"Retained security audit event CSV","headers":{"Content-Disposition":{"description":"Attachment filename for the CSV export","schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"}},"summary":"Export organization security audit events","tags":["events"]}},"/provider-connectors/{provider}/callback":{"get":{"description":"Validates the callback state, exchanges the authorization code, stores the encrypted provider grant, and redirects to the product surface. OAuth codes, state values, tokens, provider headers, and raw provider responses are never returned.","operationId":"handleProviderConnectorCallback","parameters":[{"description":"Provider key registered by the backend","in":"path","name":"provider","required":true,"schema":{"$ref":"#/components/schemas/ProviderKey"}},{"description":"Authorization code returned by the provider","in":"query","name":"code","schema":{"minLength":1,"type":"string"}},{"description":"Opaque callback state. The value is validated against a stored hash and is never persisted or logged in plaintext.","in":"query","name":"state","schema":{"minLength":1,"type":"string"}},{"description":"Provider error code when consent fails","in":"query","name":"error","schema":{"minLength":1,"type":"string"}}],"responses":{"302":{"description":"Redirect to the data-source surface with a safe success or failure status","headers":{"Location":{"description":"Product URL","schema":{"format":"uri","type":"string"}}}}},"summary":"Complete provider connector OAuth callback","tags":["data-sources"]}},"/sessions":{"post":{"description":"Create a new session","operationId":"createSession","requestBody":{"content":{"application/json":{"example":{"email":"john.doe@example.com","password":"SecurePass123!"},"schema":{"$ref":"#/components/schemas/NewSession"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2025-10-04T10:30:00Z","email":"john.doe@example.com","full_name":"John Doe","locale":"en-US","role":"user","slug":"johndoe","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/User"}}},"description":"Session has been set in the cookie"},"202":{"content":{"application/json":{"example":{"challenge_token":"mfa_1234567890abcdef","expires_at":"2025-10-04T10:40:00Z"},"schema":{"$ref":"#/components/schemas/MFAChallenge"}}},"description":"Email MFA verification is required before the session is created"}},"summary":"Create a session"}},"/sessions/mfa/verify":{"post":{"description":"Verifies an email MFA code and creates the session cookie","operationId":"verifySessionMFA","requestBody":{"content":{"application/json":{"example":{"challenge_token":"mfa_1234567890abcdef","code":"123456"},"schema":{"$ref":"#/components/schemas/MFAVerification"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2025-10-04T10:30:00Z","email":"john.doe@example.com","full_name":"John Doe","locale":"en-US","role":"user","slug":"johndoe","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/User"}}},"description":"Session has been set in the cookie"},"400":{"description":"Invalid, expired, consumed, or over-attempt MFA challenge"}},"summary":"Verify session MFA challenge"}},"/users":{"post":{"description":"Create a new user after explicit acceptance of the current configured account terms and privacy notice.","operationId":"createUser","requestBody":{"content":{"application/json":{"example":{"email":"john.doe@example.com","full_name":"John Doe","password":"SecurePass123!","slug":"johndoe","terms_acceptance":{"terms_accepted":true,"terms_document_version":"pre-alpha-2026-09-13"}},"schema":{"$ref":"#/components/schemas/NewUser"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"created_at":"2025-10-04T10:30:00Z","email":"john.doe@example.com","full_name":"John Doe","locale":"en-US","role":"user","slug":"johndoe","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/User"}}},"description":"A user"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid account input or missing, declined, or outdated terms acceptance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Self-service registration or external onboarding is disabled"}},"summary":"Create a user"}},"/users/profile":{"get":{"description":"Returns the authenticated user's profile information","operationId":"getUsersProfile","responses":{"200":{"content":{"application/json":{"example":{"created_at":"2025-10-04T10:30:00Z","email":"john.doe@example.com","full_name":"John Doe","locale":"pl","role":"user","slug":"johndoe","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/User"}}},"description":"Current user profile"},"401":{"description":"Unauthorized - user not authenticated"}},"summary":"Get user profile"},"patch":{"description":"Update the authenticated user's profile information","operationId":"patchUsersProfile","requestBody":{"content":{"application/json":{"example":{"full_name":"John Doe","locale":"pl"},"schema":{"$ref":"#/components/schemas/UpdateUserProfile"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2025-10-04T10:30:00Z","email":"john.doe@example.com","full_name":"John Doe","locale":"pl","role":"user","slug":"johndoe","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/User"}}},"description":"Profile updated successfully"},"401":{"description":"Unauthorized - user not authenticated"}},"summary":"Update user profile"}},"/users/profile/billing-profile":{"get":{"description":"Returns the authenticated session user's billing profile. PATs and organization API keys cannot access user-owned billing profiles.","operationId":"getUserBillingProfile","responses":{"200":{"content":{"application/json":{"example":{"address":{"city":"Warsaw","line1":"1 Main Street","postal_code":"00-001"},"billing_email":"john.doe@example.com","billing_name":"John Doe","country":"PL","created_at":"2026-05-29T10:30:00Z","owner_slug":"johndoe","owner_type":"user","tax_id":null,"updated_at":"2026-05-29T10:30:00Z"},"schema":{"$ref":"#/components/schemas/BillingProfile"}}},"description":"User billing profile"},"401":{"description":"Unauthorized"},"403":{"description":"A session user is required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Billing profile not found"}},"summary":"Get user billing profile","tags":["billing"]},"put":{"description":"Reserved for a future agreed upgrade flow. The current no-card trial does not collect self-service billing details and returns 501 after session authorization.","operationId":"upsertUserBillingProfile","requestBody":{"content":{"application/json":{"example":{"address":{"city":"Warsaw","line1":"1 Main Street","postal_code":"00-001"},"billing_email":"john.doe@example.com","billing_name":"John Doe","country":"PL"},"schema":{"$ref":"#/components/schemas/UpsertBillingProfile"}}},"required":true},"responses":{"401":{"description":"Unauthorized"},"403":{"description":"A session user is required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Billing profile owner not found"},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Self-service billing is not implemented"}},"summary":"Upsert user billing profile","tags":["billing"]}},"/users/profile/deletion":{"post":{"description":"Requires an authenticated browser session, CSRF protection, and explicit confirmation. PATs and organization API keys cannot request account removal. The subject is always the session user. Ownership conflicts leave access intact; otherwise access is revoked and processing cancellation begins. An accepted request remains pending until account-owned processing stops. The account and its private data are then hard-deleted. Minimal legal-acceptance evidence is retained independently. External provider resources and backups are not erased. Save the returned request identifier before leaving the signed-out flow.","operationId":"requestAccountDeletion","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionConfirmation"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionRequest"}}},"description":"Account deleted; minimal acceptance evidence retained independently"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionRequest"}}},"description":"Request recorded; access revoked and remaining cleanup pending"},"400":{"description":"Invalid confirmation"},"401":{"description":"An active session is required"},"403":{"description":"Session user not authorized, token principal, or invalid CSRF"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionRequest"}}},"description":"Transfer ownership for organizations in ownership_required and explicitly delete sole-member organizations in organization_removal_required, then retry. Either list may be populated alone, or both may contain organizations."}},"summary":"Request removal of the current account"}},"/users/profile/password":{"put":{"description":"Changes the authenticated session user's local password after verifying the current password. PATs and organization API keys cannot manage user passwords.","operationId":"updateUserPassword","requestBody":{"content":{"application/json":{"example":{"current_password":"SecurePass123!","new_password":"NewSecurePass123!"},"schema":{"$ref":"#/components/schemas/UpdateUserPassword"}}},"required":true},"responses":{"204":{"description":"Password updated successfully"},"400":{"description":"Validation failed, password policy failed, or local password sign-in is not enabled"},"401":{"description":"A session user is required or the current password is invalid"},"403":{"description":"Session user cannot update this password"}},"summary":"Change user password"}},"/users/profile/personal-access-tokens":{"get":{"description":"Lists safe personal access token metadata for the authenticated user. A PAT must have personal access token management enabled. Raw tokens and token hashes are never returned.","operationId":"listPersonalAccessTokens","parameters":[{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/CursorParam"},{"$ref":"#/components/parameters/PersonalAccessTokensFieldParam"},{"$ref":"#/components/parameters/OrderParam"},{"$ref":"#/components/parameters/PageDirectionParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalAccessTokenListResponse"}}},"description":"List of personal access tokens"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The authenticated principal cannot manage personal access tokens"}},"summary":"List personal access tokens","tags":["authentication"]},"post":{"description":"Creates a user-scoped personal access token and returns the raw token once. Session users may opt a new token into personal access token management. A management-enabled PAT may create tokens for its own user, but bearer-created tokens always have management disabled.","operationId":"createPersonalAccessToken","requestBody":{"content":{"application/json":{"example":{"expires_at":"2026-12-31T23:59:59Z","name":"Developer CLI"},"schema":{"$ref":"#/components/schemas/NewPersonalAccessToken"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalAccessTokenWithToken"}}},"description":"Personal access token created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The authenticated principal cannot manage personal access tokens or attempted to delegate management capability"}},"summary":"Create a personal access token","tags":["authentication"]}},"/users/profile/personal-access-tokens/{pat_slug}":{"delete":{"description":"Revokes a personal access token owned by the authenticated user. A PAT must have personal access token management enabled.","operationId":"deletePersonalAccessToken","parameters":[{"$ref":"#/components/parameters/PATSlugParam"}],"responses":{"204":{"description":"Personal access token revoked"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The authenticated principal cannot manage personal access tokens"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Personal access token not found"}},"summary":"Revoke a personal access token","tags":["authentication"]},"get":{"description":"Returns safe personal access token metadata for the authenticated user. A PAT must have personal access token management enabled. Raw tokens and token hashes are never returned.","operationId":"getPersonalAccessToken","parameters":[{"$ref":"#/components/parameters/PATSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalAccessToken"}}},"description":"Personal access token details"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The authenticated principal cannot manage personal access tokens"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Personal access token not found"}},"summary":"Get a personal access token","tags":["authentication"]},"put":{"description":"Updates safe personal access token metadata owned by the authenticated user. A management-enabled PAT may update metadata but cannot enable or disable management capability. Raw tokens and token hashes are never returned.","operationId":"updatePersonalAccessToken","parameters":[{"$ref":"#/components/parameters/PATSlugParam"}],"requestBody":{"content":{"application/json":{"example":{"name":"Developer CLI"},"schema":{"$ref":"#/components/schemas/UpdatePersonalAccessToken"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalAccessToken"}}},"description":"Personal access token updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Malformed JSON or invalid personal access token update input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The authenticated principal cannot manage personal access tokens or attempted to change management capability"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Personal access token not found"}},"summary":"Update a personal access token","tags":["authentication"]}},"/users/profile/personal-access-tokens/{pat_slug}/delete":{"post":{"description":"Permanently deletes revoked personal access token metadata owned by the authenticated session user. This remains session-only. Active tokens must be revoked before deletion. Raw tokens and token hashes are never returned.","operationId":"deleteRevokedPersonalAccessToken","parameters":[{"$ref":"#/components/parameters/PATSlugParam"}],"responses":{"204":{"description":"Revoked personal access token metadata deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Personal access token must be revoked before deletion"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"A session user is required; PATs and organization API keys cannot manage PATs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Personal access token not found"}},"summary":"Delete a revoked personal access token","tags":["authentication"]}},"/users/profile/personal-access-tokens/{pat_slug}/rotate":{"post":{"description":"Replaces a personal access token secret for the authenticated user and returns the raw token once. A PAT must have personal access token management enabled; rotation preserves the target token's management capability.","operationId":"rotatePersonalAccessToken","parameters":[{"$ref":"#/components/parameters/PATSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalAccessTokenWithToken"}}},"description":"Personal access token rotated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The authenticated principal cannot manage personal access tokens"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Personal access token not found or revoked"}},"summary":"Rotate a personal access token","tags":["authentication"]}},"/webhooks/pipelines/{receiver_id}":{"post":{"description":"Verifies the exact raw request body before parsing it, then durably accepts one bounded JSON delivery for asynchronous pipeline execution. The opaque receiver resolves all tenant and pipeline identity; raw bodies and signature material are never exposed by read APIs.","operationId":"receivePipelineWebhook","parameters":[{"description":"Opaque receiver identity issued with the webhook trigger.","in":"path","name":"receiver_id","required":true,"schema":{"maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},{"in":"header","name":"Braidplane-Webhook-Key-Version","required":true,"schema":{"pattern":"^[1-9][0-9]*$","type":"string"}},{"in":"header","name":"Braidplane-Webhook-Timestamp","required":true,"schema":{"pattern":"^[1-9][0-9]*$","type":"string"}},{"in":"header","name":"Braidplane-Webhook-Delivery-ID","required":true,"schema":{"maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._:-]+$","type":"string"}},{"in":"header","name":"Braidplane-Webhook-Signature","required":true,"schema":{"pattern":"^v1=[0-9a-f]{64}$","type":"string"}}],"responses":{"202":{"description":"Delivery durably accepted or already accepted identically"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Malformed headers, JSON, or input mapping"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Delivery verification failed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Receiver is missing or disabled"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Delivery identity was already used with different bytes"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request body exceeds the webhook delivery limit"}},"summary":"Accept a generic pipeline webhook delivery","tags":["webhooks"]}}},"servers":[{"description":"Production public API","url":"https://api.braidplane.com"},{"description":"Staging public API","url":"https://api.staging.braidplane.com"},{"description":"Authenticated application same-origin API","url":"/api"}]}