{"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"}},"NotificationConnectionSlugParam":{"description":"Slug of the managed notification connection","example":"ops-slack","in":"path","name":"notification_connection_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}},"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"}]},"AbandonProjectRepositorySetupRequest":{"additionalProperties":false,"properties":{"preserve_resources":{"description":"Acknowledge that existing or partially created resources remain in the customer's account.","enum":[true],"type":"boolean"},"setup_slug":{"$ref":"#/components/schemas/Slug"}},"required":["setup_slug","preserve_resources"],"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"},"AccountFullName":{"description":"Full display name for an account","example":"John Doe","maxLength":100,"minLength":1,"type":"string"},"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"},{"$ref":"#/components/schemas/SlackAlertDestinationConfig"}]},"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","slack"],"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":{"notification_types":{"description":"Notification types with implemented producers, suitable for policy and notification filter selectors.","items":{"$ref":"#/components/schemas/NotificationType"},"type":"array"},"source_refs":{"items":{"$ref":"#/components/schemas/AlertPolicySourceRefOption"},"type":"array"},"sources":{"items":{"$ref":"#/components/schemas/AlertPolicySourceMetadata"},"type":"array"}},"required":["notification_types","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"},"AuthenticatedUser":{"allOf":[{"$ref":"#/components/schemas/User"},{"required":["authentication_version"],"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"},"format":{"$ref":"#/components/schemas/SQLResultFormat"},"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"},"BootstrapPipelineCheckpointsRequest":{"additionalProperties":false,"description":"Environment-specific initial checkpoint envelopes; never stored in the authored pipeline. Use value for watermarks and cursor for opaque cursor sources.","properties":{"input":{"additionalProperties":true,"description":"Non-secret runtime inputs used to resolve the deployed source identity, as for normal execution.","type":"object"},"protected_environment_confirmation":{"$ref":"#/components/schemas/NullableSlug"},"request_slug":{"$ref":"#/components/schemas/Slug"},"source_seeds":{"additionalProperties":{"additionalProperties":true,"type":"object","x-go-type":"json.RawMessage"},"minProperties":1,"type":"object"}},"required":["request_slug","source_seeds"],"type":"object"},"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"},"CompileOperationalProofReceiptInput":{"additionalProperties":false,"description":"Admit a retained operational check against a selected static receipt. Does not execute a provider operation.","properties":{"selection":{"$ref":"#/components/schemas/ProofOperationalSelection"},"source_receipt_id":{"$ref":"#/components/schemas/Slug"}},"required":["source_receipt_id","selection"],"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"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","stripe":"#/components/schemas/CreateStripeDataSourceRequest"},"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"},{"$ref":"#/components/schemas/CreateStripeDataSourceRequest"}]},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"type":{"enum":["postgres"],"type":"string","x-enum-varnames":["CreatePostgresDataSourceRequestTypePostgres"]}},"required":["name","type","config","credentials"],"type":"object"},"CreateProjectRepositoryRequest":{"additionalProperties":false,"properties":{"create_private_repository":{"description":"Explicit consent to create and initialize this private repository.","enum":[true],"type":"boolean"},"owner":{"description":"Customer-owned user or nested group namespace.","maxLength":255,"minLength":1,"type":"string"},"pipeline_dir":{"default":"pipelines","maxLength":1024,"minLength":1,"type":"string"},"provider":{"enum":["github","gitlab"],"type":"string"},"repository_name":{"maxLength":100,"minLength":1,"type":"string"},"tracked_branch":{"default":"main","maxLength":255,"minLength":1,"type":"string"}},"required":["provider","owner","repository_name","create_private_repository"],"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"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"},"CreateStripeDataSourceRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/StripeConfig"},"credentials":{"$ref":"#/components/schemas/StripeCredentials"},"name":{"$ref":"#/components/schemas/Name"},"read_only":{"description":"Stripe sources are read-only.","enum":[true],"type":"boolean"},"slug":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"type":{"enum":["stripe"],"type":"string","x-enum-varnames":["CreateStripeDataSourceRequestTypeStripe"]}},"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":{"anyOf":[{"$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/UnavailableGitConfig"},{"$ref":"#/components/schemas/ProviderGitConfig"},{"$ref":"#/components/schemas/S3Config"},{"$ref":"#/components/schemas/StripeConfig"}]},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Pipeline that owns the logical ref."},"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"},{"$ref":"#/components/schemas/StripeConfig"}]},"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"},{"$ref":"#/components/schemas/StripeCredentials"}]},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Pipeline that owns this logical ref."},"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","stripe"],"example":"postgres","type":"string"},"DeploymentResolutionInput":{"additionalProperties":false,"description":"Explicit non-secret string input for a declared ODCS template parameter. Values never come from process environment or credential storage.","properties":{"revision":{"maxLength":255,"minLength":1,"type":"string"},"value":{"maxLength":4000,"type":"string"}},"required":["value","revision"],"type":"object"},"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":"Opaque request ID for debugging and log correlation","example":"550e8400-e29b-41d4-a716-446655440000","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","validate"],"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":{"backfill":{"$ref":"#/components/schemas/PipelineBackfillRequest"},"input":{"additionalProperties":true,"description":"Non-secret per-run input values keyed by names matching `[A-Za-z_][A-Za-z0-9_]*`. Numbers support up to 38 coefficient digits, 38 integer digits and 38 fractional places after exponent expansion. 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":"Explicit FTPS connection configuration (no credentials). Control and passive data channels require verified TLS; raw FTP requires the explicit local development plaintext policy.","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":"Discovered file object with optional inferred tabular fields","properties":{"fields":{"description":"Inferred tabular fields; empty for raw files or unsuccessful inference. Raw file bytes are never included.","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"},"size_bytes":{"description":"Listed object size when available.","format":"int64","minimum":0,"type":"integer"}},"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"},"repository_setup":{"$ref":"#/components/schemas/ProjectRepositorySetup"},"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"},"GitHubAppExistingInstallationAuthorizationRequest":{"additionalProperties":false,"properties":{"account_login":{"maxLength":39,"minLength":1,"pattern":"^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?$","type":"string"},"more_time":{"description":"Allow 100 minutes for the Core callback instead of 10.","type":"boolean"}},"required":["account_login"],"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 Docs/Slides support structured read, blank create, literal text replacement and PDF export; filename upsert and arbitrary provider requests 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":{"operation":{"enum":["read","export"]},"resource":{"enum":["document","presentation"]}},"required":["file_id"]},{"properties":{"operation":{"enum":["create"]},"resource":{"enum":["document","presentation"]}},"required":["folder_id","name"]},{"properties":{"content":{"type":"string"},"operation":{"enum":["update"]},"resource":{"enum":["document","presentation"]}},"required":["file_id","match_text","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"},"match_text":{"maxLength":10000,"minLength":1,"type":"string"},"mime_type":{"maxLength":256,"type":"string"},"name":{"maxLength":256,"minLength":1,"type":"string"},"operation":{"enum":["list","read","create","update","export"],"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","document","presentation"],"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"},"HTTPAcknowledgement":{"additionalProperties":false,"description":"Opt-in response acknowledgement. All status and JSON checks must pass before execution succeeds. Failed or missing evidence never proves a write had no effect.","properties":{"empty_fields":{"description":"Field names checked recursively throughout the JSON response, including records in objects or arrays. Each occurrence must be null, an empty object or an empty array. Absent fields are allowed; nonempty or scalar values reject acknowledgement.","items":{"maxLength":64,"minLength":1,"type":"string"},"maxItems":8,"type":"array","uniqueItems":true},"status_codes":{"items":{"maximum":299,"minimum":200,"type":"integer"},"maxItems":16,"minItems":1,"type":"array","uniqueItems":true},"success":{"description":"Use an empty array with no empty_fields to confirm delivery by status alone.","items":{"$ref":"#/components/schemas/HTTPAcknowledgementCheck"},"maxItems":8,"type":"array"}},"required":["status_codes","success"],"type":"object"},"HTTPAcknowledgementCheck":{"additionalProperties":false,"properties":{"equals":{"description":"Required non-null JSON string, boolean or number. Strings and booleans compare by type and value; numbers require the exact JSON number representation. Templates are not expanded.","x-go-type":"json.RawMessage"},"path":{"description":"Object-only dot path in the JSON response body; maximum 16 segments. Missing fields and non-object traversal fail acknowledgement.","maxLength":256,"minLength":1,"pattern":"^[^.*\\[\\]{}]+(\\.[^.*\\[\\]{}]+){0,15}$","type":"string"}},"required":["path","equals"],"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. Requires HTTPS unless the explicit local development plaintext policy is enabled.","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":{"api_key":{"description":"API key stored through the encrypted credential lifecycle; never put it in a saved operation.","minLength":1,"type":"string","writeOnly":true},"api_key_header":{"description":"Required with api_key. X-Api-Key sends the key directly; Authorization sends ApiKey followed by the key. Mutually exclusive with Bearer, Basic and OAuth authentication.","enum":["X-Api-Key","Authorization"],"type":"string"},"bearer_token":{"description":"Bearer token used as Authorization header","example":"token-123","minLength":1,"type":"string"},"oauth":{"$ref":"#/components/schemas/HTTPOAuthCredentials"},"password":{"description":"Password for HTTP basic authentication","example":"secret","minLength":1,"type":"string"},"secret_headers":{"additionalProperties":{"maxLength":4096,"minLength":1,"type":"string"},"description":"Named secret HTTP headers, encrypted and write-only. Mutually exclusive with all other authentication methods. Header names are case-insensitive and must be unique; transport, cookie and content headers are reserved. Operation headers must not overlap.","maxProperties":8,"minProperties":1,"type":"object","writeOnly":true},"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"},"HTTPOAuthConnection":{"additionalProperties":false,"properties":{"data_source":{"$ref":"#/components/schemas/DataSource"},"install":{"$ref":"#/components/schemas/ProviderConnectorInstall"}},"required":["data_source"],"type":"object"},"HTTPOAuthCredentials":{"additionalProperties":false,"description":"Write-only organization/source-scoped OAuth app settings. Mutually exclusive with bearer and basic credentials. Saving creates a pending source; connect it to acquire a grant. Endpoints and destination must use HTTPS. Settings are never returned.","properties":{"audience":{"minLength":1,"type":"string"},"authorization_endpoint":{"description":"Required for authorization_code. The provider must return the configured issuer in its callback iss parameter.","format":"uri","type":"string"},"client_id":{"minLength":1,"type":"string"},"client_secret":{"description":"Required for client_credentials; optional for public PKCE clients. Replacing settings requires the complete app configuration, including any client secret.","minLength":1,"type":"string"},"grant_type":{"enum":["authorization_code","client_credentials"],"type":"string"},"issuer":{"format":"uri","type":"string"},"revocation_endpoint":{"format":"uri","type":"string"},"scopes":{"items":{"minLength":1,"type":"string"},"type":"array"},"token_endpoint":{"format":"uri","type":"string"}},"required":["issuer","token_endpoint","client_id","grant_type"],"type":"object"},"HTTPOperationDraft":{"description":"Reviewable HTTP query fields generated from imported metadata. No operation executes until explicitly requested. The configured data source base URL and credentials remain authoritative.","properties":{"parameters":{"items":{"$ref":"#/components/schemas/QueryParameter"},"type":"array"},"statement":{"$ref":"#/components/schemas/HTTPStatement"}},"required":["statement","parameters"],"type":"object"},"HTTPPagination":{"additionalProperties":false,"description":"GET-only bounded cursor, page-number or next-link draining. Choose exactly one traversal pattern. The final envelope contains all selected records; traversal is separate from incremental checkpoints.","oneOf":[{"not":{"anyOf":[{"required":["page_param"]},{"required":["page_size_param"]},{"required":["page_size"]},{"required":["total_pages_path"]},{"required":["page_number_path"]},{"required":["next_link_path"]}]},"required":["cursor_param","next_cursor_path"]},{"not":{"anyOf":[{"required":["cursor_param"]},{"required":["next_cursor_path"]},{"required":["next_link_path"]}]},"required":["page_param","page_size_param","page_size","total_pages_path","page_number_path"]},{"not":{"anyOf":[{"required":["cursor_param"]},{"required":["next_cursor_path"]},{"required":["page_param"]},{"required":["page_size_param"]},{"required":["page_size"]},{"required":["total_pages_path"]},{"required":["page_number_path"]}]},"required":["next_link_path"]}],"properties":{"cursor_param":{"description":"Query parameter receiving the next opaque string cursor; an existing query_params value seeds the first request.","minLength":1,"type":"string"},"max_pages":{"description":"Fail rather than return partial success when more pages remain.","maximum":1000,"minimum":1,"type":"integer"},"next_cursor_path":{"description":"Object-only dot path selecting the next string cursor; distinct from an incremental checkpoint.","pattern":"^[^.*\\[\\]]+(\\.[^.*\\[\\]]+)*$","type":"string"},"next_link_path":{"description":"Object-only JSON dot path selecting a next URL string. Missing, null or empty ends traversal. Relative links resolve against the last response URL. Links must retain the original origin, contain no user information or fragment, and satisfy destination and OAuth restrictions. Link queries replace authored query parameters; preserve any fixed incremental window in provider links.","pattern":"^[^.*\\[\\]]+(\\.[^.*\\[\\]]+)*$","type":"string"},"page_number_path":{"description":"Object-only dot path selecting the integer response page number; must equal the requested page, including for an empty result.","pattern":"^[^.*\\[\\]]+(\\.[^.*\\[\\]]+)*$","type":"string"},"page_param":{"description":"Query parameter for page number; starts at 1 and advances by 1.","minLength":1,"type":"string"},"page_size":{"maximum":10000,"minimum":1,"type":"integer"},"page_size_param":{"description":"Query parameter for the explicitly requested page size; distinct from page_param.","minLength":1,"type":"string"},"records_path":{"description":"Object-only dot path selecting a JSON array, without array indexing or wildcards.","pattern":"^[^.*\\[\\]]+(\\.[^.*\\[\\]]+)*$","type":"string"},"timeout_seconds":{"description":"Whole drain deadline including response reads, retries, and backoff; an earlier execution deadline wins.","maximum":300,"minimum":1,"type":"integer"},"total_pages_path":{"description":"Object-only dot path selecting the nonnegative integer total page count. Zero is valid only on an empty first page. Missing or changing totals fail without partial results.","pattern":"^[^.*\\[\\]]+(\\.[^.*\\[\\]]+)*$","type":"string"}},"required":["records_path","max_pages","timeout_seconds"],"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":{"acknowledgement":{"$ref":"#/components/schemas/HTTPAcknowledgement"},"body":{"description":"Request body (JSON object or {{paramName}} placeholders)","example":{"filter":"{{filter}}"}},"headers":{"additionalProperties":{"type":"string"},"description":"Non-secret HTTP headers (supports {{paramName}} placeholders in values); keep authentication values in encrypted data-source credentials.","example":{"Content-Type":"application/json"},"type":"object"},"method":{"description":"HTTP method","enum":["GET","POST","PUT","DELETE","PATCH","HEAD"],"example":"GET","type":"string"},"pagination":{"$ref":"#/components/schemas/HTTPPagination"},"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"},"write_retry":{"$ref":"#/components/schemas/HTTPWriteRetry"}},"required":["type","method","path"],"type":"object"},"HTTPWriteRetry":{"additionalProperties":false,"description":"Explicit operator attestation of a verified provider idempotency contract. Only saved pipeline sink operations with idempotent_with_key and a durable effect claim may use this policy. Requires the configured header to bind exactly to {{runtime.sink.idempotency_key}}. The provider must deduplicate the same destination, method, key and payload, return the original outcome, and reject changed payloads. Automatic repetition stops when retention from the original durable claim expires. This is not a universal exactly-once guarantee.","properties":{"key_header":{"maxLength":128,"minLength":1,"type":"string"},"payload_conflict":{"enum":["reject"],"type":"string"},"provider_contract_url":{"description":"HTTPS documentation for the verified provider contract; recorded as a reference and never fetched by execution.","format":"uri","type":"string"},"retention_seconds":{"description":"Verified minimum provider key retention, from the first durable effect claim, within the same provider account and destination scope.","maximum":604800,"minimum":1,"type":"integer"},"verified":{"enum":[true],"type":"boolean"}},"required":["verified","provider_contract_url","key_header","retention_seconds","payload_conflict"],"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"},"ManagedMemberInvitationAcceptanceTokenRequest":{"additionalProperties":false,"description":"One-time invitation token and distribution account policy acceptance received out of band","properties":{"terms_accepted":{"description":"Explicit confirmation that the displayed terms and privacy notice were accepted.","enum":[true],"type":"boolean","x-go-type-skip-optional-pointer":true},"terms_document_version":{"description":"Version identifier displayed when acceptance was collected.","example":"pre-alpha-2026-07-19","minLength":1,"type":"string","x-go-type-skip-optional-pointer":true},"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"},"ManagedNewUser":{"additionalProperties":false,"properties":{"email":{"$ref":"#/components/schemas/Email"},"full_name":{"$ref":"#/components/schemas/Name"},"password":{"$ref":"#/components/schemas/Password"},"terms_acceptance":{"$ref":"#/components/schemas/ManagedTermsAcceptanceRequest","x-go-type-skip-optional-pointer":true},"turnstile_response":{"description":"Cloudflare Turnstile proof required before public password signup.","maxLength":2048,"minLength":1,"type":"string"}},"required":["full_name","email","password"],"type":"object"},"ManagedTermsAcceptanceRequest":{"additionalProperties":false,"description":"Versioned acceptance when required by the distribution account policy.","properties":{"terms_accepted":{"description":"Explicit confirmation that the displayed terms and privacy notice were accepted.","enum":[true],"type":"boolean","x-go-type-skip-optional-pointer":true},"terms_document_version":{"description":"Version identifier displayed when acceptance was collected.","example":"pre-alpha-2026-07-19","minLength":1,"type":"string","x-go-type-skip-optional-pointer":true}},"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 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"},"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). Uses certificate-verified TLS unless the explicit local development plaintext policy is enabled.","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). Uses certificate-verified TLS unless the explicit local development plaintext policy is enabled.","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":{"format":{"$ref":"#/components/schemas/SQLResultFormat"},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug; auto-generated from name when omitted."},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug; auto-generated from name when omitted."},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided)"}},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided)"}},"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"},"NewNotificationConnection":{"additionalProperties":false,"example":{"name":"Operations Slack","provider":"slack","slug":"ops-slack"},"properties":{"name":{"$ref":"#/components/schemas/Name"},"provider":{"$ref":"#/components/schemas/NotificationProvider"},"slug":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional resource identifier. Generated from name when omitted; collisions receive a random suffix."}},"required":["name","provider"],"type":"object"},"NewODCSContract":{"additionalProperties":false,"properties":{"name":{"maxLength":255,"minLength":1,"type":"string"},"odcs_id":{"maxLength":255,"minLength":1,"type":"string"},"slug":{"description":"Optional resource identifier. Generated from name when omitted; ODCS semantic identity is still required.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}},"required":["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":{"description":"Optional resource identifier. Generated from revision- plus the document version when omitted; collisions receive a random suffix.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}},"required":["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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens)"}},"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, webhook or completion trigger definition.","not":{"anyOf":[{"$ref":"#/components/schemas/PipelineTriggerScheduleWithoutScheduleConfig"},{"$ref":"#/components/schemas/PipelineTriggerWebhookWithoutWebhookConfig"},{"$ref":"#/components/schemas/PipelineTriggerCompletionWithoutCompletionConfig"},{"$ref":"#/components/schemas/PipelineTriggerCompletionWithOtherConfig"},{"$ref":"#/components/schemas/PipelineTriggerOtherWithCompletionConfig"},{"$ref":"#/components/schemas/PipelineTriggerScheduleWithWebhookConfig"},{"$ref":"#/components/schemas/PipelineTriggerWebhookWithScheduleConfig"}]},"properties":{"completion":{"$ref":"#/components/schemas/PipelineTriggerCompletionConfig"},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided)"},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided)"}},"required":["name"],"type":"object"},"NewQuery":{"additionalProperties":false,"allOf":[{"not":{"required":["expected_input_contract","expected_input_contract_ref"]}},{"not":{"required":["output_contract","output_contract_ref"]}}],"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":{"allOf":[{"$ref":"#/components/schemas/PipelineSchemaContract"}],"description":"Optional expected input payload contract for using this saved query as a sink operation."},"expected_input_contract_ref":{"allOf":[{"$ref":"#/components/schemas/PipelineODCSContractRef"}],"description":"Optional exact ODCS sink input requirement, exclusive with expected_input_contract. Resolved in the consuming pipeline project when composition is enabled."},"name":{"description":"Human-readable name of the query","example":"Get Active Users","maxLength":255,"minLength":1,"type":"string"},"output_contract":{"allOf":[{"$ref":"#/components/schemas/PipelineSchemaContract"}],"description":"Optional saved query output promise, checked after execution independently of the step promise. Requires contract composition."},"output_contract_ref":{"allOf":[{"$ref":"#/components/schemas/PipelineODCSContractRef"}],"description":"Optional exact ODCS output promise, exclusive with output_contract. Requires contract composition."},"parameters":{"default":[],"description":"Parameter definitions for the query","items":{"$ref":"#/components/schemas/QueryParameter"},"type":"array"},"query_statement":{"allOf":[{"$ref":"#/components/schemas/QueryStatement"}],"description":"The query to execute with type-specific structure"},"row_limit":{"default":0,"description":"Optional row quota; 0 uses operator policy (max_result_rows for materialized output, stream_max_rows for SQL file output). A positive value adds a smaller quota. 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":0,"type":"integer"},"slug":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug (auto-generated from name if not provided using lowercase and hyphens; if collision occurs, a random suffix is appended)"},"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/AccountFullName"},"password":{"$ref":"#/components/schemas/Password"}},"required":["full_name","email","password"],"type":"object"},"NotificationConnection":{"additionalProperties":false,"example":{"metadata":{"channel_id":"CTEST","channel_name":"#operations","workspace_id":"TTEST","workspace_name":"Synthetic workspace"},"name":"Operations Slack","provider":"slack","slug":"ops-slack","status":"active","updated_at":"2026-10-19T10:00:00Z"},"properties":{"metadata":{"$ref":"#/components/schemas/NotificationConnectionMetadata"},"name":{"$ref":"#/components/schemas/Name"},"provider":{"$ref":"#/components/schemas/NotificationProvider"},"slug":{"$ref":"#/components/schemas/Slug"},"status":{"$ref":"#/components/schemas/CredentialStatus"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["slug","name","provider","status","metadata","updated_at"],"type":"object"},"NotificationConnectionMetadata":{"description":"Safe metadata for the selected notification provider. Never includes credentials.","oneOf":[{"$ref":"#/components/schemas/SlackNotificationConnectionMetadata"}]},"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"},"NotificationProvider":{"description":"Managed notification provider. Slack is currently supported.","enum":["slack"],"type":"string","x-enum-varnames":["NotificationProviderSlack"]},"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","pipeline.run_succeeded"],"example":"pipeline.retry_exhausted","type":"string","x-enum-varnames":["NotificationTypeUnknown","NotificationTypePipelineRunFailed","NotificationTypePipelineRetryExhausted","NotificationTypePipelineScheduledRunDelayed","NotificationTypePipelineScheduledRunMissing","NotificationTypePipelineFreshnessSLABreached","NotificationTypePipelineContractFailure","NotificationTypePipelineRunSucceeded"]},"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"},"ODCSArtifact":{"properties":{"artifact_digest":{"type":"string"},"commit":{"type":"string"},"contract_slug":{"type":"string"},"digest":{"type":"string"},"format":{"enum":["json","yaml"],"type":"string"},"original":{"format":"byte","type":"string"},"path":{"type":"string"},"revision_slug":{"type":"string"},"source_repo":{"description":"Public repository identity or an opaque artifact locator when historical provenance cannot be displayed safely.","type":"string"}},"required":["contract_slug","revision_slug","path","format","digest","artifact_digest","original","source_repo","commit"],"type":"object"},"ODCSArtifactImport":{"properties":{"applied":{"type":"boolean"},"artifacts":{"items":{"$ref":"#/components/schemas/ODCSArtifact"},"type":"array"},"commit":{"type":"string"}},"required":["commit","applied","artifacts"],"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":{"description":"Exact attachment identity, including input, output and input:\u003cname\u003e for independent named requirements.","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"},"ODCSDeclarationCoverage":{"additionalProperties":false,"properties":{"applicability":{"enum":["document","selected_port","not_selected"],"type":"string"},"path":{"description":"Safe positional declaration identity within the exact revision digest; opaque keys are not echoed.","type":"string"},"reason":{"type":"string"},"runtime_scope":{"type":"string"},"state":{"enum":["enforced","descriptive","unsupported","unresolved"],"type":"string"}},"required":["path","state","reason","applicability"],"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"},"ODCSImpactPlanSelection":{"additionalProperties":false,"properties":{"digest":{"pattern":"^sha256:[a-f0-9]{64}$","type":"string"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"projection_input":{"description":"Exact zero-based projection input from retained plan inspection. Required when the requested object has multiple mappings; omission never chooses the first match.","maximum":63,"minimum":0,"type":"integer"}},"required":["pipeline_slug","digest"],"type":"object"},"ODCSInspectionDiagnostic":{"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"}},"required":["code","path","message"],"type":"object"},"ODCSObjectImpact":{"properties":{"changes":{"items":{"$ref":"#/components/schemas/ODCSImpactChange"},"type":"array"},"comparison":{"enum":["supported","unsupported"],"type":"string"},"comparison_scope":{"description":"A selected projection compares only the exact retained executable selection. It does not establish runtime conformance or delivery.","enum":["flat_revision","selected_projection"],"type":"string"},"diagnostics":{"items":{"$ref":"#/components/schemas/ODCSImpactDiagnostic"},"type":"array"},"schema_object_id":{"type":"string"}},"required":["schema_object_id","comparison","changes","diagnostics"],"type":"object"},"ODCSProjectionInputSelection":{"additionalProperties":false,"properties":{"contract_slug":{"$ref":"#/components/schemas/Slug"},"digest":{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"},"mapping":{"$ref":"#/components/schemas/ODCSProjectionMapping"},"revision_slug":{"allOf":[{"$ref":"#/components/schemas/Slug"},{"not":{"enum":["latest"]}}]},"schema_object_id":{"maxLength":4096,"minLength":1,"type":"string"},"variables":{"additionalProperties":{"additionalProperties":false,"properties":{"revision":{"maxLength":4096,"minLength":1,"type":"string"},"value":{"maxLength":1048576,"type":"string"}},"required":["value","revision"],"type":"object"},"maxProperties":128,"type":"object"}},"required":["contract_slug","revision_slug","schema_object_id","digest","mapping"],"type":"object"},"ODCSProjectionMapping":{"additionalProperties":false,"description":"Explicit versioned capability/mapping declaration captured in the plan. This does not grant data-source authority or establish provider behavior. Unsupported or conflicting declarations fail compilation.","properties":{"id":{"maxLength":4096,"minLength":1,"type":"string"},"physical":{"additionalProperties":{"additionalProperties":false,"properties":{"bits":{"maximum":128,"minimum":0,"type":"integer"},"kind":{"$ref":"#/components/schemas/ODCSStructuralKind"},"logical_type":{"maxLength":4096,"minLength":1,"type":"string"},"precision":{"maximum":1000,"minimum":0,"type":"integer"},"scale":{"maximum":1000,"minimum":0,"type":"integer"}},"required":["logical_type","kind"],"type":"object"},"maxProperties":16384,"type":"object"},"representation":{"enum":["rows","json","csv"],"type":"string"},"root_shape":{"description":"Required for JSON; omitted for rows and CSV.","enum":["array","object"],"type":"string"},"types":{"items":{"$ref":"#/components/schemas/ODCSStructuralKind"},"maxItems":14,"minItems":1,"type":"array","uniqueItems":true}},"required":["id","representation","types"],"type":"object"},"ODCSProjectionSelection":{"additionalProperties":false,"properties":{"inputs":{"items":{"$ref":"#/components/schemas/ODCSProjectionInputSelection"},"maxItems":64,"minItems":1,"type":"array"},"relationships":{"items":{"additionalProperties":false,"properties":{"input":{"maximum":63,"minimum":0,"type":"integer"},"path":{"maxLength":4096,"minLength":1,"type":"string"},"target":{"maximum":63,"minimum":0,"type":"integer"}},"required":["input","target","path"],"type":"object"},"maxItems":16384,"type":"array"}},"required":["inputs"],"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_plan":{"$ref":"#/components/schemas/ODCSImpactPlanSelection"},"from_revision_slug":{"type":"string"},"objects":{"items":{"$ref":"#/components/schemas/ODCSObjectImpact"},"type":"array"},"project_slug":{"type":"string"},"to_digest":{"type":"string"},"to_plan":{"$ref":"#/components/schemas/ODCSImpactPlanSelection"},"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,"description":"Compare immutable catalog revisions. Supply both exact retained plan selections to compare rich executable projections, including mapping and resolution changes. Never selects a plan by authored hash or resolves current bindings.","not":{"oneOf":[{"required":["from_plan"]},{"required":["to_plan"]}]},"properties":{"from_plan":{"$ref":"#/components/schemas/ODCSImpactPlanSelection"},"from_revision_slug":{"$ref":"#/components/schemas/Slug"},"to_plan":{"$ref":"#/components/schemas/ODCSImpactPlanSelection"},"to_revision_slug":{"$ref":"#/components/schemas/Slug"}},"required":["from_revision_slug","to_revision_slug"],"type":"object"},"ODCSRevisionInspection":{"additionalProperties":false,"properties":{"compiler_id":{"type":"string"},"coverage":{"items":{"$ref":"#/components/schemas/ODCSDeclarationCoverage"},"maxItems":16384,"type":"array"},"coverage_complete":{"type":"boolean"},"diagnostics":{"items":{"$ref":"#/components/schemas/ODCSInspectionDiagnostic"},"type":"array"},"document_valid":{"type":"boolean"},"projection_available":{"description":"A complete selected structural mapping exists; does not mean the complete agreement is enforced or any execution passed.","type":"boolean"},"revision":{"$ref":"#/components/schemas/ODCSRevision"},"schema_object_id":{"type":"string"},"shape":{"allOf":[{"$ref":"#/components/schemas/PipelineSchemaContract"}],"description":"Supported flat executable shape for this exact revision digest and selected object. Absent when projection is unavailable. Representation and root shape must be selected explicitly on the pipeline reference. This is structural evidence, not full agreement enforcement or destination delivery."}},"required":["revision","compiler_id","schema_object_id","document_valid","coverage_complete","projection_available","coverage","diagnostics"],"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"},"ODCSStructuralKind":{"enum":["object","array","map","vector","string","boolean","integer","decimal","number","date","local_time","local_datetime","instant"],"type":"string"},"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"},"diagnostics":{"description":"Reasons this operation cannot safely generate a query draft. Refresh older imports to generate draft metadata.","items":{"type":"string"},"type":"array"},"draft":{"$ref":"#/components/schemas/HTTPOperationDraft"},"id":{"description":"Operation ID from OpenAPI spec","example":"listUsers","type":"string"},"method":{"description":"HTTP method","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"],"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"},"name":{"$ref":"#/components/schemas/Name"},"slug":{"$ref":"#/components/schemas/Slug"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["name","slug","created_at","updated_at"],"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!","maxLength":1024,"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},"has_pending_spec":{"description":"Whether any member has a saved draft of this project pipeline. Draft contents remain member-scoped.","type":"boolean"},"spec":{"$ref":"#/components/schemas/PipelineSpec"}},"required":["spec"],"type":"object"}]},"PipelineBackfillRequest":{"additionalProperties":false,"description":"One bounded historical run. Every incremental source requires a window. Replay-safe sinks are required. Never advances normal checkpoints. Reusing a run_slug returns a conflict rather than executing twice.","properties":{"source_windows":{"additionalProperties":{"$ref":"#/components/schemas/PipelineBackfillWindow"},"minProperties":1,"type":"object"}},"required":["source_windows"],"type":"object"},"PipelineBackfillWindow":{"additionalProperties":false,"description":"Source bounds in normalized checkpoint envelopes; use value for watermarks or cursor for opaque cursors. Source operations must bind both runtime.incremental bounds.","properties":{"lower_bound":{"additionalProperties":true,"type":"object","x-go-type":"json.RawMessage"},"upper_bound":{"additionalProperties":true,"type":"object","x-go-type":"json.RawMessage"}},"required":["lower_bound","upper_bound"],"type":"object"},"PipelineComparisonFinding":{"properties":{"message":{"description":"Semantic change with spec values omitted.","type":"string"},"severity":{"$ref":"#/components/schemas/PipelineComparisonSeverity"}},"required":["severity","message"],"type":"object"},"PipelineComparisonSeverity":{"enum":["safe","warning","breaking"],"type":"string"},"PipelineCompilationRequest":{"additionalProperties":false,"properties":{"projection":{"$ref":"#/components/schemas/ODCSProjectionSelection"},"resource_scopes":{"items":{"$ref":"#/components/schemas/PipelineResourceScopeSelection"},"maxItems":128,"type":"array"}},"type":"object"},"PipelineCompiledPlan":{"description":"Exact portable compiled identity. Contains no authored bodies, operation bodies, secret values or template values.","properties":{"admission_enabled":{"type":"boolean"},"compiler_id":{"type":"string"},"digest":{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"},"operations":{"items":{"$ref":"#/components/schemas/PipelineOperationInspection"},"type":"array"},"pins":{"items":{"$ref":"#/components/schemas/PipelineContractPinInspection"},"type":"array"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"projections":{"description":"Safe retained projection selectors. Resolution values, declarations and physical mapping contents are omitted.","items":{"$ref":"#/components/schemas/PipelineProjectionInspection"},"type":"array"},"source_commit":{"type":"string"},"source_path":{"type":"string"},"spec_hash":{"type":"string"},"status":{"enum":["available","unsupported"],"type":"string"},"structural_policy_id":{"type":"string"}},"required":["digest","spec_hash","pipeline_slug","status","admission_enabled","pins","operations"],"type":"object"},"PipelineCompletionAttempt":{"additionalProperties":false,"properties":{"attempt_number":{"type":"integer"},"deployment_revision":{"format":"int64","nullable":true,"type":"integer"},"run_slug":{"$ref":"#/components/schemas/Slug"},"status":{"type":"string"},"version_hash":{"type":"string"}},"required":["run_slug","attempt_number","status","version_hash","deployment_revision"],"type":"object"},"PipelineCompletionCondition":{"description":"Authoritative logical-root outcome after automatic retries.","enum":["success","final_failure"],"type":"string","x-enum-varnames":["PipelineCompletionConditionSuccess","PipelineCompletionConditionFinalFailure"]},"PipelineCompletionDecision":{"additionalProperties":false,"description":"Safe persisted dispatch projection. No internal IDs, authority facts, materialization or runtime values are exposed. Null child_run_slug means no child was accepted.","properties":{"child_outcome":{"description":"Authoritative child logical closure outcome, absent until its root closes.","nullable":true,"type":"string"},"child_run_slug":{"$ref":"#/components/schemas/NullableSlug"},"child_status":{"description":"Initial accepted child attempt status; a failed attempt can still be waiting for retry.","nullable":true,"type":"string"},"condition":{"allOf":[{"$ref":"#/components/schemas/PipelineCompletionCondition"}],"description":"Captured condition, null after historical configuration retention.","nullable":true},"decision_reason":{"nullable":true,"type":"string"},"downstream_pipeline_slug":{"$ref":"#/components/schemas/Slug"},"final_attempt_run_slug":{"$ref":"#/components/schemas/Slug"},"root_run_slug":{"$ref":"#/components/schemas/Slug"},"selected_deployment_revision":{"format":"int64","nullable":true,"type":"integer"},"selected_resolution_digest":{"nullable":true,"type":"string"},"selected_version_hash":{"nullable":true,"type":"string"},"state":{"description":"Persisted dispatch state; separate from child outcome.","type":"string"},"trigger_revision":{"format":"int64","type":"integer"},"trigger_slug":{"$ref":"#/components/schemas/Slug"},"upstream_pipeline_slug":{"$ref":"#/components/schemas/Slug"}},"required":["trigger_slug","trigger_revision","upstream_pipeline_slug","root_run_slug","final_attempt_run_slug","downstream_pipeline_slug","condition","state","decision_reason","child_run_slug","child_status","child_outcome","selected_version_hash","selected_deployment_revision","selected_resolution_digest"],"type":"object"},"PipelineConnectedRun":{"additionalProperties":false,"properties":{"completion":{"$ref":"#/components/schemas/PipelineRunCompletion"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"}},"required":["pipeline_slug","completion"],"type":"object"},"PipelineContractPinInspection":{"properties":{"compiler_id":{"type":"string"},"contract_slug":{"$ref":"#/components/schemas/Slug"},"digest":{"type":"string"},"origin":{"enum":["step","operation"],"type":"string"},"port":{"type":"string"},"representation":{"type":"string"},"revision_slug":{"$ref":"#/components/schemas/Slug"},"root_shape":{"type":"string"},"schema_object_id":{"type":"string"},"step":{"$ref":"#/components/schemas/Slug"}},"required":["step","port","origin","contract_slug","revision_slug","schema_object_id","digest","compiler_id","representation","root_shape"],"type":"object"},"PipelineCreationProposal":{"properties":{"branch_head_sha":{"type":"string"},"branch_name":{"type":"string"},"failure_code":{"type":"string"},"initiating_member":{"$ref":"#/components/schemas/Slug"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"project_slug":{"$ref":"#/components/schemas/Slug"},"proposal_provider":{"type":"string"},"proposal_state":{"type":"string"},"proposal_url":{"type":"string"},"slug":{"$ref":"#/components/schemas/Slug"},"source_path":{"type":"string"},"spec":{"allOf":[{"$ref":"#/components/schemas/PipelineSpec"}],"description":"Immutable proposed definition for review and exact retry; not a canonical imported version."},"spec_hash":{"description":"Hash of the normalized proposed definition; not a canonical version identity.","type":"string"},"status":{"description":"Last recorded publication status, not live provider state or deployment readiness.","enum":["publish_queued","proposal_open","branch_pushed","publish_failed"],"type":"string","x-enum-varnames":["CreationPublishQueued","CreationProposalOpen","CreationBranchPushed","CreationPublishFailed"]}},"required":["slug","project_slug","pipeline_slug","initiating_member","source_path","spec_hash","spec","status"],"type":"object"},"PipelineCreationProposalListResponse":{"properties":{"has_more":{"type":"boolean"},"next_cursor":{"$ref":"#/components/schemas/Slug"},"pipeline_creations":{"items":{"$ref":"#/components/schemas/PipelineCreationProposal"},"type":"array"}},"required":["pipeline_creations","has_more"],"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Pipeline that owns the logical ref."},"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_resolution_digest":{"description":"Exact immutable target resolution; absent for historical flat deployments.","nullable":true,"type":"string"},"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_resolution_digest":{"description":"Prior target resolution, retained for explicit revalidation and rollback.","nullable":true,"type":"string"},"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},"revision":{"description":"Monotonically increasing deployment revision, including same-spec changes.","format":"int64","type":"integer"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["pipeline_slug","project_slug","environment_slug","revision","current_resolution_digest","previous_resolution_digest","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"},"PipelineDeploymentComparison":{"properties":{"baseline_spec_hash":{"description":"Full immutable version identifier recorded by the deployment.","type":"string"},"candidate_spec_hash":{"description":"SHA-256 of the parsed candidate spec serialized as JSON.","type":"string"},"deployed_at":{"format":"date-time","type":"string"},"deployment_revision":{"format":"int64","type":"integer"},"environment_slug":{"type":"string"},"findings":{"items":{"$ref":"#/components/schemas/PipelineComparisonFinding"},"type":"array"},"organization_slug":{"type":"string"},"pipeline_slug":{"type":"string"},"project_slug":{"type":"string"},"severity":{"$ref":"#/components/schemas/PipelineComparisonSeverity"}},"required":["organization_slug","project_slug","environment_slug","pipeline_slug","deployment_revision","deployed_at","baseline_spec_hash","candidate_spec_hash","severity","findings"],"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,"allOf":[{"not":{"required":["resolution_digest","resolution_inputs"]}},{"not":{"required":["resolution_digest","compiled_plan_digest"]}}],"description":"Request to deploy an existing immutable pipeline version to one environment.","properties":{"compiled_plan_digest":{"description":"Exact stored portable compiled plan selected for a new resolution. Requires contract composition to be enabled.","example":"sha256:6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","pattern":"^sha256:[0-9a-f]{64}$","type":"string"},"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"},"expected_revision":{"description":"Compare-and-swap guard independent of spec hash. Zero requires no existing deployment; a positive revision must match the current deployment, including same-spec updates.","format":"int64","minimum":0,"type":"integer"},"proof_receipt_slug":{"$ref":"#/components/schemas/NullableSlug"},"protected_environment_confirmation":{"$ref":"#/components/schemas/NullableSlug"},"resolution_digest":{"description":"Exact stored resolution to revalidate and select for future work. Used for rollback; never rewinds writes, replay identity or checkpoints.","example":"sha256:6d7b6f5f6c8d9b77f7a4a6c8d8b9f2a1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8","pattern":"^sha256:[0-9a-f]{64}$","type":"string"},"resolution_inputs":{"additionalProperties":{"$ref":"#/components/schemas/DeploymentResolutionInput"},"description":"Values and source revisions for parameter names declared by the selected portable template. Rollback reloads its stored inputs and cannot override them.","maxProperties":128,"type":"object"},"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","branch_pushed","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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Authenticated Braidplane member who initiated the current proposal attempt."},"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":"Publication backend; git records a pushed branch without a PR or MR.","enum":["github","gitlab","git"],"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 publishing a proposal branch, optionally with a provider-native pull or merge request.","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":"Identity mode immutably selected for the current proposal attempt; repository_credential uses the configured plain Git connection without a provider principal.","enum":["delegated_user","organization_service","repository_credential"],"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"},"PipelineInputContractAttachment":{"additionalProperties":false,"description":"Independent requirement for one named transform input. Property names belong to the dataset, without SQL relation prefixes.","oneOf":[{"required":["contract"]},{"required":["contract_ref"]}],"properties":{"contract":{"allOf":[{"$ref":"#/components/schemas/PipelineSchemaContract"},{"properties":{"representation":{"enum":["rows","json","csv"],"type":"string"}},"type":"object"}]},"contract_ref":{"allOf":[{"$ref":"#/components/schemas/PipelineODCSContractRef"},{"properties":{"representation":{"enum":["rows","json","csv"],"type":"string"}},"type":"object"}]}},"type":"object"},"PipelineInputSpec":{"additionalProperties":false,"description":"Declares the one run-scoped JSON payload accepted by this pipeline.","not":{"anyOf":[{"$ref":"#/components/schemas/PipelineInputSpecWithNonJSONOutputContract"}]},"oneOf":[{"required":["output_contract"]},{"required":["output_contract_ref"]}],"properties":{"output_contract":{"$ref":"#/components/schemas/PipelineSchemaContract"},"output_contract_ref":{"allOf":[{"$ref":"#/components/schemas/PipelineODCSContractRef"},{"properties":{"representation":{"enum":["json"],"type":"string"}},"required":["representation","root_shape"],"type":"object"}],"description":"Exact ODCS reference with JSON representation and an explicit object or array root_shape."}},"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":{"enum":["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"},"PipelineOperationInspection":{"properties":{"digest":{"type":"string"},"operation_slug":{"$ref":"#/components/schemas/Slug"},"resource_scope":{"$ref":"#/components/schemas/PipelineResourceScopeInspection"},"revision":{"type":"string"},"role":{"type":"string"},"step":{"$ref":"#/components/schemas/Slug"}},"required":["step","role","operation_slug","revision","digest"],"type":"object"},"PipelineOperationalCapabilities":{"additionalProperties":false,"description":"Supported operational capabilities and producer selectors.","properties":{"notification_types":{"items":{"$ref":"#/components/schemas/NotificationType"},"type":"array"},"successful_run_recency":{"description":"Whether this server supports successful-run recency, independent of each target's opt-in expectation.","type":"boolean"}},"required":["successful_run_recency","notification_types"],"type":"object"},"PipelineProjectionInspection":{"properties":{"contract_slug":{"type":"string"},"digest":{"type":"string"},"input":{"type":"integer"},"mapping_id":{"type":"string"},"representation":{"type":"string"},"resolved_digest":{"type":"string"},"revision_slug":{"type":"string"},"root_shape":{"type":"string"},"schema_object_id":{"type":"string"}},"required":["input","contract_slug","revision_slug","schema_object_id","digest","resolved_digest","mapping_id","representation","root_shape"],"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Pipeline-scoped logical data-source reference resolved through environment bindings."},"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","stripe"],"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"},"readiness_warning":{"description":"Reason readiness could not be reported for this reconciliation.","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"},"readiness":{"$ref":"#/components/schemas/ReadinessReport"},"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"},"PipelineResourceScope":{"additionalProperties":false,"description":"Explicit non-secret S3 confinement policy for an exact project-owned contract object and logical saved operation. Never supplies credentials or grants authority.","properties":{"contract":{"$ref":"#/components/schemas/Slug"},"data_source":{"$ref":"#/components/schemas/Slug"},"object_id":{"maxLength":4096,"minLength":1,"type":"string"},"operation":{"$ref":"#/components/schemas/Slug"},"policy_id":{"enum":["s3/relative-key/v1"],"type":"string"},"representation":{"enum":["rows"],"type":"string"},"revision":{"allOf":[{"$ref":"#/components/schemas/Slug"},{"not":{"enum":["latest"]}}]},"s3":{"additionalProperties":false,"properties":{"bucket":{"maxLength":256,"minLength":1,"type":"string"},"dynamic_key":{"type":"boolean","x-go-type":"*bool"},"endpoint":{"maxLength":4096,"minLength":1,"type":"string"},"force_path_style":{"type":"boolean","x-go-type":"*bool"},"prefix":{"maxLength":4096,"type":"string","x-go-type":"*string"},"region":{"maxLength":256,"minLength":1,"type":"string"}},"required":["endpoint","region","bucket","prefix","dynamic_key","force_path_style"],"type":"object"}},"required":["policy_id","data_source","operation","contract","revision","object_id","representation","s3"],"type":"object"},"PipelineResourceScopeInspection":{"description":"Retained scope identity only. Endpoint, region, bucket, prefix and selector values are omitted.","properties":{"contract":{"type":"string"},"data_source":{"type":"string"},"object_id":{"type":"string"},"operation":{"type":"string"},"policy_id":{"type":"string"},"representation":{"type":"string"},"revision":{"type":"string"}},"required":["policy_id","data_source","operation","contract","revision","object_id","representation"],"type":"object"},"PipelineResourceScopeSelection":{"additionalProperties":false,"properties":{"role":{"enum":["query","sink"],"type":"string"},"scope":{"$ref":"#/components/schemas/PipelineResourceScope"},"step":{"$ref":"#/components/schemas/Slug"}},"required":["step","role","scope"],"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":{"allOf":[{"$ref":"#/components/schemas/EventActorType"}],"description":"Authenticated actor type that started the run when available.","example":"api_key"},"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"},"PipelineRunCheckEvidence":{"properties":{"batch_scope":{"enum":["observed_batch_completeness_unknown","truncated_batch"],"type":"string"},"duration_ms":{"format":"int64","maximum":86400000,"minimum":0,"type":"integer"},"empty":{"type":"boolean"},"rows":{"maximum":1000000000,"minimum":0,"type":"integer"}},"required":["rows","duration_ms","empty","batch_scope"],"type":"object"},"PipelineRunCheckWindow":{"description":"Links the run source window without exposing cursor values. Batch checks do not establish table completeness or freshness.","properties":{"backfill_chunk_index":{"type":"integer"},"backfill_series_slug":{"type":"string"},"has_lower_bound":{"type":"boolean"},"has_upper_bound":{"type":"boolean"},"kind":{"enum":["full","incremental","backfill"],"type":"string","x-enum-varnames":["PipelineRunCheckWindowFull","PipelineRunCheckWindowIncremental","PipelineRunCheckWindowBackfill"]},"source_steps":{"description":"Source observations in this exact run attempt; cursor values stay in protected runtime storage.","items":{"$ref":"#/components/schemas/Slug"},"type":"array"}},"required":["kind","has_lower_bound","has_upper_bound","source_steps"],"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"},"PipelineRunCompletion":{"additionalProperties":false,"description":"Historical evidence for the selected run's logical root. A missing closure is not a failed logical root. Empty decisions never imply a fabricated child run.","properties":{"attempts":{"items":{"$ref":"#/components/schemas/PipelineCompletionAttempt"},"type":"array"},"children":{"description":"Independently authorized persisted dispatch decisions, including decisions without child runs. No inaccessible total is exposed.","items":{"$ref":"#/components/schemas/PipelineCompletionDecision"},"type":"array"},"closed":{"type":"boolean"},"context_unavailable":{"description":"Some causal context cannot be shown; no hidden identities or totals are exposed.","type":"boolean"},"decision_reason":{"nullable":true,"type":"string"},"final_attempt_run_slug":{"$ref":"#/components/schemas/NullableSlug"},"outcome":{"description":"Persisted logical closure status, absent until closure.","nullable":true,"type":"string"},"parent":{"allOf":[{"$ref":"#/components/schemas/PipelineCompletionDecision"}],"nullable":true},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"root_run_slug":{"$ref":"#/components/schemas/Slug"},"truncated":{"description":"Additional recorded attempts or dispatch decisions exceed the read limit.","type":"boolean"},"waiting_for_retry":{"description":"A persisted queued or running automatic retry exists for this unclosed root.","type":"boolean"}},"required":["root_run_slug","closed","waiting_for_retry","outcome","final_attempt_run_slug","decision_reason","attempts","parent","children"],"type":"object"},"PipelineRunCompletionSourceSummary":{"additionalProperties":false,"description":"Safe immutable summary for a completion-triggered pipeline run. Raw request bodies, headers, tokens, credentials, and parameter values are never exposed here.","properties":{"actor_slug":{"$ref":"#/components/schemas/NullableSlug"},"actor_type":{"allOf":[{"$ref":"#/components/schemas/EventActorType"}],"description":"Authenticated actor type that started the run when available.","example":"system"},"attempt_number":{"description":"Attempt number within the retry group. First attempts are 1.","example":1,"minimum":1,"type":"integer"},"entrypoint":{"description":"Stable scheduler boundary that requested the run.","enum":["scheduler"],"example":"scheduler","type":"string","x-enum-varnames":["PipelineRunCompletionSourceSummaryEntrypointScheduler"]},"parameter_keys":{"description":"Names of supplied run parameters or request fields; raw values are intentionally not stored.","example":[],"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":"Completion-triggered run","type":"string"},"trace_id":{"description":"OpenTelemetry trace identifier captured at run start when available.","example":"4bf92f3577b34da6a3ce929d0e0e4736","nullable":true,"type":"string"},"type":{"description":"Completion run source category.","enum":["completion"],"example":"completion","type":"string","x-enum-varnames":["PipelineRunCompletionSourceSummaryTypeCompletion"]}},"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"},"PipelineRunCompositionInspection":{"description":"Safe projection of the exact stored deployment selected by this run. Contains no operation bodies, document fields, runtime values or credentials. Historical reads preserve the exact recorded selection.","properties":{"admission_enabled":{"description":"Contract composition is supported. This does not change the recorded selection or grant authority.","type":"boolean"},"compiled_plan_digest":{"type":"string"},"deployment_resolution_digest":{"type":"string"},"operations":{"items":{"$ref":"#/components/schemas/PipelineOperationInspection"},"type":"array"},"pins":{"items":{"$ref":"#/components/schemas/PipelineContractPinInspection"},"type":"array"},"source_commit":{"type":"string"},"status":{"enum":["available","not_recorded","unavailable","unsupported"],"type":"string"},"targets":{"items":{"$ref":"#/components/schemas/PipelineTargetInspection"},"type":"array"},"template_digest":{"type":"string"}},"required":["status","admission_enabled","pins","operations","targets"],"type":"object"},"PipelineRunConnected":{"additionalProperties":false,"description":"Bounded historical causal component, with logical runs grouping automatic attempts. No global execution outcome is inferred. At most 40 nodes and 100 distinct dispatch decisions are returned. Continue deeper inspection from a visible boundary run using this endpoint; very wide branches may still exceed the decision limit. Missing, denied or retained-away context is omitted without hidden identities or totals.","properties":{"context_unavailable":{"type":"boolean"},"nodes":{"items":{"$ref":"#/components/schemas/PipelineConnectedRun"},"maxItems":40,"type":"array"},"selected_run_slug":{"$ref":"#/components/schemas/Slug"},"truncated":{"type":"boolean"}},"required":["selected_run_slug","nodes","truncated","context_unavailable"],"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","data_source_permission_denied","data_source_connection_failed","data_source_timeout","source_query_failed","source_query_invalid","source_schema_reference_invalid","resource_scope_rejected","source_result_shape_mismatch","transform_runtime_failed","transform_contract_mismatch","sink_contract_mismatch","s3_object_write_failed","worker_ownership_lost","event_input_rejected","destination_constraint_violation"],"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":{"allOf":[{"$ref":"#/components/schemas/EventActorType"}],"description":"Authenticated actor type that started the run when available.","example":"user"},"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 selected for this run. Empty while trigger intake awaits worker artifact selection.","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"},"PipelineRunProgress":{"description":"Bounded durable facts for one exact run attempt, without payload values.","properties":{"after_event":{"format":"int64","minimum":0,"type":"integer"},"compiled_plan_digest":{"description":"Exact compiled artifact selected by this attempt; null before admission or when not recorded.","nullable":true,"type":"string"},"completed_steps":{"minimum":0,"type":"integer"},"current_step":{"$ref":"#/components/schemas/NullableSlug"},"deployment_resolution_digest":{"description":"Exact recorded deployment selection; null when not recorded. Never resolved from the current deployment.","nullable":true,"type":"string"},"event_count":{"format":"int64","minimum":0,"type":"integer"},"events":{"items":{"$ref":"#/components/schemas/PipelineRunTimelineEvent"},"maxItems":100,"type":"array"},"failed_steps":{"minimum":0,"type":"integer"},"has_more":{"type":"boolean"},"interrupted_steps":{"description":"Started steps without recorded completion in a terminal attempt; their provider outcome is not inferred.","minimum":0,"type":"integer"},"metadata":{"$ref":"#/components/schemas/PipelineRunMetadata"},"next_after_event":{"format":"int64","minimum":0,"type":"integer"},"observed_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"Latest recorded event, structural check or worker observation, not an inferred completion time.","nullable":true},"pending_steps":{"description":"Planned steps without a recorded start. A metadata step_count of zero means the plan count was not recorded.","minimum":0,"type":"integer"},"revision":{"description":"Attempt-local boundary revision. Zero means historical revision evidence is unavailable.","format":"int64","minimum":0,"type":"integer"},"server_time":{"$ref":"#/components/schemas/Timestamp"},"worker_liveness":{"description":"Recent means a report within fifteen seconds. Stale means reporting is overdue, not that the worker is dead. Terminal means no further reports are expected.","enum":["recent","stale","unavailable","terminal"],"type":"string"},"worker_observed_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"Last durable report from the runtime, normally every five seconds while admitted.","nullable":true}},"required":["metadata","compiled_plan_digest","deployment_resolution_digest","completed_steps","failed_steps","pending_steps","interrupted_steps","current_step","revision","events","after_event","next_after_event","event_count","has_more","worker_observed_at","worker_liveness","observed_at","server_time"],"type":"object"},"PipelineRunRecord":{"description":"Full persisted run diagnostics record","properties":{"composition":{"$ref":"#/components/schemas/PipelineRunCompositionInspection"},"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":{"allOf":[{"$ref":"#/components/schemas/EventActorType"}],"description":"Authenticated actor type that started the run when available.","example":"system"},"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":{"allOf":[{"$ref":"#/components/schemas/PipelineRunScheduleMisfireResult"}],"description":"Scheduler result for this executed fire, not the trigger configuration policy. Skipped fires are recorded without a pipeline run."},"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","completion":"#/components/schemas/PipelineRunCompletionSourceSummary","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"},{"$ref":"#/components/schemas/PipelineRunCompletionSourceSummary"}]},"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-01T00:00:00Z","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-02T00:00:00Z","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"},"PipelineRunStructuralCheck":{"description":"Attempt-specific structural conformance only. Missing records are missing evidence; delivery and destination verification remain separate.","properties":{"attempt_number":{"minimum":1,"type":"integer"},"compiled_plan_digest":{"type":"string"},"completed_at":{"format":"date-time","type":"string"},"contract_failure":{"$ref":"#/components/schemas/PipelineRunContractFailureDiagnostic"},"declaration":{"type":"string"},"deployment_resolution_digest":{"type":"string"},"evaluator":{"type":"string"},"evidence":{"$ref":"#/components/schemas/PipelineRunCheckEvidence"},"evidence_digest":{"type":"string"},"id":{"type":"string"},"input":{"type":"string"},"origin":{"enum":["step","operation"],"type":"string"},"phase":{"enum":["event_admission","producer_output","normalized_input","pre_sink"],"type":"string"},"policy":{"type":"string"},"projection_digest":{"type":"string"},"reason_code":{"enum":["not_reached","evaluating","conformant","empty_batch","contract_violation","payload_unavailable","evaluator_unavailable","evaluation_error","evaluation_interrupted","persistence_failed","downstream_not_reached","retained_output_reused"],"type":"string"},"reused_from_run":{"type":"string"},"started_at":{"format":"date-time","type":"string"},"status":{"enum":["passed","failed","skipped","unavailable","error"],"type":"string"},"step":{"$ref":"#/components/schemas/Slug"},"target":{"type":"string"},"window":{"$ref":"#/components/schemas/PipelineRunCheckWindow"}},"required":["id","step","origin","phase","declaration","projection_digest","attempt_number","evaluator","policy","status","reason_code","window"],"type":"object"},"PipelineRunTimeline":{"description":"Structured lifecycle timeline and diagnostics snapshots for a persisted run.","properties":{"compiled_plan_digest":{"description":"Exact compiled artifact admitted by this attempt, absent when not recorded.","type":"string"},"deployment_resolution_digest":{"description":"Exact recorded deployment resolution for this attempt. Absent for historical runs without a recorded resolution; never resolved from the current deployment.","type":"string"},"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"},"revision":{"description":"Attempt-local boundary revision; absent for historical runs without revision evidence.","format":"int64","minimum":0,"type":"integer"},"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"]},"structural_checks":{"description":"Absent for historical runs without check evidence. Never infer a pass from absence.","items":{"$ref":"#/components/schemas/PipelineRunStructuralCheck"},"type":"array"},"worker_observed_at":{"$ref":"#/components/schemas/Timestamp"}},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Pipeline-scoped logical data-source reference resolved through environment bindings."},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Slug of an input, query, or transform step consumed by this sink."},"input_contract":{"allOf":[{"$ref":"#/components/schemas/PipelineSchemaContract"}],"description":"Optional expected schema of sink input payload."},"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. Executable pipelines require one weakly connected data-flow graph; multiple sources and sinks are allowed. Draft save and formatting preserve incomplete/disconnected work without executable validation.\n","properties":{"metadata":{"allOf":[{"$ref":"#/components/schemas/PipelineMetadata"}],"description":"Stable pipeline identity used by runtime and storage indexing."},"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":{"allOf":[{"$ref":"#/components/schemas/PipelineMetadataUpdate"}],"description":"Mutable metadata fields for update operations."},"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"},"PipelineTargetInspection":{"properties":{"binding_revision":{"type":"string"},"data_source_slug":{"$ref":"#/components/schemas/Slug"},"reference":{"$ref":"#/components/schemas/Slug"},"role":{"type":"string"},"step":{"$ref":"#/components/schemas/Slug"}},"required":["step","role","reference","data_source_slug","binding_revision"],"type":"object"},"PipelineTransformSpec":{"allOf":[{"not":{"required":["input_contracts","input_contract"]}},{"not":{"required":["input_contracts","input_contract_ref"]}},{"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":{"allOf":[{"$ref":"#/components/schemas/PipelineSchemaContract"}],"description":"Optional expected schema of the transform input payload."},"input_contract_ref":{"$ref":"#/components/schemas/PipelineODCSContractRef"},"input_contracts":{"additionalProperties":{"$ref":"#/components/schemas/PipelineInputContractAttachment"},"description":"Requirements keyed by existing `inputs` names. Mutually exclusive with the combined input contract/reference, including single-input transforms.","minProperties":1,"type":"object"},"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":{"allOf":[{"$ref":"#/components/schemas/PipelineSchemaContract"}],"description":"Optional schema assertion applied to transform output."},"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"},{"$ref":"#/components/schemas/PipelineTriggerCompletionWithoutCompletionConfig"},{"$ref":"#/components/schemas/PipelineTriggerCompletionWithOtherConfig"},{"$ref":"#/components/schemas/PipelineTriggerOtherWithCompletionConfig"}]},"properties":{"completion":{"$ref":"#/components/schemas/PipelineTriggerCompletionConfig"},"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"]},"PipelineTriggerCompletionConfig":{"additionalProperties":false,"description":"Same-project and same-environment upstream dependency. No payload is transferred. Each revision carries a revocable execution grant issued by the authorizing actor; false revokes pending execution authority.","properties":{"condition":{"$ref":"#/components/schemas/PipelineCompletionCondition"},"execution_grant_enabled":{"type":"boolean"},"upstream_pipeline_slug":{"$ref":"#/components/schemas/Slug"}},"required":["upstream_pipeline_slug","condition","execution_grant_enabled"],"type":"object"},"PipelineTriggerCompletionWithOtherConfig":{"anyOf":[{"required":["schedule"]},{"required":["webhook"]}],"description":"Validation-only shape rejected because completion triggers cannot include schedule or webhook config.","properties":{"type":{"enum":["completion"],"type":"string"}},"required":["type"],"type":"object"},"PipelineTriggerCompletionWithoutCompletionConfig":{"description":"Validation-only shape rejected because completion triggers require completion config.","not":{"required":["completion"]},"properties":{"type":{"enum":["completion"],"type":"string"}},"required":["type"],"type":"object"},"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"},"PipelineTriggerOtherWithCompletionConfig":{"description":"Validation-only shape rejected because schedule and webhook triggers cannot include completion config.","properties":{"type":{"enum":["schedule","webhook"],"type":"string"}},"required":["type","completion"],"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"},"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","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","completion"],"example":"schedule","type":"string","x-enum-varnames":["PipelineTriggerTypeSchedule","PipelineTriggerTypeWebhook","PipelineTriggerTypeCompletion"]},"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":{"allOf":[{"$ref":"#/components/schemas/NullableSlug"}],"description":"Logical data-source reference value from the submitted pipeline spec."},"data_source_ref_slug":{"allOf":[{"$ref":"#/components/schemas/NullableSlug"}],"description":"Logical data-source ref slug involved in the diagnostic, when resolution reached a ref record."},"data_source_type":{"allOf":[{"$ref":"#/components/schemas/DataSourceType"}],"description":"Actual connector type involved in the diagnostic, when known."},"environment_slug":{"allOf":[{"$ref":"#/components/schemas/NullableSlug"}],"description":"Project environment used for logical data-source ref resolution."},"expected_data_source_type":{"allOf":[{"$ref":"#/components/schemas/DataSourceType"}],"description":"Expected connector type declared by the logical data-source ref, when known."},"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":{"allOf":[{"$ref":"#/components/schemas/DataSourceRefCapability"}],"description":"Required data-source capability involved in the diagnostic, when known."},"resolved_data_source_slug":{"allOf":[{"$ref":"#/components/schemas/NullableSlug"}],"description":"Concrete data-source slug selected by the environment binding, when resolution succeeded before a later validation failure."},"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":{"composition_admission_enabled":{"description":"Contract composition is supported, independently of this immutable authored snapshot.","type":"boolean"},"spec":{"$ref":"#/components/schemas/PipelineSpec"}},"required":["spec","composition_admission_enabled"],"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; defaults to verify-full. Other modes require the explicit local development plaintext connector policy.","enum":["disable","allow","prefer","require","verify-ca","verify-full"],"example":"verify-full","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":{"format":{"$ref":"#/components/schemas/SQLResultFormat"},"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"},"ProjectRepositoryGitHubAuthorization":{"additionalProperties":false,"properties":{"code":{"maxLength":1024,"minLength":1,"type":"string"},"installation_id":{"format":"int64","minimum":1,"type":"integer"},"state":{"maxLength":256,"minLength":32,"type":"string"}},"required":["state","code","installation_id"],"type":"object"},"ProjectRepositorySetup":{"properties":{"abandoned_at":{"description":"Present only for an archived attempt; it cannot resume or authorize provider work.","format":"date-time","readOnly":true,"type":"string"},"authorization_url":{"description":"Temporary provider authorization link returned only when starting consent.","type":"string"},"data_source_slug":{"$ref":"#/components/schemas/Slug"},"failure_code":{"description":"Last incomplete stage. source_test_required means test the saved data source connection successfully before resubmitting the same request; other stages may require correcting provider access.","type":"string"},"first_commit_sha":{"description":"Initial complete template head, which may follow multiple provider bootstrap commits.","type":"string"},"project_slug":{"$ref":"#/components/schemas/Slug"},"repository_id":{"description":"Immutable provider identity, never a Braidplane database ID.","type":"string"},"repository_url":{"type":"string"},"request":{"$ref":"#/components/schemas/CreateProjectRepositoryRequest"},"slug":{"$ref":"#/components/schemas/Slug"},"status":{"enum":["pending","repository_created","source_created","attached"],"type":"string"}},"required":["slug","project_slug","request","status","data_source_slug"],"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","export"],"type":"string"},"resource":{"enum":["file","document","presentation"],"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","operational"],"type":"string","x-enum-varnames":["ProofEvidenceLevelStatic","ProofEvidenceLevelCachedObserved","ProofEvidenceLevelLiveReadOnly","ProofEvidenceLevelBoundedExecution","ProofEvidenceLevelOperational"]},"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"}]},"ProofOperationalCapture":{"additionalProperties":false,"description":"Immutable operational capture bound to one retained check. Later missing evidence is disclosed separately from this captured result.","properties":{"expires_at":{"format":"date-time","type":"string"},"policy_version":{"type":"string"},"record_digest":{"type":"string"},"selection":{"$ref":"#/components/schemas/ProofOperationalSelection"},"source_receipt_id":{"$ref":"#/components/schemas/Slug"}},"required":["source_receipt_id","policy_version","selection","record_digest","expires_at"],"type":"object"},"ProofOperationalSelection":{"additionalProperties":false,"description":"Exact selection of one durable structural check. No record or aggregate supplied by a caller is treated as evidence.","properties":{"attempt":{"minimum":1,"type":"integer"},"candidate":{"$ref":"#/components/schemas/ProofCandidateIdentity"},"candidate_slug":{"$ref":"#/components/schemas/Slug"},"check_id":{"pattern":"^[0-9a-f]{64}$","type":"string"},"compiled_plan_digest":{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"declaration":{"minLength":1,"type":"string"},"deployment_resolution_digest":{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"},"evaluator":{"type":"string"},"evaluator_policy":{"type":"string"},"evidence_digest":{"type":"string"},"input":{"type":"string"},"origin":{"enum":["step","operation"],"type":"string"},"phase":{"enum":["event_admission","producer_output","normalized_input","pre_sink"],"type":"string"},"pipeline":{"$ref":"#/components/schemas/Slug"},"projection_digest":{"pattern":"^[0-9a-f]{64}$","type":"string"},"run":{"$ref":"#/components/schemas/Slug"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"step":{"$ref":"#/components/schemas/Slug"},"target":{"description":"Empty for a check without a physical target, otherwise a slug.","maxLength":100,"pattern":"^$|^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"version_commit":{"pattern":"^(?:[0-9a-f]{40}|[0-9a-f]{64})$","type":"string"},"window":{"$ref":"#/components/schemas/PipelineRunCheckWindow"}},"required":["candidate_slug","candidate","pipeline","version_commit","compiled_plan_digest","deployment_resolution_digest","run","attempt","check_id","step","input","origin","phase","declaration","projection_digest","target","window","evaluator","evaluator_policy","started_at","completed_at","evidence_digest"],"type":"object"},"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"},"operational":{"$ref":"#/components/schemas/ProofOperationalCapture"},"operational_admission_enabled":{"description":"Operational structural admission is supported. Separate from the immutable captured receipt; permissions remain mandatory.","type":"boolean"},"operational_current_verdict":{"$ref":"#/components/schemas/ProofVerdict"},"operational_evidence_status":{"description":"Current supporting evidence availability; captured claims stay historical.","enum":["available","missing","expired","changed"],"type":"string"},"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":{"document":"#/components/schemas/ProofDriveFileTarget","file":"#/components/schemas/ProofDriveFileTarget","presentation":"#/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":{"allOf":[{"not":{"required":["expected_input_contract","expected_input_contract_ref"]}},{"not":{"required":["output_contract","output_contract_ref"]}}],"description":"A saved query definition","properties":{"created_at":{"$ref":"#/components/schemas/Timestamp"},"data_source_slug":{"$ref":"#/components/schemas/Slug"},"deleted_at":{"allOf":[{"$ref":"#/components/schemas/NullableTimestamp"}],"description":"Timestamp when the query was soft-deleted. Omitted for active queries."},"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":{"allOf":[{"$ref":"#/components/schemas/PipelineSchemaContract"}],"description":"Optional expected input payload contract for using this saved query as a sink operation."},"expected_input_contract_ref":{"allOf":[{"$ref":"#/components/schemas/PipelineODCSContractRef"}],"description":"Optional exact ODCS sink input requirement, exclusive with expected_input_contract. Resolved in the consuming pipeline project when composition is enabled."},"name":{"description":"Human-readable name of the query","example":"Get Active Users","type":"string"},"output_contract":{"allOf":[{"$ref":"#/components/schemas/PipelineSchemaContract"}],"description":"Optional saved query output promise, checked after execution independently of the step promise. Requires contract composition."},"output_contract_ref":{"allOf":[{"$ref":"#/components/schemas/PipelineODCSContractRef"}],"description":"Optional exact ODCS output promise, exclusive with output_contract. Requires contract composition."},"parameters":{"description":"Parameter definitions for the query","items":{"$ref":"#/components/schemas/QueryParameter"},"type":"array"},"query_statement":{"allOf":[{"$ref":"#/components/schemas/QueryStatement"}],"description":"The query to execute with type-specific structure"},"row_limit":{"description":"Optional row quota; 0 uses operator policy (max_result_rows for materialized output, stream_max_rows for SQL file output). A positive value adds a smaller quota. 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"},"QueryExecutionIdentity":{"description":"Metadata identifying a saved-query execution without its payload or result.","properties":{"data_source_slug":{"$ref":"#/components/schemas/Slug"},"executed_at":{"$ref":"#/components/schemas/Timestamp"},"execution_slug":{"$ref":"#/components/schemas/Slug"},"query_slug":{"$ref":"#/components/schemas/Slug"}},"required":["execution_slug","data_source_slug","query_slug","executed_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"}]},"QueryExecutionSummary":{"description":"Latest recorded successful saved-query execution in an organization.","properties":{"successful_execution":{"allOf":[{"$ref":"#/components/schemas/QueryExecutionIdentity"}],"description":"Latest recorded successful saved-query execution, or null when none is recorded.","nullable":true}},"required":["successful_execution"],"type":"object"},"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","stripe":"#/components/schemas/StripeStatement"},"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/StripeStatement"},{"$ref":"#/components/schemas/FTPStatement"},{"$ref":"#/components/schemas/GitStatement"},{"$ref":"#/components/schemas/S3Statement"}]},"ReadinessDiagnostic":{"properties":{"code":{"type":"string"},"environment_slug":{"$ref":"#/components/schemas/Slug"},"field_path":{"type":"string"},"next_action":{"description":"Machine-readable action to address this diagnostic.","type":"string"},"pipeline_slug":{"$ref":"#/components/schemas/Slug"},"requirement_key":{"type":"string"},"severity":{"enum":["error","warning","informational"],"type":"string","x-enum-varnames":["ReadinessDiagnosticSeverityError","ReadinessDiagnosticSeverityWarning","ReadinessDiagnosticSeverityInformational"]},"step_slug":{"description":"Step containing the requirement, or an empty string for a pipeline-level requirement.","type":"string"}},"required":["severity","code","environment_slug","pipeline_slug","step_slug","requirement_key","field_path","next_action"],"type":"object"},"ReadinessEnvironment":{"properties":{"diagnostics":{"items":{"$ref":"#/components/schemas/ReadinessDiagnostic"},"type":"array"},"environment_slug":{"$ref":"#/components/schemas/Slug"},"requirements":{"description":"Present on pipeline readiness responses. Each row groups the authored usages of one requirement in this environment.","items":{"$ref":"#/components/schemas/ReadinessRequirement"},"type":"array"},"status":{"$ref":"#/components/schemas/ReadinessStatus"}},"required":["environment_slug","status","diagnostics"],"type":"object"},"ReadinessReport":{"properties":{"environments":{"items":{"$ref":"#/components/schemas/ReadinessEnvironment"},"type":"array"},"status":{"$ref":"#/components/schemas/ReadinessStatus"}},"required":["status","environments"],"type":"object"},"ReadinessRequirement":{"properties":{"capability":{"$ref":"#/components/schemas/DataSourceRefCapability"},"key":{"type":"string"},"kind":{"enum":["data_source_ref","runtime_variable","saved_operation"],"type":"string","x-enum-varnames":["ReadinessDataSourceRef","ReadinessRuntimeVariable","ReadinessSavedOperation"]},"status":{"$ref":"#/components/schemas/ReadinessStatus"},"target":{"$ref":"#/components/schemas/ReadinessTarget"},"usages":{"items":{"$ref":"#/components/schemas/ReadinessUsage"},"type":"array"},"variable":{"$ref":"#/components/schemas/ReadinessVariable"}},"required":["kind","key","status","usages"],"type":"object"},"ReadinessStatus":{"enum":["ready","blocked","warning","informational"],"type":"string","x-enum-varnames":["ReadinessStatusReady","ReadinessStatusBlocked","ReadinessStatusWarning","ReadinessStatusInformational"]},"ReadinessTarget":{"properties":{"active":{"type":"boolean"},"name":{"type":"string"},"read_only":{"type":"boolean"},"slug":{"$ref":"#/components/schemas/Slug"},"supports_capability":{"type":"boolean"},"type":{"$ref":"#/components/schemas/DataSourceType"}},"required":["slug","name","type","active","read_only","supports_capability"],"type":"object"},"ReadinessUsage":{"properties":{"field_path":{"type":"string"},"step_slug":{"type":"string"}},"required":["step_slug","field_path"],"type":"object"},"ReadinessVariable":{"properties":{"present":{"type":"boolean"},"source":{"enum":["override","default","missing"],"type":"string","x-enum-varnames":["ReadinessVariableOverride","ReadinessVariableDefault","ReadinessVariableMissing"]},"type_mismatch":{"type":"boolean"}},"required":["source","present","type_mismatch"],"type":"object"},"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"},"RuntimeVariableComparison":{"properties":{"environments":{"items":{"$ref":"#/components/schemas/Slug"},"type":"array"},"rows":{"items":{"$ref":"#/components/schemas/RuntimeVariableComparisonRow"},"type":"array"}},"required":["environments","rows"],"type":"object"},"RuntimeVariableComparisonCell":{"properties":{"blocked":{"type":"boolean"},"required":{"type":"boolean"},"source":{"enum":["override","default","missing"],"type":"string","x-enum-varnames":["RuntimeVariableSourceOverride","RuntimeVariableSourceDefault","RuntimeVariableSourceMissing"]},"type_mismatch":{"type":"boolean"},"variable":{"$ref":"#/components/schemas/RuntimeVariable"}},"required":["source","required","type_mismatch","blocked"],"type":"object"},"RuntimeVariableComparisonRow":{"properties":{"cells":{"description":"One cell per environment in the same order as environments.","items":{"$ref":"#/components/schemas/RuntimeVariableComparisonCell"},"type":"array"},"definition":{"$ref":"#/components/schemas/RuntimeVariableDefinition"},"key":{"$ref":"#/components/schemas/RuntimeVariableKey"},"used":{"type":"boolean"}},"required":["key","used","cells"],"type":"object"},"RuntimeVariableDefinition":{"allOf":[{"$ref":"#/components/schemas/RuntimeVariableDefinitionSettings"},{"properties":{"key":{"$ref":"#/components/schemas/RuntimeVariableKey"}},"required":["key"],"type":"object"}]},"RuntimeVariableDefinitionSettings":{"properties":{"default_value":{"description":"Scalar represented as text. Omit to leave the key without a default.","maxLength":4000,"type":"string"},"description":{"$ref":"#/components/schemas/RuntimeVariableDescription"},"required":{"type":"boolean"},"value_type":{"$ref":"#/components/schemas/RuntimeVariableValueType"}},"required":["value_type","required"],"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; custom endpoints require HTTPS unless the explicit local development plaintext policy is enabled.","example":"https://s3.example.com","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"},"file":{"$ref":"#/components/schemas/FilePayloadMetadata"},"row_count":{"description":"Number of rows returned or serialized in the retained file","example":2,"type":"integer"},"rows":{"description":"Result rows (each row is a key-value map). Empty for file output; records are serialized in the retained file instead.","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"},"SQLResultFormat":{"description":"Rows by default. File serializes one finite query result as a retained JSON object with column_names, rows and row_count; positive row and transfer limits are required.","enum":["rows","file"],"type":"string"},"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"},"SlackAlertDestinationConfig":{"additionalProperties":false,"description":"A managed Slack notification connection owned by this organization. No webhook or token input is accepted.","properties":{"connection_slug":{"$ref":"#/components/schemas/Slug"}},"required":["connection_slug"],"type":"object"},"SlackNotificationConnectionMetadata":{"additionalProperties":false,"example":{"channel_id":"CTEST","channel_name":"#operations","workspace_id":"TTEST","workspace_name":"Synthetic workspace"},"properties":{"channel_id":{"type":"string"},"channel_name":{"type":"string"},"workspace_id":{"type":"string"},"workspace_name":{"type":"string"}},"required":["workspace_id","workspace_name","channel_id","channel_name"],"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":{"format":{"$ref":"#/components/schemas/SQLResultFormat"},"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":{"allOf":[{"$ref":"#/components/schemas/GoogleWorkspaceAccessMode"}],"description":"Explicit Workspace consent mode. Required when reconnecting. Changing it starts fresh consent bound to the source revision; failed consent preserves the current source. Other providers reject this field."},"data_source_slug":{"$ref":"#/components/schemas/Slug"},"intent":{"$ref":"#/components/schemas/ProviderInstallIntent"},"more_time":{"description":"Allow 100 minutes for the Core callback instead of 10. The provider controls its own authorization deadlines.","type":"boolean"}},"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"},{"$ref":"#/components/schemas/StripeConfig"}]},"more_time":{"description":"Allow 100 minutes for the Core callback instead of 10. The provider controls its own authorization deadlines.","type":"boolean"},"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":{"allOf":[{"$ref":"#/components/schemas/Slug"}],"description":"Optional slug, generated from the name when omitted"},"type":{"description":"Provider-backed data source type","enum":["hubspot","bigquery","google_workspace","stripe"],"type":"string","x-enum-varnames":["StartProviderDataSourceInstallRequestTypeHubspot","StartProviderDataSourceInstallRequestTypeBigquery","StartProviderDataSourceInstallRequestTypeGoogleWorkspace","StartProviderDataSourceInstallRequestTypeStripe"]}},"required":["name","type","config"],"type":"object"},"StripeConfig":{"additionalProperties":false,"properties":{"mode":{"description":"Stripe environment of the restricted key.","enum":["test","live"],"type":"string","x-enum-varnames":["StripeConfigModeTest","StripeConfigModeLive"]}},"required":["mode"],"type":"object"},"StripeCredentials":{"additionalProperties":false,"properties":{"api_key":{"description":"Restricted key for the selected Stripe mode with read access to the supported objects.","pattern":"^rk_(test|live)_[a-zA-Z0-9_]+$","type":"string","writeOnly":true}},"required":["api_key"],"type":"object"},"StripeStatement":{"additionalProperties":false,"description":"Read one page of Stripe revenue records.","properties":{"limit":{"maximum":100,"minimum":1,"type":"integer"},"object_type":{"enum":["customers","subscriptions","invoices","payments"],"type":"string","x-enum-varnames":["StripeStatementObjectTypeCustomers","StripeStatementObjectTypeSubscriptions","StripeStatementObjectTypeInvoices","StripeStatementObjectTypePayments"]},"operation":{"default":"list","enum":["list"],"type":"string","x-enum-varnames":["StripeStatementOperationList"]},"starting_after":{"description":"Continue after this Stripe object ID.","minLength":1,"type":"string"},"type":{"enum":["stripe"],"type":"string","x-enum-varnames":["StripeStatementTypeStripe"]}},"required":["type","object_type"],"type":"object"},"SuccessfulRunRecency":{"additionalProperties":false,"description":"State calculated at evaluated_at from retained exact-deployment success evidence; this read does not create notifications.","properties":{"capability_enabled":{"description":"Server support for successful-run recency, separate from the expectation's enabled state.","type":"boolean"},"configured":{"type":"boolean"},"deadline_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"deployed_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"deployment_revision":{"format":"int64","nullable":true,"type":"integer"},"enabled":{"type":"boolean"},"enabled_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"episodes":{"items":{"$ref":"#/components/schemas/SuccessfulRunRecencyEpisode"},"type":"array"},"evaluated_at":{"$ref":"#/components/schemas/Timestamp"},"has_more_episodes":{"type":"boolean"},"maximum_age_seconds":{"format":"int64","nullable":true,"type":"integer"},"outcome":{"enum":["grace","healthy","breached","unavailable"],"type":"string"},"resolution_digest":{"nullable":true,"type":"string"},"revision":{"format":"int64","type":"integer"},"succeeded_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"success_run_slug":{"nullable":true,"type":"string"},"unavailable_reason":{"nullable":true,"type":"string"},"version_spec_hash":{"nullable":true,"type":"string"}},"required":["capability_enabled","configured","enabled","revision","maximum_age_seconds","enabled_at","deployment_revision","version_spec_hash","resolution_digest","deployed_at","success_run_slug","succeeded_at","deadline_at","evaluated_at","outcome","unavailable_reason","episodes","has_more_episodes"],"type":"object"},"SuccessfulRunRecencyEpisode":{"additionalProperties":false,"description":"Immutable recorded episode. Resolution can retire an expectation without proving recovery; only qualifying_success identifies recovery.","properties":{"breached_at":{"$ref":"#/components/schemas/Timestamp"},"deadline_at":{"$ref":"#/components/schemas/Timestamp"},"deployed_at":{"$ref":"#/components/schemas/Timestamp"},"deployment_revision":{"format":"int64","type":"integer"},"enabled_at":{"$ref":"#/components/schemas/Timestamp"},"expectation_revision":{"format":"int64","type":"integer"},"last_success_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"last_success_run_slug":{"nullable":true,"type":"string"},"maximum_age_seconds":{"format":"int64","type":"integer"},"notification_slug":{"$ref":"#/components/schemas/Slug"},"recovery_run_slug":{"nullable":true,"type":"string"},"recovery_succeeded_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"resolution_digest":{"nullable":true,"type":"string"},"resolution_reason":{"nullable":true,"type":"string"},"resolved_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"nullable":true},"version_spec_hash":{"type":"string"}},"required":["notification_slug","expectation_revision","maximum_age_seconds","enabled_at","deployment_revision","version_spec_hash","resolution_digest","deployed_at","deadline_at","breached_at","last_success_run_slug","last_success_at","resolved_at","resolution_reason","recovery_run_slug","recovery_succeeded_at"],"type":"object"},"SuccessfulRunRecencyUpdate":{"additionalProperties":false,"description":"Whole-second window, optimistic concurrency revision and enabled state.","properties":{"enabled":{"type":"boolean"},"expected_revision":{"format":"int64","maximum":9223372036854776000,"minimum":0,"type":"integer"},"maximum_age_seconds":{"format":"int64","maximum":9223372036,"minimum":1,"type":"integer"}},"required":["expected_revision","maximum_age_seconds","enabled"],"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"},"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","stripe":"#/components/schemas/TestStripeDataSourceConnectionRequest"},"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"},{"$ref":"#/components/schemas/TestStripeDataSourceConnectionRequest"}]},"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"},"TestStripeDataSourceConnectionRequest":{"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/StripeConfig"},"credentials":{"$ref":"#/components/schemas/StripeCredentials"},"type":{"enum":["stripe"],"type":"string","x-enum-varnames":["TestStripeDataSourceConnectionRequestTypeStripe"]}},"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"},"UnavailableGitConfig":{"additionalProperties":false,"description":"Read-only configuration returned when a stored Git repository URL cannot be safely displayed.","properties":{"allow_private_hosts":{"type":"boolean"},"base_path":{"type":"string"},"default_branch":{"type":"string"},"repo_url":{"enum":[""],"type":"string"}},"required":["repo_url"],"type":"object"},"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":{"allOf":[{"$ref":"#/components/schemas/NullableSlug"}],"description":"Exact protected environment slug required when the ref is bound in a protected environment."},"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/PipelineTriggerCompletionWithoutCompletionConfig"},{"$ref":"#/components/schemas/PipelineTriggerCompletionWithOtherConfig"},{"$ref":"#/components/schemas/PipelineTriggerOtherWithCompletionConfig"},{"$ref":"#/components/schemas/PipelineTriggerScheduleWithWebhookConfig"},{"$ref":"#/components/schemas/PipelineTriggerWebhookWithScheduleConfig"}]},"properties":{"completion":{"$ref":"#/components/schemas/PipelineTriggerCompletionConfig"},"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,"allOf":[{"not":{"required":["expected_input_contract","expected_input_contract_ref"]}},{"not":{"required":["output_contract","output_contract_ref"]}}],"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":{"allOf":[{"$ref":"#/components/schemas/PipelineSchemaContract"}],"description":"Optional expected input payload contract for using this saved query as a sink operation."},"expected_input_contract_ref":{"allOf":[{"$ref":"#/components/schemas/PipelineODCSContractRef"}],"description":"Optional exact ODCS sink input requirement, exclusive with expected_input_contract. Resolved in the consuming pipeline project when composition is enabled."},"name":{"description":"Human-readable name of the query","example":"Get Recent Active Users","maxLength":255,"minLength":1,"type":"string"},"output_contract":{"allOf":[{"$ref":"#/components/schemas/PipelineSchemaContract"}],"description":"Optional saved query output promise, checked after execution independently of the step promise. Requires contract composition."},"output_contract_ref":{"allOf":[{"$ref":"#/components/schemas/PipelineODCSContractRef"}],"description":"Optional exact ODCS output promise, exclusive with output_contract. Requires contract composition."},"parameters":{"description":"Parameter definitions for the query","items":{"$ref":"#/components/schemas/QueryParameter"},"type":"array"},"query_statement":{"allOf":[{"$ref":"#/components/schemas/QueryStatement"}],"description":"The query to execute with type-specific structure"},"row_limit":{"description":"Optional row quota; 0 uses operator policy (max_result_rows for materialized output, stream_max_rows for SQL file output). A positive value adds a smaller quota. 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":0,"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"},"full_name":{"$ref":"#/components/schemas/AccountFullName"},"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. Requires a session authenticated by password or MFA within the last five minutes; sign in again if proof has expired.","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"},"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"},"UpsertRuntimeVariableDefinition":{"allOf":[{"$ref":"#/components/schemas/RuntimeVariableDefinitionSettings"},{"properties":{"create_only":{"description":"Reject the write if a definition for this key already exists.","type":"boolean"},"protected_environment_confirmations":{"description":"Exact slug of every protected environment affected by organization-wide settings.","items":{"$ref":"#/components/schemas/Slug"},"type":"array"}},"type":"object"}]},"User":{"properties":{"authentication_version":{"description":"Present only in successful password or MFA login responses. The SSR frontend captures this generation for shared session revocation. Omitted from profile responses.","example":1,"format":"int64","type":"integer"},"avatar_url":{"description":"Optional profile picture URL","example":"https://example.com/avatar.jpg","format":"uri","type":"string"},"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","export"],"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":{"description":"Personal access token or organization API key. Permissions and principal restrictions still apply.","scheme":"bearer","type":"http"},"SessionAuth":{"description":"Browser session on HTTPS. Local HTTP uses session_id. Unsafe cookie-authenticated requests also require X-CSRF-Token from an authenticated safe request.","in":"cookie","name":"__Host-session_id","type":"apiKey"},"WebhookSignature":{"description":"HMAC-SHA256 signature over key version, timestamp, delivery ID and exact raw body. Key version, timestamp and delivery ID headers are also required; this is not a bearer credential.","in":"header","name":"Braidplane-Webhook-Signature","type":"apiKey"}}},"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.\nProtected operations accept bearer credentials or browser sessions unless overridden.\nAuthentication does not grant resource permissions or bypass principal restrictions.\nAlpha authentication and retry contract: see docs-public/api/alpha.md in this release.\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"}},"security":[],"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"}},"security":[],"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"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid query parameter"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Google sign-in is not configured or its provider is unavailable."}},"security":[],"summary":"Initiate Google OAuth flow","tags":["authentication"]},"parameters":[{"description":"Allow 100 minutes instead of 10 for a new Google authorization to return to Core.","in":"query","name":"more_time","schema":{"type":"boolean"}}],"post":{"description":"Resumes a verified, unexpired pending Google signup in the browser session without another authorization; otherwise starts Google authorization.","operationId":"registerGoogleAccount","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"additionalProperties":false,"properties":{"_csrf":{"description":"Browser form CSRF token. Required when completing a pending signup.","type":"string"},"terms_accepted":{"enum":[true],"type":"boolean"},"terms_document_version":{"minLength":1,"type":"string"}},"type":"object"}}},"required":true},"responses":{"302":{"description":"Redirect to Google authorization, authenticated workspace setup after completing signup, the signup page with retry feedback if the pending signup expired, or the authentication retry page if it is invalid."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid registration input"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Account creation is disabled, or the pending signup CSRF token is missing or invalid."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Google sign-in is not configured or its provider is unavailable."}},"security":[],"summary":"Start or complete Google account registration","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 on success; absent when authorization is cancelled or fails.","in":"query","name":"code","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 set on success. HTTPS uses a Secure host-only cookie.","schema":{"example":"__Host-session_id=abc123; Secure; HttpOnly; SameSite=Lax; Path=/","type":"string"}}}}},"security":[],"summary":"Handle Google OAuth callback","tags":["authentication"]}},"/auth/methods":{"get":{"description":"Returns deployment-level sign-in configuration before authentication. It grants no tenant access and does not check provider reachability.","operationId":"getAuthenticationMethods","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"google_sign_in_enabled":{"type":"boolean"}},"required":["google_sign_in_enabled"],"type":"object"}}},"description":"Configured authentication methods"}},"security":[],"summary":"Get available authentication methods","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"}},"security":[],"summary":"Request password reset","tags":["authentication"]}},"/auth/password/reset":{"post":{"description":"Resets a user's password using a single-use reset token and revokes all existing sessions and pending MFA login challenges.\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"}},"security":[],"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","schema":{"maxLength":1024,"minLength":1,"type":"string"}},{"in":"query","name":"installation_id","schema":{"format":"int64","minimum":1,"type":"integer"}},{"description":"Terminal authorization request failure. Code and installation_id are required when error is absent for installation and repository setup flows. Existing-installation authorization callbacks omit installation_id. A rejected repository setup records a safe failure without exchanging credentials or creating provider resources.","in":"query","name":"error","schema":{"enum":["access_denied","application_suspended","redirect_uri_mismatch"],"type":"string"}}],"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","headers":{"Location":{"description":"Relative project recovery URL after a recorded repository setup failure or when Core can identify an active setup from the initiating user's expired authorization.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"}},"security":[{"SessionAuth":[]}],"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/ManagedMemberInvitationAcceptanceTokenRequest"}}},"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/ManagedTermsAcceptanceRequest"}}},"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","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","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","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"}},"security":[{"SessionAuth":[]}],"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}/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","organization_gitlab_connection":false,"read_only":false,"schema":{"schema_type":"sql","tables":[],"type":"postgres"},"schema_status":"ready","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","organization_gitlab_connection":false,"read_only":false,"schema":{"schema_type":"sql","tables":[],"type":"mysql"},"schema_status":"ready","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","organization_gitlab_connection":false,"read_only":false,"schema":{"schema_type":"sql","tables":[],"type":"postgres"},"schema_status":"ready","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","organization_gitlab_connection":false,"read_only":false,"schema":{"schema_type":"sql","tables":[],"type":"postgres"},"schema_status":"ready","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. Operator-provided demo connections keep their configuration and read-only mode fixed; create your own connection to use a different system.","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)","organization_gitlab_connection":false,"read_only":false,"schema":{"schema_type":"sql","tables":[],"type":"postgres"},"schema_status":"ready","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. Operator-provided demo connections keep their credentials fixed; create your own connection to use your credentials.","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","organization_gitlab_connection":false,"read_only":false,"schema":{"schema_type":"sql","tables":[],"type":"postgres"},"schema_status":"ready","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":"DATA_SOURCE_CONNECTION_FAILED","message":"data source connection 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}/http-oauth/connect":{"post":{"description":"Uses the encrypted app settings saved on this source. Authorization-code apps return a single-use consent URL. Client-credentials apps acquire a token and test the destination before returning. No stored app settings or token material are returned.","operationId":"connectDataSourceHTTPOAuth","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/DataSourceSlugParam"},{"description":"Allow 100 minutes for the Core callback instead of 10.","in":"query","name":"more_time","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPOAuthConnection"}}},"description":"Consent required or machine connection tested"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid HTTP OAuth setup or destination test failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Source not found"}},"summary":"Connect or reconnect an HTTP OAuth source","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. Operator-provided demo connections cannot select a different repository.","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":{"sql":"SELECT id, email, last_login_at FROM users WHERE last_login_at \u003e NOW() - INTERVAL '7 days' LIMIT 500","type":"postgres"},"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,"payload":{"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"}]},"result_type":"sql","success":true,"type":"postgres"},"schema":{"$ref":"#/components/schemas/QueryExecutionResult"}}},"description":"Query executed successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Parameter validation failed or HTTP_ACKNOWLEDGEMENT_REJECTED. A rejected acknowledgement does not prove rollback; verify remote state before retrying a write."},"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, a dependency is unavailable, or HTTP_ACKNOWLEDGEMENT_UNCERTAIN. Missing or malformed acknowledgement evidence never confirms a write; verify remote state before retrying."}},"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":[{"color":"red","created_at":"2026-05-25T10:30:00Z","delete_reason":null,"deleted_at":null,"description":"Protected production runtime target","name":"Production","protected":true,"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":{"color":"red","description":"Protected production runtime target","name":"Production","protected":true,"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":{"color":"red","description":"Protected production runtime target","name":"Production","protected":true},"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"}},"security":[{"SessionAuth":[]}],"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"}},"security":[{"SessionAuth":[]}],"summary":"Get the managed GitHub App connection","tags":["organizations"]}},"/organizations/{slug}/github-app-connection/authorize":{"post":{"operationId":"authorizeOrganizationGitHubAppConnection","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubAppExistingInstallationAuthorizationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubAppInstallStart"}}},"description":"GitHub-hosted authorization URL"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid account login"},"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"}},"security":[{"SessionAuth":[]}],"summary":"Authorize an existing managed GitHub App installation","tags":["organizations"]}},"/organizations/{slug}/github-app-connection/install":{"post":{"operationId":"startOrganizationGitHubAppInstall","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"description":"Allow 100 minutes for the Core callback instead of 10.","in":"query","name":"more_time","schema":{"type":"boolean"}}],"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"}},"security":[{"SessionAuth":[]}],"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"},"more_time":{"description":"Allow 100 minutes for the Core callback instead of 10.","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. Invitations are disabled for synthetic qualification organizations. 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. Invitations cannot be resent from synthetic qualification organizations.","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. Membership additions are disabled for synthetic qualification organizations. 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}/notification-connections":{"get":{"operationId":"listNotificationConnections","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NotificationConnection"},"type":"array"}}},"description":"Safe connection metadata"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid organization slug"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to read notification connections in this organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or connection is not accessible"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Credential storage is unavailable"}},"summary":"List managed notification connections","tags":["notifications"]},"post":{"operationId":"createNotificationConnection","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewNotificationConnection"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationConnection"}}},"description":"Pending connection"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid organization, connection identity or request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to manage notification connections in this organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or connection is not accessible"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Connection identity or credential lifecycle conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization credential mutation rate limit exceeded"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Credential storage or notification provider is unavailable"}},"summary":"Create a pending managed notification connection","tags":["notifications"]}},"/organizations/{slug}/notification-connections/{notification_connection_slug}/connect":{"post":{"operationId":"connectNotificationConnection","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/NotificationConnectionSlugParam"}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectorInstall"}}},"description":"Time-bound provider installation started"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid organization or connection slug"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to manage notification connections in this organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or connection is not accessible"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Connection identity or credential lifecycle conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization credential mutation rate limit exceeded"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Credential storage or notification provider is unavailable"}},"summary":"Start or replace a managed notification provider installation","tags":["notifications"]}},"/organizations/{slug}/notification-connections/{notification_connection_slug}/disconnect":{"post":{"operationId":"disconnectNotificationConnection","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/NotificationConnectionSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialMetadata"}}},"description":"Safe connection result"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid organization or connection slug"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authorized to manage notification connections in this organization"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization or connection is not accessible"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Connection identity or credential lifecycle conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Organization credential mutation rate limit exceeded"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Credential storage or notification provider is unavailable"}},"summary":"Disconnect this local grant without revoking other provider installations","tags":["notifications"]}},"/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-operational-capabilities":{"get":{"description":"Shared availability metadata for API, CLI and UI discovery. Availability never grants permission.","operationId":"getPipelineOperationalCapabilities","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineOperationalCapabilities"}}},"description":"Operational capability availability"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request"},"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":"Inspect pipeline operational capabilities","tags":["pipelines"]}},"/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","pipeline_backend":null,"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","pipeline_backend":null,"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","pipeline_backend":null,"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/import":{"post":{"description":"Preview or explicitly apply contracts/ YAML and JSON artifacts from the configured project Git backend. Apply requires the exact previewed commit. No pipeline references are upgraded.","operationId":"importODCSArtifacts","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"oneOf":[{"properties":{"apply":{"enum":[false]}}},{"properties":{"apply":{"enum":[true]},"expected_commit":{"pattern":"^[0-9a-f]{40}$","type":"string"}}}],"properties":{"apply":{"type":"boolean"},"expected_commit":{"description":"Empty for initial preview; exact full commit SHA required for apply.","pattern":"^$|^[0-9a-f]{40}$","type":"string"}},"required":["apply","expected_commit"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODCSArtifactImport"}}},"description":"Complete immutable import manifest; original bytes are base64 encoded."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid artifact or 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":"Project or configured Git source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Commit or identity conflict"}},"summary":"importODCSArtifacts","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}/contracts/{contract_slug}/revisions/{revision_slug}/artifact":{"get":{"description":"Read one immutable original Git artifact for an exact revision and provenance key. Original bytes are base64 encoded and may include authored comments.","operationId":"getODCSArtifact","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/ContractSlugParam"},{"$ref":"#/components/parameters/RevisionSlugParam"},{"in":"query","name":"source_repo","required":true,"schema":{"description":"Repository identity or opaque artifact locator from the response. At most 1024 UTF-8 bytes; NUL is rejected.","maxLength":1024,"minLength":1,"type":"string"}},{"in":"query","name":"commit","required":true,"schema":{"pattern":"^[0-9a-f]{40}$","type":"string"}},{"in":"query","name":"path","required":true,"schema":{"description":"At most 1024 UTF-8 bytes; NUL is rejected.","maxLength":1024,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODCSArtifact"}}},"description":"Immutable provenance and original bytes"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid provenance key or path parameter"},"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":"Artifact not found for this revision and provenance key"}},"summary":"getODCSArtifact","tags":["contracts"]}},"/organizations/{slug}/projects/{project_slug}/contracts/{contract_slug}/revisions/{revision_slug}/inspection":{"get":{"description":"Requires project read permission. Returns inert admitted canonical JSON and static compiler coverage for an exact revision and optional object selection. No authored reference is fetched or executed. Enforced means compiled constraints, never a passed runtime check. Without an object selection no executable projection is available. Legacy documents failing current admission are not exposed by this operation.","operationId":"inspectODCSRevision","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/ContractSlugParam"},{"$ref":"#/components/parameters/RevisionSlugParam"},{"in":"query","name":"schema_object_id","schema":{"maxLength":1024,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODCSRevisionInspection"}}},"description":"Static inspection; coverage completeness and projection eligibility are separate from runtime evidence"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid selection or document no longer admissible"},"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":"Revision not found in this organization and project"}},"summary":"Inspect an immutable ODCS document and declaration coverage","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 trigger definition for a pipeline. Schedule and webhook definitions require both pipeline_triggers:create and pipelines:execute, including disabled definitions. 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. Schedule and webhook definitions require both pipeline_triggers:update and pipelines:execute, including disabled definitions.","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. Requires pipeline trigger update and pipeline execute permissions.","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. Requires pipeline trigger update and pipeline execute permissions.","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 and rejects sink replay policies unsupported by the resolved connector 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}/deployment:compare":{"post":{"description":"Read-only semantic comparison against the immutable authored spec selected by the deployment at lookup time. Values are omitted from findings. The response does not assess environment bindings or runtime compatibility.\n","operationId":"comparePipelineDeployment","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/PipelineSpec"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineDeploymentComparison"}}},"description":"Comparison against the selected deployment revision"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid candidate pipeline spec"},"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":"Deployment or immutable version not found"}},"summary":"Compare a candidate against the deployed pipeline version","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipelines/{pipeline_slug}/successful-run-recency":{"get":{"description":"Read current calculated state and the latest 20 immutable breach/recovery episodes, including disabled expectations. This is successful-run recency, not payload data freshness or an SLA.","operationId":"getSuccessfulRunRecency","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/SuccessfulRunRecency"}}},"description":"Successful-run recency inspection"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request"},"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 pipeline not found"}},"summary":"Inspect successful-run recency","tags":["pipelines"]},"put":{"description":"Create, replace or disable an opt-in expectation for this exact deployed target. Use expected_revision zero to create; reload on conflict. No schedule is created.","operationId":"updateSuccessfulRunRecency","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/SuccessfulRunRecencyUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessfulRunRecency"}}},"description":"Successful-run recency inspection"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Target unavailable"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Expectation revision changed"}},"summary":"Set successful-run recency expectation","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/pipelines/{pipeline_slug}:bootstrap-checkpoints":{"post":{"description":"Atomically seeds initial committed source progress without executing the pipeline. Existing committed progress is never reset; repeated requests return a conflict. Requires pipeline update permission and protected-environment confirmation.","operationId":"bootstrapPipelineCheckpoints","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"requestBody":{"content":{"application/json":{"example":{"protected_environment_confirmation":"stg","request_slug":"users-initial-checkpoint","source_seeds":{"fetch-users":{"value":"2026-05-01T00:00:00Z"}}},"schema":{"$ref":"#/components/schemas/BootstrapPipelineCheckpointsRequest"}}},"required":true},"responses":{"204":{"description":"Initial checkpoints committed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid source seeds or environment confirmation"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Deployment or source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Source checkpoint already initialized"}},"summary":"Bootstrap initial incremental checkpoints","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. Deployment rejects disconnected data-flow groups, including in previously stored versions, before updating the deployment. Independent flows must be split into separate pipelines or connected by an actual data dependency.\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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"A run with this slug already exists in the project environment"},"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-operational-receipts":{"post":{"description":"Requires pipeline execute, pipeline read and data-source read permission. Admits one exact retained structural check into a separate immutable receipt. No provider call or Git publication is performed. Historical operational receipts remain readable. Independent run retention and the seven-day Proof cap are preserved.","operationId":"compileOperationalProofReceipt","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompileOperationalProofReceiptInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProofReceipt"}}},"description":"Protected operational Proof receipt","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":"Operational admission not authorized or retained evidence no longer usable"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Control or scoped resource not found"}},"summary":"Compile an operational structural receipt","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}/completion":{"get":{"description":"Returns persisted logical-root evidence and immutable completion dispatch selections. Each causal endpoint is independently authorized; inaccessible links are omitted without identifiers or counts. Current trigger configuration is separate from this historical evidence. Reading never dispatches or reselects a deployment.","operationId":"getPipelineRunCompletion","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/PipelineRunCompletion"}}},"description":"Authoritative logical-root and causal evidence"},"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":"Run not found"}},"summary":"Inspect logical closure and completion dispatch decisions","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/runs/{run_slug}/connected":{"get":{"description":"Returns persisted logical-root evidence and immutable completion dispatch selections. Each causal endpoint is independently authorized; inaccessible links are omitted without identifiers or counts. Current trigger configuration is separate from this historical evidence. Reading never dispatches or reselects a deployment.","operationId":"getPipelineRunConnected","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/PipelineRunConnected"}}},"description":"Authoritative logical-root and causal evidence"},"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":"Run not found"}},"summary":"Inspect connected historical logical runs","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/environments/{environment_slug}/runs/{run_slug}/progress":{"get":{"description":"Read an append-only event page for one exact attempt. after_event is the number of events already consumed; start or resynchronize with zero. A cursor beyond retained history returns 400. Reconnect with the last next_after_event; duplicate observations are safe to discard by offset. Revision orders boundary snapshots; worker observations can advance independently. Poll no faster than once per second, normally every two seconds, and stop after a terminal attempt and all pages are consumed. Recent worker telemetry is not evidence of completed provider effects. Stale or unavailable observations do not prove worker death. Retention is the same as run history; a missing run returns 404.\n","operationId":"getPipelineRunProgress","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/EnvironmentSlugParam"},{"$ref":"#/components/parameters/RunSlugParam"},{"in":"query","name":"after_event","schema":{"default":0,"format":"int64","minimum":0,"type":"integer"}},{"in":"query","name":"limit","schema":{"default":100,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineRunProgress"}}},"description":"Durable progress page for one pipeline run attempt"},"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":"Read durable pipeline execution progress","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 unknown ledger-only retries. Terminal worker-loss runs require fenced queue ownership and complete retained outputs with repeat-safe sinks. Missing input checkpoints and other 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. A repository and tracked branch already attached to another project returns safe recovery guidance in error.detailed_error."},"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}/pipeline-creations":{"get":{"description":"Project-scoped creation history ordered by creation slug. Publication state is recorded, not live provider or runtime readiness. The cursor is the last creation slug returned.","operationId":"listPipelineCreationProposals","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/LimitParam"},{"in":"query","name":"cursor","schema":{"$ref":"#/components/schemas/Slug"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineCreationProposalListResponse"}}},"description":"Recorded proposals and continuation cursor"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid project or continuation cursor"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline read permission required"}},"summary":"List recorded first-pipeline proposals","tags":["pipelines"]},"post":{"description":"Queues a creation proposal without creating a canonical pipeline or version. Requires pipeline create permission and a user session or PAT. Repeating the same definition by its initiating user resumes the saved proposal. Review and merge through the provider, then reconcile Git before deploying. Refuses an existing pipeline or target file.","operationId":"createPipelineProposal","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineSpec"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineCreationProposal"}}},"description":"Saved creation proposal; not yet a canonical pipeline"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid definition or missing repository prerequisites"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Permission or user principal required"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Existing pipeline or conflicting creation proposal"}},"summary":"Propose a new Git-authored pipeline","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/pipeline-creations/{creation_slug}":{"get":{"operationId":"getPipelineCreationProposal","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"in":"path","name":"creation_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineCreationProposal"}}},"description":"Safe saved proposal metadata"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Pipeline read permission required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Creation proposal not found in this project"}},"summary":"Inspect a new-pipeline proposal","tags":["pipelines"]}},"/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}/compiled-plans/{digest}":{"get":{"description":"Read only the selected digest, independently of current authoring and bindings.","operationId":"getPipelineCompiledPlan","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"},{"in":"path","name":"digest","required":true,"schema":{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineCompiledPlan"}}},"description":"Safe retained identity summary, excluding authored bodies and template values.","headers":{"Cache-Control":{"description":"Retained identity summaries must not be cached.","schema":{"enum":["no-store"],"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Malformed compiled plan digest"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Requested retained identity not found"}},"summary":"Inspect an exact retained compiled plan","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}/readiness":{"get":{"description":"Evaluates persisted pipeline requirements across enabled project environments.","operationId":"getPipelineReadiness","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadinessReport"}}},"description":"Environment readiness report"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid path parameter"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - user not authenticated"},"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 pipeline environment readiness","tags":["pipelines"]}},"/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/{pipeline_slug}/versions/{spec_hash}/compiled-plans":{"post":{"description":"Compile only the full immutable version hash, using its retained authored snapshot, source commit and path. No source provenance or authored body is accepted.","operationId":"compilePipelineVersion","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"$ref":"#/components/parameters/PipelineSlugParam"},{"description":"Full immutable retained authored version hash; prefixes are not accepted.","in":"path","name":"spec_hash","required":true,"schema":{"pattern":"^[0-9a-f]{64}$","type":"string"}},{"description":"Environment whose bindings select saved-operation definitions for this explicit compilation. Required when the retained version references saved operations. Captured operation content remains portable; deployment resolves its own targets.","in":"query","name":"environment_slug","schema":{"$ref":"#/components/schemas/Slug"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineCompilationRequest"}}},"description":"Optional explicit rich projection selection. Catalog documents and source provenance are resolved from retained project-owned records, never supplied here. Mapping declarations are compilation inputs, not provider observations or runtime conformance evidence. Values must be non-secret."},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineCompiledPlan"}}},"description":"Safe retained identity summary, excluding authored bodies and template values.","headers":{"Cache-Control":{"description":"Retained identity summaries must not be cached.","schema":{"enum":["no-store"],"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid version, unsupported input or unavailable provenance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Requested retained identity not found"}},"summary":"Compile an exact retained 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.\nApply registers the imported logical data-source references for binding without deploying a runtime version.\nPreview does not change references or bindings. Existing references and bindings remain available to deployed versions.\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}/projects/{project_slug}/readiness":{"get":{"description":"Evaluates persisted project requirements across enabled project environments.","operationId":"getProjectReadiness","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadinessReport"}}},"description":"Environment readiness report"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid path parameter"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - user not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Project not found"}},"summary":"Get project environment readiness","tags":["pipelines"]}},"/organizations/{slug}/projects/{project_slug}/repository-setup":{"get":{"operationId":"getProjectRepositorySetup","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRepositorySetup"}}},"description":"Durable setup progress without provider credentials"},"204":{"description":"No repository setup has started"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Project not found"}},"summary":"Inspect resumable project repository setup","tags":["projects"]},"post":{"description":"Explicitly creates a private customer-owned GitHub or GitLab repository, initializes the\nversioned template, creates a managed connection and attaches it to this project.\nGitHub starts the App authorization flow and returns an authorization URL before creation.\nGitLab returns its existing organization OAuth consent flow when API write access is missing or revoked.\nComplete provider consent in a browser, then use the callback or GitHub authorization operation.\nRepeating the same request resumes the same setup and preserves created resources.\nRequires organization update, project update and data source create permissions.\nA different target or an existing unrelated backend is never replaced.\n","operationId":"createProjectRepository","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"description":"Allow 100 minutes for the Core callback instead of 10 if provider authorization is required. May change when retrying the same saved setup.","in":"query","name":"more_time","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRepositoryRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRepositorySetup"}}},"description":"Durable setup progress, with a GitHub authorization URL when user consent is needed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid target or missing explicit creation consent"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Missing Braidplane or provider creation permission"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Project not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Another setup is running, the target differs, or a repository already exists"}},"summary":"Create and attach a private pipeline repository","tags":["projects"]}},"/organizations/{slug}/projects/{project_slug}/repository-setup/abandon":{"post":{"description":"Archives the exact incomplete attempt without deleting its repository or connection.\nRequires organization update, project update and explicit resource preservation consent.\nA running attempt or an attached pipeline backend cannot be abandoned.\nPrevious consent cannot authorize a new attempt. The returned attempt remains readable by its slug.\n","operationId":"abandonProjectRepositorySetup","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbandonProjectRepositorySetupRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRepositorySetup"}}},"description":"Archived attempt with retained resource provenance"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Missing explicit preservation consent"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required permission missing"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Attempt not found in this project"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Attempt is running, attached or no longer current"}},"summary":"Keep existing resources and choose a new repository target","tags":["projects"]}},"/organizations/{slug}/projects/{project_slug}/repository-setup/github-authorization":{"post":{"description":"Requires a user principal with organization update, project update and data source create permissions. The authorization code is exchanged transiently and never stored.","operationId":"completeProjectRepositoryGitHubAuthorization","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRepositoryGitHubAuthorization"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRepositorySetup"}}},"description":"Repository attached successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid, expired or mismatched authorization"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"User or provider permission missing"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Another setup is running or the target changed"}},"summary":"Complete GitHub consent and resume repository setup","tags":["projects"]}},"/organizations/{slug}/projects/{project_slug}/repository-setups/{setup_slug}":{"get":{"operationId":"getProjectRepositorySetupAttempt","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/ProjectSlugParam"},{"in":"path","name":"setup_slug","required":true,"schema":{"$ref":"#/components/schemas/Slug"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRepositorySetup"}}},"description":"Safe attempt details scoped to this project"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Attempt not found in this project"}},"summary":"Inspect an exact current or abandoned repository setup attempt","tags":["projects"]}},"/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}/query-execution-summary":{"get":{"description":"Returns the latest recorded successful saved-query execution in the organization without result payloads. An empty summary does not prove that no query has ever run. Recorded executions do not certify read-only provider behavior or distinguish every pipeline reuse from direct execution.","operationId":"getQueryExecutionSummary","parameters":[{"$ref":"#/components/parameters/SlugParam"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryExecutionSummary"}}},"description":"Latest recorded successful saved-query execution"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"}},"summary":"Get latest successful saved-query execution","tags":["queries"]}},"/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}/runtime-variable-comparison":{"get":{"operationId":"compareRuntimeVariables","parameters":[{"$ref":"#/components/parameters/SlugParam"},{"description":"Keys used by the pipeline under review, including keys absent from every environment.","in":"query","name":"used_key","schema":{"items":{"$ref":"#/components/schemas/RuntimeVariableKey"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeVariableComparison"}}},"description":"Runtime variable comparison"}},"summary":"Compare runtime variables across organization environments","tags":["environments"]}},"/organizations/{slug}/runtime-variable-definitions/{runtime_variable_key}":{"delete":{"description":"Existing environment overrides for this key are preserved.","operationId":"deleteRuntimeVariableDefinition","parameters":[{"description":"Supply the exact slugs of every active protected environment. Retry with those slugs if confirmation is rejected.","in":"query","name":"protected_environment_confirmations","schema":{"items":{"$ref":"#/components/schemas/Slug"},"type":"array"}}],"responses":{"204":{"description":"Runtime variable definition deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request or missing protected environment confirmation"}},"summary":"Delete an organization runtime variable definition","tags":["environments"]},"parameters":[{"$ref":"#/components/parameters/SlugParam"},{"$ref":"#/components/parameters/RuntimeVariableKeyParam"}],"put":{"operationId":"upsertRuntimeVariableDefinition","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertRuntimeVariableDefinition"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeVariableDefinition"}}},"description":"Saved definition"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid definition or missing protected environment confirmation"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"A definition with this key already exists and create_only was requested"}},"summary":"Create or replace an organization runtime variable definition","tags":["environments"]}},"/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. A user-initiated install requires the same authenticated user on callback. 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"}},{"description":"Authorization server issuer. Configurable HTTP OAuth requires an exact match with the issuer saved when authorization started.","in":"query","name":"iss","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":{"authentication_version":1,"created_at":"2025-10-04T10:30:00Z","email":"john.doe@example.com","full_name":"John Doe","has_local_password":true,"locale":"en-US","mfa_email_enabled":false,"role":"user","slug":"johndoe","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/AuthenticatedUser"}}},"description":"Session has been set in the cookie"},"202":{"content":{"application/json":{"example":{"challenge_token":"example-mfa-challenge","expires_at":"2025-10-04T10:40:00Z"},"schema":{"$ref":"#/components/schemas/MFAChallenge"}}},"description":"Email MFA verification is required before the session is created"}},"security":[],"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":"example-mfa-challenge","code":"123456"},"schema":{"$ref":"#/components/schemas/MFAVerification"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"authentication_version":1,"created_at":"2025-10-04T10:30:00Z","email":"john.doe@example.com","full_name":"John Doe","has_local_password":true,"locale":"en-US","mfa_email_enabled":true,"role":"user","slug":"johndoe","updated_at":"2025-10-04T10:30:00Z"},"schema":{"$ref":"#/components/schemas/AuthenticatedUser"}}},"description":"Session has been set in the cookie"},"400":{"description":"Invalid, expired, consumed, or over-attempt MFA challenge"}},"security":[],"summary":"Verify session MFA challenge"}},"/users":{"post":{"description":"Create a new local account.","operationId":"createUser","requestBody":{"content":{"application/json":{"example":{"email":"john.doe@example.com","full_name":"John Doe","password":"SecurePass123!","terms_acceptance":{"terms_accepted":true,"terms_document_version":"pre-alpha-2026-09-13"},"turnstile_response":"provider-response-token"},"schema":{"$ref":"#/components/schemas/ManagedNewUser"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"created_at":"2025-10-04T10:30:00Z","email":"john.doe@example.com","full_name":"John Doe","has_local_password":true,"locale":"en-US","mfa_email_enabled":false,"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"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Self-service registration or external onboarding is disabled"}},"security":[],"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","has_local_password":true,"locale":"pl","mfa_email_enabled":false,"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","has_local_password":true,"locale":"pl","mfa_email_enabled":false,"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/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."}},"security":[{"SessionAuth":[]}],"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 and revokes all sessions, including the current session. Sign in again afterward. 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"}},"security":[{"SessionAuth":[]}],"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"}},"security":[{"SessionAuth":[]}],"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"}},"security":[{"WebhookSignature":[]}],"summary":"Accept a generic pipeline webhook delivery","tags":["webhooks"]}}},"security":[{"BearerAuth":[]},{"SessionAuth":[]}],"servers":[{"description":"Community application API","url":"/api"}]}