> ## 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 leases

> Platform-admin read of a single runner's lease history, newest first. Each lease is joined to its Fleet event, so outcome and failure cause arrive in one round trip. Stripe-style keyset pagination — `starting_after` is a lease id from a previous page's `next_cursor`.



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json get /v1/fleets/runners/{id}/leases
openapi: 3.1.0
info:
  title: agentsfleet Control Plane API
  version: 1.0.0
  description: API for managing workspaces, fleets, triggers, and runs.
  contact:
    name: agentsfleet
    url: https://agentsfleet.net
servers:
  - url: https://api.agentsfleet.net
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Health
    description: System status and readiness probes
    x-mintlify:
      navigation: Health
  - name: Authentication
    description: Command Line Interface (CLI) sign-in sessions and GitHub sign-in
    x-mintlify:
      navigation: Authentication
  - name: Workspaces
    description: Create and manage workspaces
    x-mintlify:
      navigation: Workspaces
  - name: Tenant
    description: Manage tenant provider settings and models
    x-mintlify:
      navigation: Tenant
  - name: auth-identity-events
    description: >-
      Process signed account events from Clerk. This route is not for customer
      fleets.
    x-mintlify:
      navigation: Auth Identity Events
  - name: Fleets
    description: Create, configure, and run fleets
    x-mintlify:
      navigation: Fleets
  - name: Schedules
    description: Manage and receive scheduled Fleet events
    x-mintlify:
      navigation: Schedules
  - name: Memory
    description: Read and search saved fleet memory
    x-mintlify:
      navigation: Memory
  - name: Secrets
    description: Manage named secrets for fleets in a workspace
    x-mintlify:
      navigation: Secrets
  - name: Admin
    description: Manage shared provider keys and models
    x-mintlify:
      navigation: Admin
  - name: Billing
    description: Read tenant balances and charge records
    x-mintlify:
      navigation: Billing
  - name: Integration Grants
    description: Manage fleet access to third-party services
    x-mintlify:
      navigation: Integration Grants
  - name: Connectors
    description: Connect workspaces to third-party providers
    x-mintlify:
      navigation: Connectors
  - name: Fleet Keys
    description: Manage keys that let external clients call a fleet
    x-mintlify:
      navigation: Fleet Keys
  - name: API Keys
    description: Manage tenant admin API keys
    x-mintlify:
      navigation: API Keys
  - name: Webhooks
    description: Receive signed events and approval decisions
    x-mintlify:
      navigation: Webhooks
  - name: Approvals
    description: List, inspect, and resolve pending approvals
    x-mintlify:
      navigation: Approvals
  - name: Fleet
    description: Enroll and manage runners
    x-mintlify:
      navigation: Fleet
  - name: Fleet Bundles
    description: Manage fleet source bundles in a workspace
    x-mintlify:
      navigation: Fleet Bundles
  - name: Fleet library
    description: Browse and add reusable fleet sources
    x-mintlify:
      navigation: Fleet library
  - name: Model Library
    description: List models available to the tenant
    x-mintlify:
      navigation: Model Library
paths:
  /v1/fleets/runners/{id}/leases:
    get:
      tags:
        - Fleet
      summary: List a runner's leases
      description: >-
        Platform-admin read of a single runner's lease history, newest first.
        Each lease is joined to its Fleet event, so outcome and failure cause
        arrive in one round trip. Stripe-style keyset pagination —
        `starting_after` is a lease id from a previous page's `next_cursor`.
      operationId: list_fleet_runner_leases
      parameters:
        - name: id
          in: path
          required: true
          description: Runner id (UUIDv7).
          schema:
            type: string
            format: uuid
        - name: starting_after
          in: query
          required: false
          description: >-
            A lease id this runner holds; the page starts strictly after it. A
            lease id the runner does not hold is refused.
          schema:
            type: string
            format: uuid
        - name: limit
          in: query
          required: false
          description: Rows per page (1-100).
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
      responses:
        '200':
          description: A page of leases.
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - total
                  - next_cursor
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/RunnerLease'
                  total:
                    type: integer
                    format: int64
                    nullable: true
                    description: The runner's full lease count; stable across pages.
                  next_cursor:
                    type: string
                    nullable: true
                    description: The last lease id of a full page; null on the final page.
        '404':
          $ref: '#/components/responses/Error'
          description: No runner with this id (`UZ-RUN-014`).
        default:
          $ref: '#/components/responses/Error'
components:
  schemas:
    RunnerLease:
      type: object
      description: >-
        One lease joined to its Fleet event. `outcome` is settled server-side
        into a single closed tag; the event's request payload is never returned.
      required:
        - id
        - fleet_id
        - fleet_name
        - workspace_id
        - event_id
        - event_type
        - actor
        - outcome
        - failure_label
        - failure_detail
        - kind
        - fencing_token
        - provider
        - model
        - posture
        - metered_input_tokens
        - metered_cached_tokens
        - metered_output_tokens
        - wall_ms
        - lease_expires_at
        - created_at
      properties:
        id:
          type: string
          format: uuid
        fleet_id:
          type: string
          format: uuid
        fleet_name:
          type: string
          nullable: true
          description: The fleet's display name, joined at read time.
        workspace_id:
          type: string
          format: uuid
        event_id:
          type: string
          description: The Fleet event this lease ran.
        event_type:
          type: string
          description: The triggering event's type as recorded on the lease.
        actor:
          type: string
        outcome:
          type: string
          description: >-
            Settled server-side from the lease's own status first, then the
            joined event. An expired lease reads expired regardless of how its
            event later settled under a reclaiming runner; a missing event reads
            unknown, never a fabricated success.
          enum:
            - running
            - succeeded
            - failed
            - expired
            - unknown
        failure_label:
          type: string
          nullable: true
          description: >-
            The normalized failure class from the joined Fleet event; null when
            the event did not fail.
        failure_detail:
          type: string
          nullable: true
          description: The human-readable failure cause recorded on the event, verbatim.
        kind:
          type: string
          description: >-
            fresh = first lease for its event; reclaim = re-issue of an expired
            holder's event under a higher fencing token.
          enum:
            - fresh
            - reclaim
        fencing_token:
          type: integer
          format: int64
        provider:
          type: string
        model:
          type: string
        posture:
          type: string
        metered_input_tokens:
          type: integer
          format: int64
        metered_cached_tokens:
          type: integer
          format: int64
        metered_output_tokens:
          type: integer
          format: int64
        wall_ms:
          type: integer
          format: int64
          nullable: true
          description: Wall-clock duration from the joined event; null until settled.
        lease_expires_at:
          type: integer
          format: int64
          description: Epoch milliseconds the lease deadline elapses.
        created_at:
          type: integer
          format: int64
          description: Epoch milliseconds the lease was issued.
    ErrorBody:
      type: object
      description: RFC 7807 problem detail error response (application/problem+json)
      required:
        - docs_uri
        - title
        - detail
        - error_code
        - request_id
      properties:
        docs_uri:
          type: string
          format: uri
          description: Stable link to documentation for this error code
          example: https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009
        title:
          type: string
          description: Short human-readable label, same for every occurrence of this code
          example: Fleet not found
        detail:
          type: string
          description: Instance-specific context describing what went wrong
          example: No fleet with id 'abc123' in this workspace.
        error_code:
          type: string
          description: Machine-readable error code
          example: UZ-AGT-009
        request_id:
          type: string
          description: Correlation ID for this request
        current_state:
          type: string
          description: >-
            Resource state that blocked the requested change. Present only on
            409 responses.
          example: paused
        user_message:
          type: string
          description: >
            Plain message safe to show to a user. Present only when an error
            defines one.


            Use `detail` or `title` when this field is absent.
          example: >-
            We couldn't find that Fleet. It may have been deleted, or the ID
            doesn't match one in this workspace.
        etag:
          type: string
          description: >-
            Resource version returned on 412 responses so the caller can refetch
            and retry.
  responses:
    Error:
      description: RFC 7807 problem detail error response
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Obtain a token via the CLI auth flow (POST /v1/auth/sessions) or GitHub
        OAuth

````