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

# Get Latest Trajectory For Workflow

> Get the latest trajectory for a specific workflow.

Returns the most recently updated trajectory for the workflow.
The workflow must belong to the authenticated organization.



## OpenAPI

````yaml /openapi.json get /v1/workflows/{workflow_id}/latest-trajectory
openapi: 3.1.0
info:
  title: Cyberdesk Cloud
  description: >-
    The Cyberdesk API provides programmatic access to all platform features,
    enabling you to automate desktop tasks at scale.
  version: 1.0.0
servers:
  - url: https://api.cyberdesk.io
    description: Production server
  - url: https://cyberdesk-api-dev.fly.dev
    description: Development server
security: []
paths:
  /v1/workflows/{workflow_id}/latest-trajectory:
    get:
      tags:
        - trajectories
      summary: Get Latest Trajectory For Workflow
      description: |-
        Get the latest trajectory for a specific workflow.

        Returns the most recently updated trajectory for the workflow.
        The workflow must belong to the authenticated organization.
      operationId: >-
        get_latest_trajectory_for_workflow_v1_workflows__workflow_id__latest_trajectory_get
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrajectoryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TrajectoryResponse:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        workflow_id:
          type: string
          format: uuid
          title: Workflow Id
        run_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Run Id
          description: Optional run that created this trajectory
        trajectory_data:
          items:
            additionalProperties: true
            type: object
          type: array
          minItems: 1
          title: Trajectory Data
        dimensions:
          additionalProperties:
            type: integer
          type: object
          title: Dimensions
          description: Display dimensions when trajectory was recorded
        original_input_values:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Original Input Values
          description: Original input values used when trajectory was created
        is_approved:
          type: boolean
          title: Is Approved
        has_been_approved:
          type: boolean
          title: Has Been Approved
        is_generated:
          type: boolean
          title: Is Generated
        is_main:
          type: boolean
          title: Is Main
        id:
          type: string
          format: uuid
          title: Id
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        organization_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - workflow_id
        - trajectory_data
        - dimensions
        - is_approved
        - has_been_approved
        - is_generated
        - is_main
        - id
        - created_at
        - updated_at
      title: TrajectoryResponse
      description: Trajectory response schema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
          additionalProperties: true
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````