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

# Search traces

> Retrieves the trace ids of a given workflow id and state data



## OpenAPI

````yaml api-reference/open-api-v2.json post /v2/workflows/{workflowId}/traces/search
openapi: 3.0.0
info:
  title: Stratumn API
  description: Interact with Stratumn using simple REST endpoints
  version: 2.0.0
  contact: {}
servers:
  - url: http://api.local.stratumn.com:3000
    description: Local development server
  - url: https://api.stratumn.com
    description: Stratumn Production Server
  - url: https://api.us.stratumn.com
    description: Stratumn US Production Server
  - url: https://api.preprod.stratumn.com
    description: Stratumn Preprod Server
  - url: https://api.preprod.us.stratumn.com
    description: Stratumn US Preprod Server
security: []
tags: []
paths:
  /v2/workflows/{workflowId}/traces/search:
    post:
      tags:
        - Workflow
      summary: Search traces
      description: Retrieves the trace ids of a given workflow id and state data
      operationId: WorkflowV2Controller_searchTraces
      parameters:
        - name: workflowId
          required: true
          in: path
          description: The name of the workflow
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TraceStateDataDto'
      responses:
        '200':
          description: The trace ids of the given workflow id and state data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowSearchV2Dto'
      security:
        - bearer: []
components:
  schemas:
    TraceStateDataDto:
      type: object
      properties:
        filters:
          description: >-
            The state data keys and values on which the Traces will be filtered
            on
          type: object
          additionalProperties:
            oneOf:
              - type: string
              - type: number
              - type: boolean
    WorkflowSearchV2Dto:
      type: object
      properties:
        error:
          description: The error of the request
        data:
          description: The trace ids
          type: array
          items:
            type: string
            format: uuid
      required:
        - error
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````