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

# GET /v1/workflows/{id}/history

Load a workflow with recency-sorted node summaries, canonical graph edges, and compact linked benchmark summaries.

Use `limit` and `offset` to page returned node summaries. `limit` defaults to `25`, can be set up to `500`, and `offset` defaults to `0`. Use `max_characters` to truncate long free-text fields such as titles, hypotheses, analyses, result-data strings, config strings, and benchmark-summary strings. Omit it to receive untruncated text.

The response includes:

* `workflow.main_path`: ordered root-to-head node IDs for the most recently created leaf chain.
* `workflow.head_node_id`: the most recent leaf node selected for `main_path`.
* `competition`: light competition metadata with `competition_id`, `name`, `slug`, and `source_type`.
* `graph.nodes`: paged node summaries sorted newest first, with `hypothesis` and `on_main_path`.
* `graph.edges`: canonical thin `{ from, to, type }` workflow edges.
* `metadata`: node page metadata with `limit`, `offset`, `returned_count`, and `total_count`.

Auth: Droyd API key or signed-in user bearer token. Alias:
`GET /api/v1/workflows/{id}/history`. The path parameter must be an owned
workflow UUID. Optional query parameters are `limit` (1-500, default 25),
`offset` (integer at least 0), and `max_characters` (integer at least 1).
`graph.nodes` is newest first and paged; `metadata.total_count` is the count
before pagination. `graph.edges` is the complete, unpaged relationship list.
`main_path` is Droyd's current root-to-head path through the research graph.
Use `max_characters` when a list view needs compact analysis and result text.


## OpenAPI

````yaml api-key.openapi.json GET /v1/workflows/{id}/history
openapi: 3.1.0
info:
  title: Droyd API-key Automation API
  version: 1.0.0
  description: >-
    The production API contract for Droyd API-key automations. It contains only
    operations that accept a Droyd API key. `/v1` is canonical; `/api/v1` is a
    compatibility alias.
servers: []
security:
  - droydApiKeyBearer: []
  - droydApiKeyHeader: []
tags:
  - name: Identity
    description: Account-scoped automation identity and onboarding state.
  - name: Workflows
    description: Caller-owned workflows and research nodes.
  - name: Competitions
    description: Competition readiness, submissions, and race entries.
  - name: Experiments
    description: Experiments, artifacts, agent versions, and evaluations.
  - name: Usage
    description: Caller-owned evaluation usage.
  - name: Billing
    description: Caller-owned prepaid credit balances and funding.
paths:
  /v1/workflows/{id}/history:
    get:
      tags:
        - Workflows
      summary: Load a workflow's graph and compact research history.
      operationId: getWorkflowHistory
      parameters:
        - $ref: '#/components/parameters/Id'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          $ref: '#/components/responses/Success'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    Limit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
    Offset:
      name: offset
      in: query
      required: false
      schema:
        type: integer
        minimum: 0
  responses:
    Success:
      description: Successful response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SuccessEnvelope'
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: Account state or route policy prevents the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: The resource is missing or not owned by the API-key account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    ServerError:
      description: >-
        The request could not be completed. Retry only when the operation's
        idempotency contract permits it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    SuccessEnvelope:
      type: object
      required:
        - ok
      properties:
        ok:
          const: true
      additionalProperties: true
    ErrorEnvelope:
      type: object
      required:
        - ok
        - error
      properties:
        ok:
          const: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    droydApiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: Droyd API key
      description: A Droyd API key in the Authorization Bearer slot.
    droydApiKeyHeader:
      type: apiKey
      in: header
      name: x-droyd-api-key
      description: A Droyd API key when Authorization is absent.

````