---
title: "POST /testsets/{testSetId}/records"
method: POST
path: "/testsets/{testSetId}/records"
---

# POST /testsets/{testSetId}/records

`POST /testsets/{testSetId}/records`

The list of test set records.

## Path parameters

- `testSetId` string, required

## Request body

- object
  - `maxResults` integer — The maximum number of test set records to return in each page. If there are fewer records than the max page size, only the actual number of records are returned.
  - `nextToken` string — If the response from the ListTestSetRecords operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

## Response `200`

Success

- ListTestSetRecordsResponse
  - `testSetRecords` TestSetTurnRecord[] — The list of records from the test set.
    - `recordNumber` integer, required — The record number associated with the turn.
    - `conversationId` string — The unique identifier for the conversation associated with the turn.
    - `turnNumber` integer — The number of turns that has elapsed up to that turn.
    - `turnSpecification` object, required — Contains information about the agent or user turn depending upon type of turn.
      - `agentTurn` object — Contains information about the agent messages in the turn.
        - `agentPrompt` string, required — The agent prompt for the agent turn in a test set.
      - `userTurn` object — Contains information about the user messages in the turn.
        - `input` object, required — Contains information about the user messages in the turn in the input.
          - `utteranceInput` object, required — The utterance input in the user turn.
            - `textInput` string — A text input transcription of the utterance. It is only applicable for test-sets containing text data.
            - `audioInput` object — Contains information about the audio input for an utterance.
              - …
          - `requestAttributes` object — Request attributes of the user turn.
          - `sessionState` object — Contains information about the session state in the input.
            - `sessionAttributes` object — Session attributes for the session state.
            - `activeContexts` ActiveContext[] — Active contexts for the session state.
              - …
            - `runtimeHints` object — Runtime hints for the session state.
              - …
        - `expected` object, required — Contains results about the expected output for the user turn.
          - `intent` object, required — Contains information about the intent.
            - `name` string, required — The name of the intent.
            - `slots` object — The slots associated with the intent.
          - `activeContexts` ActiveContext[] — The contexts that are active in the turn.
            - `name` string, required — The name of active context.
          - `transcript` string — The transcript that is output for the user turn by the test execution.
  - `nextToken` string — A token that indicates whether there are more records to return in a response to the ListTestSetRecords operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListTestSetRecords operation request to get the next page of records.

## Other responses

- `480` — ThrottlingException
- `481` — ServiceQuotaExceededException
- `482` — ValidationException
- `483` — ResourceNotFoundException
- `484` — InternalServerException

---

[API](https://skmtc.net/aws/apis/lexv2-models.md) · [All operations](https://skmtc.net/aws/apis/lexv2-models/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/lexv2-models/versions/6997ba482d72/schema)
