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

# Retrieve trace state

> Retrieves the state of a given trace by id



## OpenAPI

````yaml api-reference/open-api-v2.json get /v2/traces/{traceId}/state
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/traces/{traceId}/state:
    get:
      tags:
        - Trace
      summary: Retrieve trace state
      description: Retrieves the state of a given trace by id
      operationId: TraceV2Controller_getTraceState
      parameters:
        - name: traceId
          required: true
          in: path
          description: The UUID of the trace
          schema:
            type: string
      responses:
        '200':
          description: The state of the given trace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTraceStateV2Dto'
      security:
        - bearer: []
components:
  schemas:
    GetTraceStateV2Dto:
      type: object
      properties:
        error:
          description: The error of the request
        data:
          description: The data of the request
          type: object
          properties:
            state:
              description: The state data of the trace
              type: object
              properties: {}
          required:
            - state
      required:
        - error
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````