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

# List traces

> **Security Requirements**

| Auth Types | Entities | Permissions | Required Roles |
|------------|----------|-------------|----------------|
| USER | AUDIT | READ | AUDIT:READ |



## OpenAPI

````yaml /openapi/swarmd.json get /audit/v1/traces
openapi: 3.0.1
info:
  title: OpenAPI definition
  version: v0
servers:
  - url: https://api.swarmd.ai
    description: Production
  - url: https://api.sandbox.swarmd.ai
    description: Sandbox
security: []
tags:
  - name: Policy Groups
    x-displayName: Policy Groups
  - name: Policy Bindings
    x-displayName: Policy Bindings
  - name: Webhooks
    x-displayName: Webhooks
  - name: Human JSON-RPC
    x-displayName: Human JSON-RPC
  - name: Channel JSON-RPC
    x-displayName: Channel JSON-RPC
  - name: HITL Approvals
    x-displayName: HITL Approvals
  - name: Agent JSON-RPC
    x-displayName: Agent JSON-RPC
  - name: Tasks
    x-displayName: Tasks
  - name: Push Notifications
    x-displayName: Push Notifications
  - name: Messaging
    x-displayName: Messaging
  - name: Conversations
    x-displayName: Conversations
  - name: Agent Discovery
    x-displayName: Agent Discovery
  - name: User Subscriptions
    x-displayName: User Subscriptions
  - name: MCP Servers
    x-displayName: MCP Servers
  - name: Kill Switches
    x-displayName: Kill Switches
  - name: Channels
    x-displayName: Channels
  - name: Channel Subscriptions
    x-displayName: Channel Subscriptions
  - name: Agents
    x-displayName: Agents
  - name: Agent Subscriptions
    x-displayName: Agent Subscriptions
  - name: Marketplace
    x-displayName: Marketplace
  - name: Identity Providers
    x-displayName: Identity Providers
  - name: Groups
    x-displayName: Groups
  - name: Authentication
    x-displayName: Authentication
  - name: Users
    x-displayName: Users
  - name: Tenants
    x-displayName: Tenants
  - name: Audit Integrity
    x-displayName: Audit Integrity
  - name: Audit Events
    x-displayName: Audit Events
  - name: Audit Traces
    x-displayName: Audit Traces
  - name: A2A Payments
    x-displayName: A2A Payments
paths:
  /audit/v1/traces:
    get:
      tags:
        - Audit Traces
      summary: List traces
      description: |-
        **Security Requirements**

        | Auth Types | Entities | Permissions | Required Roles |
        |------------|----------|-------------|----------------|
        | USER | AUDIT | READ | AUDIT:READ |
      operationId: getTraces
      parameters:
        - name: startTime
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: endTime
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: auditType
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - COMMUNICATION_AUDIT
                - VALIDATION_RESULT
                - X402_PAYMENT_REQUIRED
                - X402_PAYMENT_SUCCESS
                - X402_PAYMENT_ATTEMPT
                - X402_PAYMENT_REJECTED
                - REGEX_DETECTION
                - PRESIDIO_DETECTION
                - COMPREHEND_DETECTION
                - RATE_LIMIT
                - SKILL_RESTRICTION
                - HITL
                - HITL_GUARD
                - HITL_RESOLUTION
                - POLICY_LIFECYCLE
        - name: transport
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - REST
                - JSONRPC
                - GRPC
                - CHANNEL
        - name: auditAction
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - LOG
                - MASK
                - BLOCK
                - WARN
                - HUMAN_REVIEW_REQUIRED
                - ERROR
        - name: sourceAgentId
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: sourceUserId
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: sinkAgentId
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: sinkUserId
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: sinkChannelId
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: stage
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
        - name: pageable
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TracePageResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    Pageable:
      type: object
      properties:
        page:
          minimum: 0
          type: integer
          format: int32
        size:
          minimum: 1
          type: integer
          format: int32
        sort:
          type: array
          items:
            type: string
    TracePageResponse:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/TraceSummaryResponse'
        page:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
        availableFilters:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/FilterFacet'
    TraceSummaryResponse:
      type: object
      properties:
        correlationId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        startTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        totalDurationMicros:
          type: integer
          format: int64
        stepCount:
          type: integer
          format: int32
    FilterFacet:
      type: object
      properties:
        title:
          type: string
        counts:
          type: object
          additionalProperties:
            type: integer
            format: int64
        labels:
          type: object
          additionalProperties:
            type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token (USER, AGENT, or SERVICE auth)

````