> ## Documentation Index
> Fetch the complete documentation index at: https://konduktor-docs.yakko.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Reorder Phases



## OpenAPI

````yaml /openapi.json post /api/workspaces/{id}/projects/{project_id}/phases/reorder
openapi: 3.1.0
info:
  title: Konduktor
  version: 0.1.0
servers:
  - url: http://localhost:8080
    description: Local instance (default)
security: []
paths:
  /api/workspaces/{id}/projects/{project_id}/phases/reorder:
    post:
      tags:
        - phases
      summary: Reorder Phases
      operationId: >-
        reorder_phases_api_workspaces__id__projects__project_id__phases_reorder_post
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReorderPhasesRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/PhaseResponse'
                type: array
                title: >-
                  Response Reorder Phases Api Workspaces  Id  Projects  Project
                  Id  Phases Reorder Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ReorderPhasesRequest:
      properties:
        phase_orders:
          items:
            type: integer
          type: array
          title: Phase Orders
      type: object
      required:
        - phase_orders
      title: ReorderPhasesRequest
    PhaseResponse:
      properties:
        project_id:
          type: string
          title: Project Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        phase_order:
          type: integer
          title: Phase Order
        status:
          type: string
          title: Status
        tasks:
          items:
            $ref: '#/components/schemas/TaskResponse'
          type: array
          title: Tasks
          default: []
        created_at:
          type: string
          title: Created At
      type: object
      required:
        - project_id
        - name
        - description
        - phase_order
        - status
        - created_at
      title: PhaseResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskResponse:
      properties:
        id:
          type: string
          title: Id
        workspace_id:
          type: string
          title: Workspace Id
        title:
          type: string
          title: Title
        description:
          type: string
          title: Description
        status:
          type: string
          title: Status
        position:
          type: number
          title: Position
        priority:
          type: string
          enum:
            - p0
            - p1
            - p2
            - p3
            - p4
          title: Priority
        tags:
          items:
            type: string
          type: array
          title: Tags
        pr_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Pr Url
        has_merge_conflict:
          type: boolean
          title: Has Merge Conflict
          default: false
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
          default: null
        phase:
          anyOf:
            - type: integer
            - type: 'null'
          title: Phase
          default: null
        blocked:
          type: boolean
          title: Blocked
          default: false
        project_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Name
          default: null
        phase_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Phase Name
          default: null
        questions:
          items:
            $ref: '#/components/schemas/QuestionResponse'
          type: array
          title: Questions
          default: []
        task_runs:
          items:
            $ref: '#/components/schemas/TaskRunResponse'
          type: array
          title: Task Runs
          default: []
        latest_run_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Latest Run Status
          default: null
        latest_run_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Latest Run Error
          default: null
        latest_run_trigger:
          anyOf:
            - type: string
            - type: 'null'
          title: Latest Run Trigger
          default: null
        created_at:
          type: string
          title: Created At
        updated_at:
          type: string
          title: Updated At
        done_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Done At
          default: null
      type: object
      required:
        - id
        - workspace_id
        - title
        - description
        - status
        - position
        - priority
        - tags
        - pr_url
        - created_at
        - updated_at
      title: TaskResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    QuestionResponse:
      properties:
        id:
          type: string
          title: Id
        workspace_id:
          type: string
          title: Workspace Id
        task_id:
          type: string
          title: Task Id
        task_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Title
        content:
          type: string
          title: Content
        context:
          anyOf:
            - type: string
            - type: 'null'
          title: Context
        options:
          anyOf:
            - type: array
              items:
                type: string
              maxItems: 4
            - type: 'null'
          title: Options
        answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Answer
        status:
          type: string
          title: Status
        priority:
          type: integer
          title: Priority
        created_at:
          type: string
          title: Created At
        answered_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Answered At
      type: object
      required:
        - id
        - workspace_id
        - task_id
        - task_title
        - content
        - context
        - options
        - answer
        - status
        - priority
        - created_at
        - answered_at
      title: QuestionResponse
    TaskRunResponse:
      properties:
        id:
          type: string
          title: Id
        task_id:
          type: string
          title: Task Id
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
        attempt_number:
          type: integer
          title: Attempt Number
        status:
          type: string
          title: Status
        exit_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Exit Code
          default: null
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          default: null
        started_at:
          type: string
          title: Started At
        finished_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Finished At
        duration_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Duration Seconds
        trigger:
          type: string
          title: Trigger
          default: manual
      type: object
      required:
        - id
        - task_id
        - session_id
        - attempt_number
        - status
        - started_at
        - finished_at
      title: TaskRunResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````