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

# List Log Traces

> List log traces for a project with optional filters. Results are paginated.



## OpenAPI

````yaml GET /logs
openapi: 3.1.1
info:
  title: Adaline API
  version: 2.0.0
  description: >-
    Public API for managing Adaline projects, prompts, datasets, evaluators,
    evaluations, providers, models, and deployments.


    Generated from Zod schemas — this spec is the single source of truth.
servers:
  - url: https://api.adaline.ai/v2
    description: Production API
security: []
tags:
  - name: datasets
    description: Manage prompt datasets and their columns and rows.
  - name: projects
    description: List and manage Adaline projects.
  - name: providers
    description: List configured LLM providers and their settings.
  - name: models
    description: List available models across providers.
  - name: prompts
    description: Create and manage prompts and their drafts.
  - name: evaluators
    description: Configure evaluators attached to a prompt.
  - name: evaluations
    description: Run and inspect evaluation results.
  - name: deployments
    description: Retrieve deployed prompt snapshots.
  - name: logs
    description: Ingest execution traces and spans for observability.
paths:
  /logs:
    get:
      tags:
        - logs
      summary: List log traces
      description: >-
        List log traces for a project with optional filters. Results are
        paginated.
      operationId: listLogs
      parameters:
        - name: projectId
          in: query
          required: true
          description: The project to list logs for.
          schema:
            $ref: '#/components/schemas/BaseEntityId'
        - name: startedAfter
          in: query
          required: false
          description: Filter traces started after this Unix timestamp (ms).
          schema:
            type: integer
            minimum: 0
        - name: startedBefore
          in: query
          required: false
          description: Filter traces started before this Unix timestamp (ms).
          schema:
            type: integer
            minimum: 0
        - name: status
          in: query
          required: false
          description: Filter by trace status.
          schema:
            type: string
            enum:
              - success
              - failure
              - aborted
              - cancelled
              - pending
              - unknown
        - name: name
          in: query
          required: false
          description: Filter by trace name.
          schema:
            type: string
            minLength: 1
            maxLength: 256
        - name: referenceId
          in: query
          required: false
          description: Filter by reference ID.
          schema:
            type: string
            minLength: 1
            maxLength: 128
        - name: sessionId
          in: query
          required: false
          description: Filter by session ID.
          schema:
            type: string
            minLength: 1
            maxLength: 128
        - name: sort
          in: query
          required: false
          description: Sort order for results.
          schema:
            type: string
            enum:
              - startedAt:asc
              - startedAt:desc
        - name: limit
          in: query
          required: false
          description: Maximum number of results to return (1-200, default 50).
          schema:
            type: integer
            minimum: 1
            maximum: 200
        - name: cursor
          in: query
          required: false
          description: Pagination cursor from a previous response.
          schema:
            type: string
            minLength: 1
        - name: filters
          in: query
          required: false
          description: >-
            JSON-encoded array of filter objects (max 20). Each filter has type,
            column, operator, and value.
          schema:
            type: string
      responses:
        '200':
          description: Log traces retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListLogsResponse'
          headers:
            X-Request-Id:
              description: >-
                Unique identifier for the request. Returned in every response.
                Send a custom value to correlate requests, or omit to receive a
                generated UUID.
              schema:
                type: string
                format: uuid
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Insufficient permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    BaseEntityId:
      title: Base Entity ID
      type: string
      description: Unique identifier for an entity, between 20 and 80 characters.
      minLength: 20
      maxLength: 80
    ListLogsResponse:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        traces:
          type: array
          items:
            $ref: '#/components/schemas/LogTraceItem'
          description: Array of log trace items.
      required:
        - traces
        - pagination
      title: List Logs Response
      description: Paginated list of log traces.
    ErrorResponse:
      title: Error Response
      type: object
      description: >-
        Standard error response envelope. Permits backend-specific sibling
        fields (e.g. Zod issue details) alongside the typed `error`.
      properties:
        error:
          description: >-
            Error details — typed envelope, or a raw string reason when the
            backend's validator produces a short summary (e.g. Zod validation
            fallback).
          oneOf:
            - type: string
            - type: object
              properties:
                code:
                  type: string
                  description: Machine-readable error code.
                  enum:
                    - VALIDATION_ERROR
                    - INVALID_CURSOR
                    - AUTHENTICATION_REQUIRED
                    - FORBIDDEN
                    - RESOURCE_NOT_FOUND
                    - CONFLICT
                    - PAYLOAD_TOO_LARGE
                    - RATE_LIMITED
                    - INTERNAL_ERROR
                message:
                  type: string
                  description: Human-readable error message.
                details:
                  type: array
                  description: Optional field-level validation details.
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                      issue:
                        type: string
                    required:
                      - field
                      - issue
              required:
                - code
                - message
              additionalProperties: true
      required:
        - error
      additionalProperties: true
    Pagination:
      title: Pagination
      type: object
      description: Pagination metadata for list endpoints with cursor-based navigation.
      properties:
        limit:
          type: integer
          exclusiveMinimum: 0
        returned:
          type: integer
          minimum: 0
        hasMore:
          type: boolean
        nextCursor:
          type:
            - string
            - 'null'
      required:
        - limit
        - returned
        - hasMore
        - nextCursor
    LogTraceItem:
      title: Log Trace Item
      type: object
      description: A log trace summary returned in list and search responses.
      properties:
        id:
          type: string
          description: Unique trace identifier.
        name:
          type: string
          description: Name of the trace.
        status:
          type: string
          description: Trace status.
          enum:
            - success
            - failure
            - aborted
            - cancelled
            - pending
            - unknown
        startedAt:
          $ref: '#/components/schemas/UnixTimestamp'
          description: When the trace started.
        endedAt:
          $ref: '#/components/schemas/UnixTimestamp'
          description: When the trace ended.
        latency:
          type: number
          description: Trace duration in milliseconds.
        referenceId:
          type:
            - string
            - 'null'
          description: External reference ID.
        sessionId:
          type:
            - string
            - 'null'
          description: Session ID for grouping related traces.
        attributes:
          type: object
          additionalProperties:
            type: string
          description: Key-value attributes attached to the trace.
        tags:
          type: array
          items:
            type: string
          description: Tags attached to the trace.
        totalCost:
          type:
            - number
            - 'null'
          description: Total cost across all spans.
        totalInputTokens:
          type:
            - number
            - 'null'
          description: Total input tokens across all spans.
        totalOutputTokens:
          type:
            - number
            - 'null'
          description: Total output tokens across all spans.
        spanIds:
          type: array
          items:
            type: string
          description: IDs of spans belonging to this trace.
        createdAt:
          $ref: '#/components/schemas/UnixTimestamp'
          description: When the trace was created.
        updatedAt:
          $ref: '#/components/schemas/UnixTimestamp'
          description: When the trace was last updated.
      required:
        - id
        - name
        - status
        - startedAt
        - endedAt
        - latency
        - referenceId
        - sessionId
        - attributes
        - tags
        - totalCost
        - totalInputTokens
        - totalOutputTokens
        - spanIds
        - createdAt
        - updatedAt
    UnixTimestamp:
      title: Unix Timestamp
      type: integer
      format: int64
      description: Unix timestamp in milliseconds.
      minimum: 1672511400000
      maximum: 33229420200000
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Workspace API key. Pass as `Authorization: Bearer <key>`.'

````