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

# List a runner's work assignments

> Lists a runner's work assignments newest first, with fleet outcomes and failure reasons. Requires platform administrator access. Continue with `next_cursor` as `starting_after`.

`destination` is `available` for a fleet in your account, `fleet_deleted` after deletion, or `not_permitted` in another account. Fleet and event fields become null when their records are removed.

Completed assignments remain for 30 days after settlement. Running or renewing assignments are retained. Assignments abandoned by a dead runner expire after the same window, then receive their own retention window.

Acquisition and release activity remains for 30 days after each event; other runner lifecycle activity is retained. Lifetime counters remain unchanged when history is removed.



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json get /v1/fleets/runners/{runner_id}/leases
openapi: 3.1.0
info:
  title: agentsfleet API
  description: API for managing workspaces, fleets, triggers, and runs.
  contact:
    name: agentsfleet
    url: https://agentsfleet.net
  license:
    name: MIT
    identifier: MIT
  version: 1.0.0
servers:
  - url: https://api.agentsfleet.net
    description: Production
security: []
paths:
  /v1/fleets/runners/{runner_id}/leases:
    get:
      tags:
        - Fleet
      summary: List a runner's work assignments
      description: >-
        Lists a runner's work assignments newest first, with fleet outcomes and
        failure reasons. Requires platform administrator access. Continue with
        `next_cursor` as `starting_after`.


        `destination` is `available` for a fleet in your account,
        `fleet_deleted` after deletion, or `not_permitted` in another account.
        Fleet and event fields become null when their records are removed.


        Completed assignments remain for 30 days after settlement. Running or
        renewing assignments are retained. Assignments abandoned by a dead
        runner expire after the same window, then receive their own retention
        window.


        Acquisition and release activity remains for 30 days after each event;
        other runner lifecycle activity is retained. Lifetime counters remain
        unchanged when history is removed.
      operationId: list_fleet_runner_leases
      parameters:
        - name: runner_id
          in: path
          description: >-
            Runner identifier (version 7 universally unique identifier, or
            UUID).
          required: true
          schema:
            type: string
        - name: starting_after
          in: query
          description: >-
            Lease identifier from this runner's previous `next_cursor`. It must
            match the current workspace and fleet filters. If retention removed
            it, restart from the first page.
          required: false
          schema:
            type: string
        - name: workspace_id
          in: query
          description: >-
            Narrow the page and total to leases owned by one workspace. A
            malformed id is refused; an unknown one matches nothing.
          required: false
          schema:
            type: string
        - name: fleet
          in: query
          description: >-
            Filter by fleet identifier or exact name, ignoring case. Combines
            with `workspace_id`. Empty or oversized values are refused; unknown
            fleets return no results.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Rows per page (1-100).
          required: false
          schema:
            type: string
      responses:
        '200':
          description: One page of the runner's leases, newest first
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunnerLeasesResponse'
        '401':
          description: Authentication is missing, invalid, or not accepted by this endpoint
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '403':
          description: You do not have permission for this action
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '404':
          description: The resource was not found or is not accessible to you
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '429':
          description: A request or capacity limit has been reached
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '500':
          description: An internal server error occurred
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '503':
          description: A required service is unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
      security:
        - BearerAuth: []
components:
  schemas:
    RunnerLeasesResponse:
      type: object
      description: One page of a runner's work-assignment history.
      required:
        - items
        - total
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/RunnerLeaseItem'
          description: Rows in newest-first order.
        next_cursor:
          type:
            - string
            - 'null'
          description: Last lease identifier when another page may exist.
        total:
          type: integer
          format: int64
          description: Filtered total independent of the page boundary.
      additionalProperties: false
    ProblemBody:
      type: object
      description: The body every refusal carries, under `application/problem+json`.
      required:
        - docs_uri
        - title
        - detail
        - error_code
        - request_id
      properties:
        action_id:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the action the gate held.'
        current_state:
          type:
            - string
            - 'null'
          description: 'On a 409 only: the state that forbade the transition.'
        detail:
          type: string
          description: One sentence on what was refused and why.
        docs_uri:
          type: string
          description: Where the error code is documented.
        error_code:
          type: string
          description: The registry code, stable across releases.
        etag:
          type:
            - string
            - 'null'
          description: >-
            On a 412 only: the resource's current entity tag, to refetch and
            retry.
        gate_id:
          type:
            - string
            - 'null'
          description: 'On an answered approval gate''s 409 only: the gate that was answered.'
        outcome:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the answer that stands.'
        request_id:
          type: string
          description: The request this refusal answers, for support.
        resolved_at:
          type:
            - string
            - 'null'
          format: date-time
          description: 'On that 409 only: when the standing answer was given.'
        resolved_by:
          type:
            - string
            - 'null'
          description: 'On that 409 only: who gave it.'
        title:
          type: string
          description: A short name for the refusal, safe to show a person.
        user_message:
          type:
            - string
            - 'null'
          description: A curated sentence for end users, where the code has one.
    RunnerLeaseItem:
      type: object
      description: One lease in a runner's newest-first operator history.
      required:
        - id
        - fleet_id
        - destination
        - workspace_id
        - event_id
        - outcome
        - kind
        - fencing_token
        - provider
        - model
        - posture
        - metered_input_tokens
        - metered_cached_tokens
        - metered_output_tokens
        - lease_expires_at
        - created_at
      properties:
        actor:
          type:
            - string
            - 'null'
          description: >-
            Actor recorded on the Fleet event, absent once the event row is
            gone.
        created_at:
          type: string
          format: date-time
          description: Claim instant.
        destination:
          $ref: '#/components/schemas/LeaseDestination'
          description: Whether the caller can open the fleet. Never inferred from the name.
        event_id:
          type: string
          description: Fleet event identifier.
        event_type:
          type:
            - string
            - 'null'
          description: Fleet event type, absent once the event row is gone.
        failure_detail:
          type:
            - string
            - 'null'
          description: Terminal failure explanation, when one was stored.
        failure_label:
          type:
            - string
            - 'null'
          description: Terminal failure classification, when one was stored.
        fencing_token:
          type: integer
          format: int64
          description: Monotonic holder generation.
        fleet_id:
          type: string
          description: Fleet whose event was leased.
        fleet_name:
          type:
            - string
            - 'null'
          description: Current display name, absent if the fleet row is gone.
        id:
          type: string
          description: Lease identifier and external pagination cursor.
        kind:
          $ref: '#/components/schemas/LeaseKind'
          description: Whether this was the first claim or a reclaim.
        lease_expires_at:
          type: string
          format: date-time
          description: Holder deadline.
        metered_cached_tokens:
          type: integer
          format: int64
          description: Metered cached input tokens.
        metered_input_tokens:
          type: integer
          format: int64
          description: Metered non-cached input tokens.
        metered_output_tokens:
          type: integer
          format: int64
          description: Metered output tokens.
        model:
          type: string
          description: The provider's own name for the model the run used.
        outcome:
          $ref: '#/components/schemas/LeaseOutcome'
          description: Server-derived closed outcome.
        posture:
          type: string
          description: The credential posture the run used.
        provider:
          type: string
          description: The provider the run used.
        wall_ms:
          type:
            - integer
            - 'null'
          format: int64
          description: Settled wall time, absent before settlement.
        workspace_id:
          type: string
          description: Workspace owning the Fleet event.
      additionalProperties: false
    LeaseDestination:
      type: string
      description: Whether the signed-in operator can open the lease's fleet.
      enum:
        - available
        - fleet_deleted
        - not_permitted
    LeaseKind:
      type: string
      description: Whether the lease was the event's first claim or a later reclaim.
      enum:
        - fresh
        - reclaim
    LeaseOutcome:
      type: string
      description: Server-derived outcome of one runner lease.
      enum:
        - running
        - succeeded
        - failed
        - expired
        - unknown
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Send a dashboard session token, an account API key (`agt_t`), or a
        command-line credential (`afc_`) as a Bearer token. Each endpoint lists
        accepted credential types.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.