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

# Get step sample data

> Retrieve stored sample data for a step. Sample data is automatically saved when a step is tested. Use the `type` query parameter to get either INPUT or OUTPUT data.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/workflow/{flow_id}/steps/{step_name}/sample-data
openapi: 3.1.0
info:
  title: Diga API
  version: 0.1.0
servers:
  - url: https://api.diga.io
    description: Production
security: []
paths:
  /v1/workflow/{flow_id}/steps/{step_name}/sample-data:
    get:
      tags:
        - Workflows - Testing
      summary: Get step sample data
      description: >-
        Retrieve stored sample data for a step. Sample data is automatically
        saved when a step is tested. Use the `type` query parameter to get
        either INPUT or OUTPUT data.
      operationId: >-
        get_step_sample_data_v1_workflow__flow_id__steps__step_name__sample_data_get
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            title: Flow Id
        - name: step_name
          in: path
          required: true
          schema:
            type: string
            title: Step Name
        - name: type
          in: query
          required: false
          schema:
            type: string
            title: Type
            description: 'Data type: INPUT or OUTPUT'
            default: OUTPUT
          description: 'Data type: INPUT or OUTPUT'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SampleDataResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    SampleDataResponse:
      properties:
        data:
          anyOf:
            - {}
            - type: 'null'
          title: Data
      type: object
      title: SampleDataResponse
      description: Stored sample data for a step.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````