components:
  schemas:
    ApiKeyResponse:
      properties:
        api_key_value:
          anyOf:
          - type: string
          - type: 'null'
          title: Api Key Value
        created_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Created At
        id:
          title: Id
          type: string
        is_service_key:
          title: Is Service Key
          type: boolean
        org_id:
          title: Org Id
          type: string
        org_name:
          title: Org Name
          type: string
        user_email:
          anyOf:
          - type: string
          - type: 'null'
          title: User Email
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Id
      required:
      - id
      - org_id
      - org_name
      - user_id
      - user_email
      - is_service_key
      - created_at
      title: ApiKeyResponse
      type: object
    AuditLogEntry:
      additionalProperties: true
      description: An audit log entry.
      properties:
        audit_log_id:
          title: Audit Log Id
          type: string
      required:
      - audit_log_id
      title: AuditLogEntry
      type: object
    AuditLogsResponse:
      description: Response containing audit logs.
      properties:
        audit_logs:
          items:
            $ref: '#/components/schemas/AuditLogEntry'
          title: Audit Logs
          type: array
      required:
      - audit_logs
      title: AuditLogsResponse
      type: object
    BillingCycle:
      properties:
        end:
          format: date-time
          title: End
          type: string
        start:
          format: date-time
          title: Start
          type: string
      required:
      - start
      - end
      title: BillingCycle
      type: object
    BulkRepoIndexRequest:
      properties:
        org_id:
          title: Org Id
          type: string
        repo_names:
          items:
            type: string
          maxItems: 100
          minItems: 1
          title: Repo Names
          type: array
      required:
      - org_id
      - repo_names
      title: BulkRepoIndexRequest
      type: object
    CloneRepoRequest:
      properties:
        pull_repo_commands:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Commands to pull the repository. Recommended to leave blank as it is auto-generated.
          title: Pull Repo Commands
        repo_note:
          anyOf:
          - type: string
          - type: 'null'
          title: Repo Note
        repo_path:
          description: Repository path in the format 'owner/repo_name' (e.g., 'acme/my-project')
          examples:
          - owner/repo_name
          title: Repo Path
          type: string
        run_lint_commands:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Run Lint Commands
        run_project_commands:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Run Project Commands
        run_tests_commands:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Run Tests Commands
        update_dependencies_commands:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Update Dependencies Commands
      required:
      - repo_path
      title: CloneRepoRequest
      type: object
    ConsumptionResponse:
      properties:
        consumption_by_date:
          additionalProperties:
            type: number
          propertyNames:
            format: date
          title: Consumption By Date
          type: object
        consumption_by_org_id:
          additionalProperties:
            type: number
          title: Consumption By Org Id
          type: object
        consumption_by_user:
          anyOf:
          - additionalProperties:
              type: number
            type: object
          - type: 'null'
          title: Consumption By User
        total_acus:
          title: Total Acus
          type: number
      required:
      - total_acus
      - consumption_by_date
      - consumption_by_org_id
      title: ConsumptionResponse
      type: object
    CreateEnterprisePlaybookRequest:
      properties:
        body:
          minLength: 1
          title: Body
          type: string
        macro:
          anyOf:
          - type: string
          - type: 'null'
          title: Macro
        title:
          minLength: 1
          title: Title
          type: string
      required:
      - title
      - body
      title: CreateEnterprisePlaybookRequest
      type: object
    CreateRepoSnapshotResponse:
      description: Response from creating a snapshot.
      properties:
        ami_id:
          anyOf:
          - type: string
          - type: 'null'
          description: AMI ID of the snapshot (may be null if still being created)
          title: Ami Id
        created_at:
          description: Timestamp when the snapshot was created
          format: date-time
          title: Created At
          type: string
        org_id:
          description: Organization ID the snapshot belongs to
          title: Org Id
          type: string
        snapshot_id:
          description: ID of the created snapshot
          title: Snapshot Id
          type: string
        status:
          description: Status of the snapshot (e.g., 'pending', 'available')
          title: Status
          type: string
      required:
      - snapshot_id
      - status
      - org_id
      - created_at
      title: CreateRepoSnapshotResponse
      type: object
    EnterpriseBulkOrgMembersUpdate:
      properties:
        group_names:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Group Names
        org_ids:
          items:
            type: string
          title: Org Ids
          type: array
        org_role:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Role
        user_ids:
          items:
            type: string
          title: User Ids
          type: array
      required:
      - user_ids
      - org_ids
      title: EnterpriseBulkOrgMembersUpdate
      type: object
    EnterpriseGroupResponse:
      properties:
        group_name:
          title: Group Name
          type: string
        org_count:
          title: Org Count
          type: integer
        role_by_org_id:
          additionalProperties:
            type: string
          title: Role By Org Id
          type: object
      required:
      - group_name
      - org_count
      - role_by_org_id
      title: EnterpriseGroupResponse
      type: object
    EnterpriseIdpGroupsCreate:
      properties:
        group_names:
          items:
            type: string
          title: Group Names
          type: array
      required:
      - group_names
      title: EnterpriseIdpGroupsCreate
      type: object
    EnterpriseMemberInviteRequest:
      properties:
        emails:
          description: List of email addresses to invite (max 100)
          items:
            format: email
            type: string
          maxItems: 100
          title: Emails
          type: array
      required:
      - emails
      title: EnterpriseMemberInviteRequest
      type: object
    EnterpriseMemberInviteResponse:
      properties:
        invited_count:
          title: Invited Count
          type: integer
        invitee_user_id_to_email:
          additionalProperties:
            type: string
          title: Invitee User Id To Email
          type: object
        status:
          default: success
          title: Status
          type: string
      required:
      - invited_count
      - invitee_user_id_to_email
      title: EnterpriseMemberInviteResponse
      type: object
    EnterpriseOrgBillingUsageLimitsUpdate:
      properties:
        max_acu_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Acu Limit
      required:
      - max_acu_limit
      title: EnterpriseOrgBillingUsageLimitsUpdate
      type: object
    EnterpriseOrgCreate:
      properties:
        acu_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Acu Limit
        add_creator_as_member:
          default: true
          title: Add Creator As Member
          type: boolean
        display_name:
          title: Display Name
          type: string
      required:
      - display_name
      title: EnterpriseOrgCreate
      type: object
    EnterpriseOrganizationResponse:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        display_name:
          title: Display Name
          type: string
        org_id:
          title: Org Id
          type: string
      required:
      - org_id
      - display_name
      - created_at
      title: EnterpriseOrganizationResponse
      type: object
    EnterprisePlaybookResponse:
      properties:
        access:
          title: Access
          type: string
        account_id:
          title: Account Id
          type: string
        body:
          title: Body
          type: string
        created_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Created At
        created_by_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Created By User Id
        created_by_user_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Created By User Name
        macro:
          anyOf:
          - type: string
          - type: 'null'
          title: Macro
        playbook_id:
          title: Playbook Id
          type: string
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
        updated_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Updated At
        updated_by_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated By User Id
        updated_by_user_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated By User Name
      required:
      - playbook_id
      - title
      - body
      - status
      - access
      - account_id
      - created_at
      - updated_at
      - created_by_user_id
      - created_by_user_name
      - updated_by_user_id
      - updated_by_user_name
      title: EnterprisePlaybookResponse
      type: object
    EnterpriseSnapshotResponse:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        is_default:
          title: Is Default
          type: boolean
        org:
          $ref: '#/components/schemas/EnterpriseOrganizationResponse'
        pending_scripts:
          anyOf:
          - items:
              $ref: '#/components/schemas/EnterpriseSnapshotScriptResponse'
            type: array
          - type: 'null'
          title: Pending Scripts
        snapshot_id:
          title: Snapshot Id
          type: string
        snapshot_name:
          title: Snapshot Name
          type: string
        status:
          title: Status
          type: string
      required:
      - snapshot_id
      - snapshot_name
      - description
      - status
      - created_at
      - is_default
      - org
      title: EnterpriseSnapshotResponse
      type: object
    EnterpriseSnapshotScriptResponse:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        script_id:
          title: Script Id
          type: string
        script_name:
          title: Script Name
          type: string
        status:
          title: Status
          type: string
      required:
      - script_id
      - script_name
      - status
      - created_at
      title: EnterpriseSnapshotScriptResponse
      type: object
    EnterpriseUserResponse:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        email:
          title: Email
          type: string
        enterprise_role:
          title: Enterprise Role
          type: string
        last_login:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Last Login
        login_count:
          anyOf:
          - type: integer
          - type: 'null'
          title: Login Count
        name:
          title: Name
          type: string
        saml_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Saml Id
        searches_created_count:
          default: 0
          title: Searches Created Count
          type: integer
        sessions_created_count:
          default: 0
          title: Sessions Created Count
          type: integer
        user_id:
          title: User Id
          type: string
      required:
      - user_id
      - email
      - name
      - enterprise_role
      - created_at
      title: EnterpriseUserResponse
      type: object
    GitConnectionResponse:
      properties:
        connection_id:
          title: Connection Id
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        host:
          title: Host
          type: string
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        type:
          enum:
          - github_token
          - github_individual_token
          - github_app
          - gitlab_token
          - gitlab_oauth
          - bitbucket_oauth
          - bitbucket_token
          - azure_devops_oauth
          title: Type
          type: string
      required:
      - connection_id
      - type
      - name
      - created_at
      - host
      title: GitConnectionResponse
      type: object
    GitPermissionRequest:
      properties:
        connection_id:
          title: Connection Id
          type: string
        group_prefix:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Group Prefix
        group_prefix_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Group Prefix Url
        prefix_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Prefix Path
        repo_path:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Repo Path
        repo_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Repo Url
      required:
      - connection_id
      title: GitPermissionRequest
      type: object
    GitPermissionResponse:
      properties:
        group_prefix:
          anyOf:
          - type: string
          - type: 'null'
          title: Group Prefix
        host:
          title: Host
          type: string
        permission_id:
          title: Permission Id
          type: string
        prefix_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Prefix Path
        repo_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Repo Path
      required:
      - permission_id
      - host
      title: GitPermissionResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    HypervisorStatus:
      properties:
        hypervisor_id:
          title: Hypervisor Id
          type: string
        seconds_since_report:
          anyOf:
          - type: integer
          - type: 'null'
          title: Seconds Since Report
        status:
          title: Status
          type: string
      required:
      - hypervisor_id
      - status
      title: HypervisorStatus
      type: object
    MigrateRolesUpdateRequest:
      properties:
        source_role_id:
          title: Source Role Id
          type: string
        target_role_id:
          title: Target Role Id
          type: string
      required:
      - source_role_id
      - target_role_id
      title: MigrateRolesUpdateRequest
      type: object
    OrgGroup:
      properties:
        group_name:
          title: Group Name
          type: string
        role:
          title: Role
          type: string
      required:
      - group_name
      - role
      title: OrgGroup
      type: object
    OrgGroupConfig:
      properties:
        max_cycle_acus:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Cycle Acus
        org_ids:
          items:
            type: string
          title: Org Ids
          type: array
          uniqueItems: true
      required:
      - org_ids
      title: OrgGroupConfig
      type: object
    OrgGroupsConfig:
      description: Configuration mapping group names to their settings.
      properties:
        groups:
          additionalProperties:
            $ref: '#/components/schemas/OrgGroupConfig'
          title: Groups
          type: object
      required:
      - groups
      title: OrgGroupsConfig
      type: object
    OrganizationGroupResponse:
      properties:
        group_name:
          title: Group Name
          type: string
        org_id:
          title: Org Id
          type: string
        role:
          title: Role
          type: string
      required:
      - org_id
      - group_name
      - role
      title: OrganizationGroupResponse
      type: object
    OrganizationResponse:
      properties:
        created_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Created At
        max_cycle_acu_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Cycle Acu Limit
        max_session_acu_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Session Acu Limit
        org_admin_count:
          default: 0
          title: Org Admin Count
          type: integer
        org_id:
          title: Org Id
          type: string
        org_member_count:
          default: 0
          title: Org Member Count
          type: integer
        org_name:
          title: Org Name
          type: string
        org_user_count:
          default: 0
          title: Org User Count
          type: integer
      required:
      - org_id
      - org_name
      - created_at
      title: OrganizationResponse
      type: object
    OrganizationUpdate:
      properties:
        display_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Display Name
        max_acu_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Acu Limit
      title: OrganizationUpdate
      type: object
    PaginatedResponse_ApiKeyResponse_:
      properties:
        has_more:
          title: Has More
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/ApiKeyResponse'
          title: Items
          type: array
        limit:
          title: Limit
          type: integer
        next_cursor:
          anyOf:
          - type: integer
          - type: 'null'
          title: Next Cursor
        skip:
          title: Skip
          type: integer
        total:
          title: Total
          type: integer
      required:
      - items
      - total
      - skip
      - limit
      - has_more
      title: PaginatedResponse[ApiKeyResponse]
      type: object
    PaginatedResponse_EnterpriseGroupResponse_:
      properties:
        has_more:
          title: Has More
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/EnterpriseGroupResponse'
          title: Items
          type: array
        limit:
          title: Limit
          type: integer
        next_cursor:
          anyOf:
          - type: integer
          - type: 'null'
          title: Next Cursor
        skip:
          title: Skip
          type: integer
        total:
          title: Total
          type: integer
      required:
      - items
      - total
      - skip
      - limit
      - has_more
      title: PaginatedResponse[EnterpriseGroupResponse]
      type: object
    PaginatedResponse_EnterpriseUserResponse_:
      properties:
        has_more:
          title: Has More
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/EnterpriseUserResponse'
          title: Items
          type: array
        limit:
          title: Limit
          type: integer
        next_cursor:
          anyOf:
          - type: integer
          - type: 'null'
          title: Next Cursor
        skip:
          title: Skip
          type: integer
        total:
          title: Total
          type: integer
      required:
      - items
      - total
      - skip
      - limit
      - has_more
      title: PaginatedResponse[EnterpriseUserResponse]
      type: object
    PaginatedResponse_GitConnectionResponse_:
      properties:
        has_more:
          title: Has More
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/GitConnectionResponse'
          title: Items
          type: array
        limit:
          title: Limit
          type: integer
        next_cursor:
          anyOf:
          - type: integer
          - type: 'null'
          title: Next Cursor
        skip:
          title: Skip
          type: integer
        total:
          title: Total
          type: integer
      required:
      - items
      - total
      - skip
      - limit
      - has_more
      title: PaginatedResponse[GitConnectionResponse]
      type: object
    PaginatedResponse_GitPermissionResponse_:
      properties:
        has_more:
          title: Has More
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/GitPermissionResponse'
          title: Items
          type: array
        limit:
          title: Limit
          type: integer
        next_cursor:
          anyOf:
          - type: integer
          - type: 'null'
          title: Next Cursor
        skip:
          title: Skip
          type: integer
        total:
          title: Total
          type: integer
      required:
      - items
      - total
      - skip
      - limit
      - has_more
      title: PaginatedResponse[GitPermissionResponse]
      type: object
    PaginatedResponse_OrganizationGroupResponse_:
      properties:
        has_more:
          title: Has More
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/OrganizationGroupResponse'
          title: Items
          type: array
        limit:
          title: Limit
          type: integer
        next_cursor:
          anyOf:
          - type: integer
          - type: 'null'
          title: Next Cursor
        skip:
          title: Skip
          type: integer
        total:
          title: Total
          type: integer
      required:
      - items
      - total
      - skip
      - limit
      - has_more
      title: PaginatedResponse[OrganizationGroupResponse]
      type: object
    PaginatedResponse_OrganizationResponse_:
      properties:
        has_more:
          title: Has More
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/OrganizationResponse'
          title: Items
          type: array
        limit:
          title: Limit
          type: integer
        next_cursor:
          anyOf:
          - type: integer
          - type: 'null'
          title: Next Cursor
        skip:
          title: Skip
          type: integer
        total:
          title: Total
          type: integer
      required:
      - items
      - total
      - skip
      - limit
      - has_more
      title: PaginatedResponse[OrganizationResponse]
      type: object
    PaginatedResponse_SessionDetailResponseBeta_:
      properties:
        has_more:
          title: Has More
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/SessionDetailResponseBeta'
          title: Items
          type: array
        limit:
          title: Limit
          type: integer
        next_cursor:
          anyOf:
          - type: integer
          - type: 'null'
          title: Next Cursor
        skip:
          title: Skip
          type: integer
        total:
          title: Total
          type: integer
      required:
      - items
      - total
      - skip
      - limit
      - has_more
      title: PaginatedResponse[SessionDetailResponseBeta]
      type: object
    PaginatedResponse_SessionDetailResponse_:
      properties:
        has_more:
          title: Has More
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/SessionDetailResponse'
          title: Items
          type: array
        limit:
          title: Limit
          type: integer
        next_cursor:
          anyOf:
          - type: integer
          - type: 'null'
          title: Next Cursor
        skip:
          title: Skip
          type: integer
        total:
          title: Total
          type: integer
      required:
      - items
      - total
      - skip
      - limit
      - has_more
      title: PaginatedResponse[SessionDetailResponse]
      type: object
    PaginatedResponse_SessionResponse_:
      properties:
        has_more:
          title: Has More
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/SessionResponse'
          title: Items
          type: array
        limit:
          title: Limit
          type: integer
        next_cursor:
          anyOf:
          - type: integer
          - type: 'null'
          title: Next Cursor
        skip:
          title: Skip
          type: integer
        total:
          title: Total
          type: integer
      required:
      - items
      - total
      - skip
      - limit
      - has_more
      title: PaginatedResponse[SessionResponse]
      type: object
    PaginatedResponse_UserOrgResponse_:
      properties:
        has_more:
          title: Has More
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/UserOrgResponse'
          title: Items
          type: array
        limit:
          title: Limit
          type: integer
        next_cursor:
          anyOf:
          - type: integer
          - type: 'null'
          title: Next Cursor
        skip:
          title: Skip
          type: integer
        total:
          title: Total
          type: integer
      required:
      - items
      - total
      - skip
      - limit
      - has_more
      title: PaginatedResponse[UserOrgResponse]
      type: object
    PaginatedResponse_UserUsageAnalysisResponse_:
      properties:
        has_more:
          title: Has More
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/UserUsageAnalysisResponse'
          title: Items
          type: array
        limit:
          title: Limit
          type: integer
        next_cursor:
          anyOf:
          - type: integer
          - type: 'null'
          title: Next Cursor
        skip:
          title: Skip
          type: integer
        total:
          title: Total
          type: integer
      required:
      - items
      - total
      - skip
      - limit
      - has_more
      title: PaginatedResponse[UserUsageAnalysisResponse]
      type: object
    PermissionsCreatedSuccessResponse:
      properties:
        permission_ids:
          items:
            type: string
          title: Permission Ids
          type: array
        permission_names:
          additionalProperties:
            type: string
          title: Permission Names
          type: object
        status:
          default: success
          title: Status
          type: string
      required:
      - permission_ids
      - permission_names
      title: PermissionsCreatedSuccessResponse
      type: object
    PrMetrics:
      properties:
        prs_closed:
          title: Prs Closed
          type: integer
        prs_merged:
          title: Prs Merged
          type: integer
        prs_opened:
          title: Prs Opened
          type: integer
      required:
      - prs_opened
      - prs_closed
      - prs_merged
      title: PrMetrics
      type: object
    RepoIndexJobResponse:
      properties:
        commit:
          title: Commit
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        job_id:
          title: Job Id
          type: string
        status:
          enum:
          - failed
          - completed
          - in_progress
          title: Status
          type: string
      required:
      - created_at
      - commit
      - status
      - job_id
      title: RepoIndexJobResponse
      type: object
    ReposResponse:
      properties:
        indexing_enabled:
          title: Indexing Enabled
          type: boolean
        latest_completed_search_index_job:
          anyOf:
          - $ref: '#/components/schemas/RepoIndexJobResponse'
          - type: 'null'
        latest_completed_wiki_index_job:
          anyOf:
          - $ref: '#/components/schemas/RepoIndexJobResponse'
          - type: 'null'
        latest_index:
          anyOf:
          - $ref: '#/components/schemas/RepoIndexJobResponse'
          - type: 'null'
        name:
          title: Name
          type: string
      required:
      - name
      - indexing_enabled
      - latest_index
      - latest_completed_search_index_job
      - latest_completed_wiki_index_job
      title: ReposResponse
      type: object
    RoleResponse:
      properties:
        role_id:
          title: Role Id
          type: string
        role_name:
          title: Role Name
          type: string
        role_type:
          title: Role Type
          type: string
      required:
      - role_id
      - role_name
      - role_type
      title: RoleResponse
      type: object
    RoleUpdateRequest:
      properties:
        role_id:
          title: Role Id
          type: string
        user_ids:
          items:
            type: string
          title: User Ids
          type: array
      required:
      - user_ids
      - role_id
      title: RoleUpdateRequest
      type: object
    SearchesMetrics:
      properties:
        searches_count:
          title: Searches Count
          type: integer
      required:
      - searches_count
      title: SearchesMetrics
      type: object
    SelfResponse:
      properties:
        api_key_id:
          title: Api Key Id
          type: string
        org_id:
          title: Org Id
          type: string
        user_email:
          anyOf:
          - type: string
          - type: 'null'
          title: User Email
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Id
      required:
      - api_key_id
      - user_id
      - user_email
      - org_id
      title: SelfResponse
      type: object
    ServiceKeyRequest:
      properties:
        org_id:
          title: Org Id
          type: string
      required:
      - org_id
      title: ServiceKeyRequest
      type: object
    ServiceKeyResponse:
      properties:
        api_key:
          title: Api Key
          type: string
        org_id:
          title: Org Id
          type: string
      required:
      - api_key
      - org_id
      title: ServiceKeyResponse
      type: object
    SessionAnalysisActionItem:
      properties:
        action_item:
          title: Action Item
          type: string
        issue_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Issue Id
        type:
          title: Type
          type: string
      required:
      - issue_id
      - type
      - action_item
      title: SessionAnalysisActionItem
      type: object
    SessionAnalysisData:
      properties:
        action_items:
          default: []
          items:
            $ref: '#/components/schemas/SessionAnalysisActionItem'
          title: Action Items
          type: array
        issues:
          default: []
          items:
            $ref: '#/components/schemas/SessionAnalysisIssue'
          title: Issues
          type: array
        suggested_prompt:
          anyOf:
          - $ref: '#/components/schemas/SessionAnalysisSuggestedPrompt'
          - type: 'null'
        timeline:
          default: []
          items:
            $ref: '#/components/schemas/SessionAnalysisTimelineEvent'
          title: Timeline
          type: array
      required:
      - suggested_prompt
      title: SessionAnalysisData
      type: object
    SessionAnalysisFeedbackItem:
      properties:
        details:
          anyOf:
          - type: string
          - type: 'null'
          title: Details
        excerpt:
          anyOf:
          - type: string
          - type: 'null'
          title: Excerpt
        issue_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Issue Id
        summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Summary
      required:
      - issue_id
      - summary
      - excerpt
      - details
      title: SessionAnalysisFeedbackItem
      type: object
    SessionAnalysisIssue:
      properties:
        impact:
          title: Impact
          type: string
        issue:
          title: Issue
          type: string
        label:
          title: Label
          type: string
      required:
      - issue
      - impact
      - label
      title: SessionAnalysisIssue
      type: object
    SessionAnalysisSuggestedPrompt:
      properties:
        feedback_items:
          items:
            $ref: '#/components/schemas/SessionAnalysisFeedbackItem'
          title: Feedback Items
          type: array
        original_prompt:
          title: Original Prompt
          type: string
        suggested_prompt:
          title: Suggested Prompt
          type: string
      required:
      - original_prompt
      - suggested_prompt
      - feedback_items
      title: SessionAnalysisSuggestedPrompt
      type: object
    SessionAnalysisTimelineEvent:
      properties:
        description:
          title: Description
          type: string
        title:
          title: Title
          type: string
      required:
      - title
      - description
      title: SessionAnalysisTimelineEvent
      type: object
    SessionDetailResponse:
      properties:
        acus_consumed:
          title: Acus Consumed
          type: number
        created_at:
          format: date-time
          title: Created At
          type: string
        initial_user_message:
          anyOf:
          - type: string
          - type: 'null'
          title: Initial User Message
        org_id:
          title: Org Id
          type: string
        pull_requests:
          items:
            $ref: '#/components/schemas/SessionPullRequest'
          title: Pull Requests
          type: array
        session_analysis:
          anyOf:
          - $ref: '#/components/schemas/SessionAnalysisData'
          - type: 'null'
        session_id:
          title: Session Id
          type: string
        status:
          enum:
          - new
          - claimed
          - running
          - exit
          - error
          - suspended
          - resuming
          title: Status
          type: string
        tags:
          items:
            type: string
          title: Tags
          type: array
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        updated_at:
          format: date-time
          title: Updated At
          type: string
        url:
          title: Url
          type: string
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Id
      required:
      - session_id
      - url
      - status
      - tags
      - org_id
      - created_at
      - updated_at
      - acus_consumed
      - pull_requests
      - session_analysis
      - initial_user_message
      title: SessionDetailResponse
      type: object
    SessionDetailResponseBeta:
      properties:
        acus_consumed:
          title: Acus Consumed
          type: number
        created_at:
          format: date-time
          title: Created At
          type: string
        devin_status:
          title: Devin Status
          type: string
        initial_user_message:
          anyOf:
          - type: string
          - type: 'null'
          title: Initial User Message
        org_id:
          title: Org Id
          type: string
        prs:
          items:
            $ref: '#/components/schemas/SessionPullRequestBeta'
          title: Prs
          type: array
        session_analysis:
          anyOf:
          - $ref: '#/components/schemas/SessionAnalysisData'
          - type: 'null'
        session_id:
          title: Session Id
          type: string
        session_url:
          title: Session Url
          type: string
        tags:
          items:
            type: string
          title: Tags
          type: array
        updated_at:
          format: date-time
          title: Updated At
          type: string
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Id
      required:
      - session_id
      - devin_status
      - session_url
      - tags
      - org_id
      - created_at
      - updated_at
      - acus_consumed
      - prs
      - session_analysis
      - initial_user_message
      title: SessionDetailResponseBeta
      type: object
    SessionPullRequest:
      properties:
        state:
          anyOf:
          - type: string
          - type: 'null'
          title: State
        url:
          title: Url
          type: string
      required:
      - url
      title: SessionPullRequest
      type: object
    SessionPullRequestBeta:
      properties:
        pr_url:
          title: Pr Url
          type: string
        state:
          anyOf:
          - type: string
          - type: 'null'
          title: State
      required:
      - pr_url
      - state
      title: SessionPullRequestBeta
      type: object
    SessionResponse:
      properties:
        acus_consumed:
          title: Acus Consumed
          type: number
        created_at:
          format: date-time
          title: Created At
          type: string
        org_id:
          title: Org Id
          type: string
        pull_requests:
          items:
            $ref: '#/components/schemas/SessionPullRequest'
          title: Pull Requests
          type: array
        session_id:
          title: Session Id
          type: string
        status:
          enum:
          - new
          - claimed
          - running
          - exit
          - error
          - suspended
          - resuming
          title: Status
          type: string
        tags:
          items:
            type: string
          title: Tags
          type: array
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        updated_at:
          format: date-time
          title: Updated At
          type: string
        url:
          title: Url
          type: string
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Id
      required:
      - session_id
      - url
      - status
      - tags
      - org_id
      - created_at
      - updated_at
      - acus_consumed
      - pull_requests
      title: SessionResponse
      type: object
    SessionsMetrics:
      properties:
        sessions_count:
          title: Sessions Count
          type: integer
      required:
      - sessions_count
      title: SessionsMetrics
      type: object
    SuccessResponse:
      properties:
        status:
          default: success
          title: Status
          type: string
      title: SuccessResponse
      type: object
    UsageMetrics:
      properties:
        prs_closed:
          title: Prs Closed
          type: integer
        prs_merged:
          title: Prs Merged
          type: integer
        prs_opened:
          title: Prs Opened
          type: integer
        searches_count:
          title: Searches Count
          type: integer
        sessions_count:
          title: Sessions Count
          type: integer
      required:
      - sessions_count
      - searches_count
      - prs_opened
      - prs_closed
      - prs_merged
      title: UsageMetrics
      type: object
    UserConsumptionResponse:
      properties:
        consumption_by_date:
          additionalProperties:
            type: number
          propertyNames:
            format: date
          title: Consumption By Date
          type: object
        consumption_by_org_id:
          additionalProperties:
            type: number
          title: Consumption By Org Id
          type: object
        total_acus:
          title: Total Acus
          type: number
      required:
      - total_acus
      - consumption_by_date
      - consumption_by_org_id
      title: UserConsumptionResponse
      type: object
    UserOrgResponse:
      properties:
        email:
          title: Email
          type: string
        enterprise_role:
          anyOf:
          - type: string
          - type: 'null'
          title: Enterprise Role
        name:
          title: Name
          type: string
        org_id:
          title: Org Id
          type: string
        org_name:
          title: Org Name
          type: string
        org_role:
          title: Org Role
          type: string
        org_role_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Role Name
        user_id:
          title: User Id
          type: string
      required:
      - user_id
      - email
      - name
      - org_id
      - org_name
      - org_role
      title: UserOrgResponse
      type: object
    UserUsageAnalysisResponse:
      properties:
        email:
          title: Email
          type: string
        last_30_days:
          $ref: '#/components/schemas/UserUsageMetrics'
        last_7_days:
          $ref: '#/components/schemas/UserUsageMetrics'
        lifetime:
          $ref: '#/components/schemas/UserUsageMetrics'
        name:
          title: Name
          type: string
        user_id:
          title: User Id
          type: string
      required:
      - user_id
      - email
      - name
      - last_7_days
      - last_30_days
      - lifetime
      title: UserUsageAnalysisResponse
      type: object
    UserUsageMetrics:
      properties:
        average_acus_per_session:
          title: Average Acus Per Session
          type: number
        searches_started:
          title: Searches Started
          type: integer
        sessions_started:
          title: Sessions Started
          type: integer
        total_acus_consumed:
          title: Total Acus Consumed
          type: number
      required:
      - average_acus_per_session
      - total_acus_consumed
      - sessions_started
      - searches_started
      title: UserUsageMetrics
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
      - loc
      - msg
      - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: Personal API Key (apk_user_*) for Enterprise Admins only
      scheme: bearer
      type: http
info:
  description: Devin v2 API with Personal API Keys for Enterprise Admins
  title: Devin API v2
  version: 2.0.0
openapi: 3.1.0
paths:
  /beta/v2/enterprise/repositories/bulk-index:
    post:
      description: Bulk index up to 100 repositories with options for fast indexing and/or wiki generation.
      operationId: bulk_index_repositories_beta_v2_enterprise_repositories_bulk_index_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkRepoIndexRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Bulk Index Repositories
      tags:
      - repositories
  /beta/v2/enterprise/repositories/{org_id}:
    get:
      operationId: get_job_status_beta_v2_enterprise_repositories__org_id__get
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ReposResponse'
                title: Response Get Job Status Beta V2 Enterprise Repositories  Org Id  Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Job Status
      tags:
      - repositories
  /beta/v2/enterprise/sessions:
    get:
      operationId: list_organization_sessions_beta_beta_v2_enterprise_sessions_get
      parameters:
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      - in: query
        name: created_date_from
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Created Date From
      - in: query
        name: created_date_to
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Created Date To
      - in: query
        name: updated_date_from
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Updated Date From
      - in: query
        name: updated_date_to
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Updated Date To
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      - in: query
        name: session_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Session Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionDetailResponseBeta_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Organization Sessions Beta
      tags:
      - sessions
  /beta/v2/enterprise/sessions/{session_id}:
    get:
      description: Beta endpoint for getting a single session - calls prod function and transforms response.
      operationId: get_session_detail_beta_beta_v2_enterprise_sessions__session_id__get
      parameters:
      - in: path
        name: session_id
        required: true
        schema:
          title: Session Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionDetailResponseBeta'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Session Detail Beta
      tags:
      - sessions
  /beta/v2/enterprise/user-usage-analysis:
    get:
      description: 'Get paginated user usage analysis with ACU consumption metrics.

        Returns average ACUs per session, total ACUs, session counts, and search counts

        for last 7 days, last 30 days, and lifetime.'
      operationId: user_usage_analysis_endpoint_beta_v2_enterprise_user_usage_analysis_get
      parameters:
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_UserUsageAnalysisResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: User Usage Analysis Endpoint
      tags:
      - user-usage
  /v2/enterprise/api-keys:
    get:
      description: Get API keys across organizations in the enterprise with pagination and optional org filter.
      operationId: get_enterprise_api_keys_endpoint_v2_enterprise_api_keys_get
      parameters:
      - in: query
        name: page
        required: false
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
      - in: query
        name: per_page
        required: false
        schema:
          default: 25
          maximum: 100
          minimum: 1
          title: Per Page
          type: integer
      - in: query
        name: org_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_ApiKeyResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Enterprise Api Keys Endpoint
      tags:
      - api-keys
    post:
      description: Provision a service API key for an organization in the enterprise.
      operationId: provision_service_api_key_endpoint_v2_enterprise_api_keys_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceKeyRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceKeyResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Provision Service Api Key Endpoint
      tags:
      - api-keys
  /v2/enterprise/api-keys/{api_key_id}:
    delete:
      description: Revoke a specific API key in the enterprise.
      operationId: revoke_enterprise_api_key_endpoint_v2_enterprise_api_keys__api_key_id__delete
      parameters:
      - in: path
        name: api_key_id
        required: true
        schema:
          title: Api Key Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Revoke Enterprise Api Key Endpoint
      tags:
      - api-keys
  /v2/enterprise/audit-logs:
    get:
      description: Get audit logs for the current user's organization. Only accessible by enterprise admins.
      operationId: get_audit_logs_v2_enterprise_audit_logs_get
      parameters:
      - in: query
        name: before
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Before
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          title: Limit
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogsResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Audit Logs
      tags:
      - audit-logs
      - audit-logs
  /v2/enterprise/consumption/cycles:
    get:
      description: Generate a list of all the billing cycles for the enterprise until today.
      operationId: consumption_cycles_endpoint_v2_enterprise_consumption_cycles_get
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/BillingCycle'
                title: Response Consumption Cycles Endpoint V2 Enterprise Consumption Cycles Get
                type: array
          description: Successful Response
      summary: Consumption Cycles Endpoint
      tags:
      - consumption
  /v2/enterprise/consumption/daily:
    get:
      description: 'Return daily consumption for the current billing cycle.


        **Timezone behavior**: Billing cycles use midnight PST (Pacific Standard Time)

        as the day boundary, which corresponds to 08:00:00 UTC. To match the consumption

        data shown in the Devin dashboard, pass timestamps with this timezone offset

        (e.g., `2025-12-05T08:00:00Z` for December 5, 2025 PST).'
      operationId: daily_consumption_endpoint_v2_enterprise_consumption_daily_get
      parameters:
      - in: query
        name: start_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start Date
      - in: query
        name: end_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End Date
      - in: query
        name: start
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start
      - in: query
        name: end
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumptionResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Daily Consumption Endpoint
      tags:
      - consumption
  /v2/enterprise/consumption/daily/{user_id}:
    get:
      description: 'Return daily consumption for a specific user. Defaults to current billing cycle.


        **Timezone behavior**: Billing cycles use midnight PST (Pacific Standard Time)

        as the day boundary, which corresponds to 08:00:00 UTC. To match the consumption

        data shown in the Devin dashboard, pass timestamps with this timezone offset

        (e.g., `2025-12-05T08:00:00Z` for December 5, 2025 PST).'
      operationId: user_daily_consumption_endpoint_v2_enterprise_consumption_daily__user_id__get
      parameters:
      - in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      - in: query
        name: start_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start Date
      - in: query
        name: end_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End Date
      - in: query
        name: start
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start
      - in: query
        name: end
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserConsumptionResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: User Daily Consumption Endpoint
      tags:
      - consumption
  /v2/enterprise/git/connections:
    get:
      operationId: enterprise_organization_connections_endpoint_v2_enterprise_git_connections_get
      parameters:
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_GitConnectionResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organization Connections Endpoint
      tags:
      - git-connections
  /v2/enterprise/groups:
    get:
      operationId: enterprise_groups_endpoint_v2_enterprise_groups_get
      parameters:
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_EnterpriseGroupResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Groups Endpoint
      tags:
      - groups
  /v2/enterprise/groups/{group_name}:
    get:
      operationId: enterprise_group_details_endpoint_v2_enterprise_groups__group_name__get
      parameters:
      - in: path
        name: group_name
        required: true
        schema:
          title: Group Name
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterpriseGroupResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Group Details Endpoint
      tags:
      - groups
  /v2/enterprise/hypervisors/health:
    get:
      description: "Get all hypervisors for an enterprise with their current health status.\n\nReturns:\n    List of hypervisors\
        \ with their hypervisor_id and status"
      operationId: get_enterprise_hypervisors_health_v2_enterprise_hypervisors_health_get
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/HypervisorStatus'
                title: Response Get Enterprise Hypervisors Health V2 Enterprise Hypervisors Health Get
                type: array
          description: Successful Response
      summary: Get Enterprise Hypervisors Health
      tags:
      - hypervisors
  /v2/enterprise/members:
    get:
      description: List paginated members in this enterprise
      operationId: enterprise_members_endpoint_v2_enterprise_members_get
      parameters:
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      - in: query
        name: email
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Email
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_EnterpriseUserResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Members Endpoint
      tags:
      - members
  /v2/enterprise/members/invite:
    post:
      description: Invite multiple users to the enterprise by email (bulk invite, max 100 users)
      operationId: enterprise_members_invite_endpoint_v2_enterprise_members_invite_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnterpriseMemberInviteRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterpriseMemberInviteResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Members Invite Endpoint
      tags:
      - members
  /v2/enterprise/members/{user_id}:
    delete:
      description: Remove a user from an organization
      operationId: enterprise_members_removal_endpoint_v2_enterprise_members__user_id__delete
      parameters:
      - in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Members Removal Endpoint
      tags:
      - members
    get:
      description: Get details for a specific member in this enterprise
      operationId: enterprise_member_details_endpoint_v2_enterprise_members__user_id__get
      parameters:
      - in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterpriseUserResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Member Details Endpoint
      tags:
      - members
  /v2/enterprise/members/{user_id}/organizations:
    get:
      description: Get paginated list of orgs that this user has access to
      operationId: enterprise_user_organizations_endpoint_v2_enterprise_members__user_id__organizations_get
      parameters:
      - in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_UserOrgResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise User Organizations Endpoint
      tags:
      - members
  /v2/enterprise/metrics/prs:
    get:
      operationId: enterprise_pr_metrics_endpoint_v2_enterprise_metrics_prs_get
      parameters:
      - in: query
        name: start_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start Date
      - in: query
        name: end_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End Date
      - in: query
        name: start
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start
      - in: query
        name: end
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrMetrics'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Pr Metrics Endpoint
      tags:
      - metrics
  /v2/enterprise/metrics/searches:
    get:
      operationId: enterprise_searches_metrics_endpoint_v2_enterprise_metrics_searches_get
      parameters:
      - in: query
        name: start_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start Date
      - in: query
        name: end_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End Date
      - in: query
        name: start
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start
      - in: query
        name: end
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchesMetrics'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Searches Metrics Endpoint
      tags:
      - metrics
  /v2/enterprise/metrics/sessions:
    get:
      operationId: enterprise_sessions_metrics_endpoint_v2_enterprise_metrics_sessions_get
      parameters:
      - in: query
        name: start_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start Date
      - in: query
        name: end_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End Date
      - in: query
        name: start
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start
      - in: query
        name: end
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionsMetrics'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Sessions Metrics Endpoint
      tags:
      - metrics
  /v2/enterprise/metrics/usage:
    get:
      operationId: enterprise_usage_metrics_endpoint_v2_enterprise_metrics_usage_get
      parameters:
      - in: query
        name: start_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start Date
      - in: query
        name: end_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End Date
      - in: query
        name: start
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start
      - in: query
        name: end
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageMetrics'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Usage Metrics Endpoint
      tags:
      - metrics
  /v2/enterprise/org-group-limits:
    get:
      description: Get the current organization groups configuration.
      operationId: get_org_groups_config_v2_enterprise_org_group_limits_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgGroupsConfig'
          description: Successful Response
      summary: Get Org Groups Config
      tags:
      - org-group-limits
    put:
      description: 'Update the organization groups configuration.


        This endpoint replaces the entire org groups configuration with the provided config.

        - Groups not in the request will be deleted

        - Groups in the request will be created or updated to match the config'
      operationId: update_org_groups_config_v2_enterprise_org_group_limits_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgGroupsConfig'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgGroupsConfig'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Update Org Groups Config
      tags:
      - org-group-limits
  /v2/enterprise/organizations:
    get:
      description: List paginated organizations in this enterprise
      operationId: enterprise_organizations_endpoint_v2_enterprise_organizations_get
      parameters:
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_OrganizationResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organizations Endpoint
      tags:
      - organizations
    post:
      description: Create a new organization in this enterprise
      operationId: create_enterprise_organization_endpoint_v2_enterprise_organizations_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnterpriseOrgCreate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Enterprise Organization Endpoint
      tags:
      - organizations
  /v2/enterprise/organizations/{org_id}:
    delete:
      description: Delete an organization from this enterprise
      operationId: delete_enterprise_organization_endpoint_v2_enterprise_organizations__org_id__delete
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Delete Enterprise Organization Endpoint
      tags:
      - organizations
    get:
      description: Get details for a specific organization in this enterprise
      operationId: enterprise_organization_details_endpoint_v2_enterprise_organizations__org_id__get
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organization Details Endpoint
      tags:
      - organizations
    patch:
      description: Update an organization's ACU limit and/or display name
      operationId: update_organization_endpoint_v2_enterprise_organizations__org_id__patch
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationUpdate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Update Organization Endpoint
      tags:
      - organizations
  /v2/enterprise/organizations/{org_id}/clone:
    post:
      operationId: clone_repo_v2_enterprise_organizations__org_id__clone_post
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloneRepoRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRepoSnapshotResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Clone Repo
      tags:
      - organizations
  /v2/enterprise/organizations/{org_id}/git/connections:
    get:
      operationId: enterprise_organization_connections_endpoint_v2_enterprise_organizations__org_id__git_connections_get
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_GitConnectionResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organization Connections Endpoint
      tags:
      - organizations
  /v2/enterprise/organizations/{org_id}/git/permissions:
    get:
      description: Get paginated list of git permissions that this org has access to
      operationId: enterprise_organization_permissions_endpoint_v2_enterprise_organizations__org_id__git_permissions_get
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_GitPermissionResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organization Permissions Endpoint
      tags:
      - organizations
    post:
      description: 'Add new git permissions to an organization.


        Returns created permission IDs in the same order as input, along with

        a mapping from permission_id to repo/group path.'
      operationId: enterprise_organization_permission_addition_endpoint_v2_enterprise_organizations__org_id__git_permissions_post
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/GitPermissionRequest'
              title: Payload
              type: array
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsCreatedSuccessResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organization Permission Addition Endpoint
      tags:
      - organizations
  /v2/enterprise/organizations/{org_id}/git/permissions/{permission_id}:
    delete:
      operationId: enterprise_organization_permission_removal_endpoint_v2_enterprise_organizations__org_id__git_permissions__permission_id__delete
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      - in: path
        name: permission_id
        required: true
        schema:
          title: Permission Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organization Permission Removal Endpoint
      tags:
      - organizations
  /v2/enterprise/organizations/{org_id}/groups:
    get:
      description: Get paginated list of enterprise groups that are in this org
      operationId: enterprise_organization_groups_endpoint_v2_enterprise_organizations__org_id__groups_get
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_OrganizationGroupResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organization Groups Endpoint
      tags:
      - organizations
    post:
      description: Add a new group to an organization
      operationId: enterprise_organization_groups_addition_endpoint_v2_enterprise_organizations__org_id__groups_post
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgGroup'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationGroupResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organization Groups Addition Endpoint
      tags:
      - organizations
  /v2/enterprise/organizations/{org_id}/members:
    get:
      description: Get paginated list of users that are in this org
      operationId: enterprise_organization_members_endpoint_v2_enterprise_organizations__org_id__members_get
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_UserOrgResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organization Members Endpoint
      tags:
      - organizations
    post:
      description: 'Bulk add users to an organization


        Note: Copied from app.routers.enterprises.py. Needs to be refactored properly

        into the membership sdk.'
      operationId: enterprise_organizations_member_addition_endpoint_v2_enterprise_organizations__org_id__members_post
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnterpriseBulkOrgMembersUpdate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organizations Member Addition Endpoint
      tags:
      - organizations
  /v2/enterprise/organizations/{org_id}/members/roles:
    patch:
      description: 'Update organization roles for users available to the user''s enterprise.

        Takes a list of user_ids and a role_id.'
      operationId: enterprise_organization_members_role_update_endpoint_v2_enterprise_organizations__org_id__members_roles_patch
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organization Members Role Update Endpoint
      tags:
      - organizations
  /v2/enterprise/organizations/{org_id}/members/{user_id}:
    delete:
      description: Remove a user from an organization
      operationId: enterprise_organizations_member_removal_endpoint_v2_enterprise_organizations__org_id__members__user_id__delete
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      - in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Enterprise Organizations Member Removal Endpoint
      tags:
      - organizations
  /v2/enterprise/organizations/{org_id}/sessions:
    get:
      description: List sessions for a specific organization (base model).
      operationId: list_organization_sessions_v2_enterprise_organizations__org_id__sessions_get
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      - in: query
        name: created_date_from
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Created Date From
      - in: query
        name: created_date_to
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Created Date To
      - in: query
        name: updated_date_from
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Updated Date From
      - in: query
        name: updated_date_to
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Updated Date To
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      - in: query
        name: session_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Session Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Organization Sessions
      tags:
      - sessions
  /v2/enterprise/organizations/{org_id}/sessions/insights:
    get:
      description: List sessions for a specific organization (detail model).
      operationId: list_organization_sessions_detail_v2_enterprise_organizations__org_id__sessions_insights_get
      parameters:
      - in: path
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      - in: query
        name: created_date_from
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Created Date From
      - in: query
        name: created_date_to
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Created Date To
      - in: query
        name: updated_date_from
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Updated Date From
      - in: query
        name: updated_date_to
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Updated Date To
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      - in: query
        name: session_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Session Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionDetailResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Organization Sessions Detail
      tags:
      - sessions
  /v2/enterprise/playbooks:
    get:
      description: Get all enterprise playbooks.
      operationId: get_enterprise_playbooks_v2_enterprise_playbooks_get
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/EnterprisePlaybookResponse'
                title: Response Get Enterprise Playbooks V2 Enterprise Playbooks Get
                type: array
          description: Successful Response
      summary: Get Enterprise Playbooks
      tags:
      - playbooks
    post:
      description: Create a new enterprise playbook.
      operationId: create_enterprise_playbook_v2_enterprise_playbooks_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnterprisePlaybookRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterprisePlaybookResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Enterprise Playbook
      tags:
      - playbooks
  /v2/enterprise/roles:
    get:
      description: 'List all roles that are available to the user''s enterprise.

        For each role, include the role_id, role_name, and role_type.'
      operationId: enterprise_roles_endpoint_v2_enterprise_roles_get
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/RoleResponse'
                title: Response Enterprise Roles Endpoint V2 Enterprise Roles Get
                type: array
          description: Successful Response
      summary: Enterprise Roles Endpoint
      tags:
      - roles
  /v2/enterprise/self:
    get:
      operationId: handle_get_self_v2_enterprise_self_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SelfResponse'
          description: Successful Response
      summary: Get Self
      tags:
      - self
      - self
  /v2/enterprise/sessions:
    get:
      operationId: list_sessions_v2_enterprise_sessions_get
      parameters:
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      - in: query
        name: created_date_from
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Created Date From
      - in: query
        name: created_date_to
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Created Date To
      - in: query
        name: updated_date_from
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Updated Date From
      - in: query
        name: updated_date_to
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Updated Date To
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      - in: query
        name: session_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Session Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Sessions
      tags:
      - sessions
  /v2/enterprise/sessions/insights:
    get:
      description: List sessions with detailed information for enterprise.
      operationId: list_sessions_detail_v2_enterprise_sessions_insights_get
      parameters:
      - in: query
        name: skip
        required: false
        schema:
          default: 0
          minimum: 0
          title: Skip
          type: integer
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      - in: query
        name: created_date_from
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Created Date From
      - in: query
        name: created_date_to
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Created Date To
      - in: query
        name: updated_date_from
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Updated Date From
      - in: query
        name: updated_date_to
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Updated Date To
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      - in: query
        name: session_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Session Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionDetailResponse_'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Sessions Detail
      tags:
      - sessions
  /v2/enterprise/sessions/{session_id}:
    get:
      description: Get a single session by ID with detailed info.
      operationId: get_session_detail_v2_enterprise_sessions__session_id__get
      parameters:
      - in: path
        name: session_id
        required: true
        schema:
          title: Session Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionDetailResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Session Detail
      tags:
      - sessions
security:
- bearerAuth: []
