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

# List Trajectories

> A page of trajectories, and the size of the set it came from.

**Who may call it:** any role. A workspace API key is refused here: this is an act that belongs to a named person.



## OpenAPI

````yaml /api/openapi.json get /v1/trajectories
openapi: 3.1.0
info:
  title: RotaGrant API
  version: 0.1.0
  description: >-
    The HTTP API of a RotaGrant deployment, made from the product's own route
    definitions at the commit named in `x-rotascale-source`. Nothing here is
    written by hand.


    There is no shared endpoint. RotaGrant runs in your environment, and your
    deployment serves its own copy of this description at `/api/docs`. That copy
    is the authority on what your version has and which features are switched
    on; this one is the reference for one commit of the main line. The version
    is 0.1.0: routes and shapes can still change.


    Every route says who may call it. Most need a bearer token from the identity
    provider your deployment uses, held by a person with the role named. The
    routes an SDK calls also accept a workspace API key. A few are open, and say
    why.
servers:
  - url: https://{deployment}
    description: Your own deployment. There is no shared endpoint.
    variables:
      deployment:
        default: rotagrant.internal.example
        description: The host your deployment answers on.
security: []
paths:
  /v1/trajectories:
    get:
      tags:
        - Evidence
      summary: List Trajectories
      description: >-
        A page of trajectories, and the size of the set it came from.


        **Who may call it:** any role. A workspace API key is refused here: this
        is an act that belongs to a named person.
      operationId: list_trajectories_v1_trajectories_get
      parameters:
        - name: agent_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Agent Id
        - name: tainted
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Tainted
        - name: stopped
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: only trajectories the platform refused or gated
            title: Stopped
          description: only trajectories the platform refused or gated
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: matches external_ref or agent
            title: Q
          description: matches external_ref or agent
        - name: sort
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: column, '-' prefix for descending
            title: Sort
          description: column, '-' prefix for descending
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrajectoryPageOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearerToken: []
components:
  schemas:
    TrajectoryPageOut:
      properties:
        trajectories:
          items:
            $ref: '#/components/schemas/TrajectoryOut'
          type: array
          title: Trajectories
        total:
          type: integer
          title: Total
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
        has_more:
          type: boolean
          title: Has More
          default: false
      type: object
      required:
        - trajectories
        - total
        - limit
        - offset
      title: TrajectoryPageOut
      description: A page of trajectories, and the size of the set it came from.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TrajectoryOut:
      properties:
        id:
          type: string
          title: Id
        agent_id:
          type: string
          title: Agent Id
        stream_key:
          type: string
          title: Stream Key
        seq:
          type: integer
          title: Seq
        external_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: External Ref
        status:
          type: string
          title: Status
        taint:
          items:
            $ref: '#/components/schemas/TaintLabelOut'
          type: array
          title: Taint
        content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Hash
        started_at:
          type: string
          format: date-time
          title: Started At
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
      type: object
      required:
        - id
        - agent_id
        - stream_key
        - seq
        - external_ref
        - status
        - taint
        - content_hash
        - started_at
        - ended_at
      title: TrajectoryOut
    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
    TaintLabelOut:
      properties:
        source_kind:
          type: string
          title: Source Kind
        source_ref:
          type: string
          title: Source Ref
        introduced_at_step:
          type: integer
          title: Introduced At Step
        confidence:
          type: number
          title: Confidence
          default: 1
      type: object
      required:
        - source_kind
        - source_ref
        - introduced_at_step
      title: TaintLabelOut
      description: One untrusted thing an agent read, and where it came from.
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A token from the identity provider your deployment federates with. It
        identifies a person; their roles in the workspace decide what they may
        do.

````

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