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

# List Autogenerated Draft Test Cases



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml get /v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases
openapi: 3.1.0
info:
  title: EGP API V4
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
tags:
  - name: Models
    description: Model API.
paths:
  /v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases:
    get:
      tags:
        - Evaluation Datasets
      summary: List Autogenerated Draft Test Cases
      operationId: GET-V4-/autogenerated-draft-test-cases
      parameters:
        - name: evaluation_dataset_id
          in: path
          required: true
          schema:
            type: string
            title: Evaluation Dataset Id
        - name: check_missing_chunks
          in: query
          required: false
          schema:
            type: boolean
            description: Check if test cases are based on missing chunks
            default: false
            title: Check Missing Chunks
          description: Check if test cases are based on missing chunks
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: >-
              Page number for pagination to be returned by the given endpoint.
              Starts at page 1
            default: 1
            title: Page
          description: >-
            Page number for pagination to be returned by the given endpoint.
            Starts at page 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 10000
            minimum: 1
            description: >-
              Maximum number of artifacts to be returned by the given endpoint.
              Defaults to 100 and cannot be greater than 10k.
            default: 100
            title: Limit
          description: >-
            Maximum number of artifacts to be returned by the given endpoint.
            Defaults to 100 and cannot be greater than 10k.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAutoGeneratedDraftTestCaseResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: Python
          source: >-
            import os

            from scale_gp import SGPClient


            client = SGPClient(
                api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
            )

            page =
            client.evaluation_datasets.autogenerated_draft_test_cases.list(
                evaluation_dataset_id="evaluation_dataset_id",
            )

            page = page.items[0]

            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/sgp-go\"\n\t\"github.com/stainless-sdks/sgp-go/option\"\n)\n\nfunc main() {\n\tclient := sgp.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.EvaluationDatasets.AutogeneratedDraftTestCases.List(\n\t\tcontext.TODO(),\n\t\t\"evaluation_dataset_id\",\n\t\tsgp.EvaluationDatasetAutogeneratedDraftTestCaseListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
components:
  schemas:
    ListAutoGeneratedDraftTestCaseResponse:
      properties:
        items:
          items:
            $ref: >-
              #/components/schemas/AutoGeneratedDraftTestCaseWithChunkInfoResponse
          type: array
          title: Items
          description: The data returned for the current page.
        total_item_count:
          type: integer
          title: Total Item Count
          description: The total number of items of the query
        current_page:
          type: integer
          title: Current Page
          description: The current page number.
        items_per_page:
          type: integer
          title: Items Per Page
          description: The number of items per page.
      type: object
      required:
        - items
        - total_item_count
        - current_page
        - items_per_page
      title: ListAutoGeneratedDraftTestCaseResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AutoGeneratedDraftTestCaseWithChunkInfoResponse:
      properties:
        evaluation_dataset_id:
          type: string
          title: Evaluation Dataset Id
          description: The ID of the associated evaluation dataset.
          can_patch: false
        schema_type:
          $ref: '#/components/schemas/EvaluationDatasetORMSchemaTypeEnum'
          description: The schema type of the dataset.
          can_patch: false
        test_case_data:
          anyOf:
            - $ref: '#/components/schemas/ArtifactSchemaGeneration'
            - $ref: '#/components/schemas/SchemaGenerationBase'
          title: Test Case Data
          description: >-
            The data for the test case in a format matching the provided
            schema_type
        approved:
          type: boolean
          title: Approved
          description: Boolean to track whether or not the draft test case is approved
        topic_str:
          title: Topic Str
          can_patch: false
          type: string
        content_metadata:
          additionalProperties: true
          type: object
          title: Content Metadata
          description: >-
            Metadata for the chunks and artifacts that were used to generate
            this draft test case.
          can_patch: false
        id:
          type: string
          title: Id
          description: The unique identifier of the entity.
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date and time when the entity was created in ISO format.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: The date and time when the entity was last updated in ISO format.
        created_by_user_id:
          type: string
          title: Created By User Id
          description: The user who originally created the entity.
        created_by_identity_type:
          $ref: '#/components/schemas/IdentifierTypeEnum'
          description: The type of identity that created the entity.
        missing_chunks:
          title: Missing Chunks
          items:
            $ref: '#/components/schemas/AutoGeneratedDraftTestCaseMissingChunkInfo'
          type: array
      type: object
      required:
        - evaluation_dataset_id
        - schema_type
        - test_case_data
        - approved
        - content_metadata
        - id
        - account_id
        - created_at
        - updated_at
        - created_by_user_id
        - created_by_identity_type
      title: AutoGeneratedDraftTestCaseWithChunkInfoResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    EvaluationDatasetORMSchemaTypeEnum:
      type: string
      enum:
        - GENERATION
        - FLEXIBLE
      title: EvaluationDatasetORMSchemaTypeEnum
    ArtifactSchemaGeneration:
      properties:
        input:
          type: string
          title: Input
        expected_output:
          title: Expected Output
          type: string
        expected_extra_info:
          $ref: '#/components/schemas/ExtraInfoSchema'
        artifact_ids_filter:
          items:
            type: string
          type: array
          title: Artifact Ids Filter
      type: object
      required:
        - input
        - artifact_ids_filter
      title: ArtifactSchemaGeneration
    SchemaGenerationBase:
      properties:
        input:
          type: string
          title: Input
        expected_output:
          title: Expected Output
          type: string
        expected_extra_info:
          $ref: '#/components/schemas/ExtraInfoSchema'
      type: object
      required:
        - input
      title: SchemaGenerationBase
    IdentifierTypeEnum:
      type: string
      enum:
        - user
        - service_account
      title: IdentifierTypeEnum
    AutoGeneratedDraftTestCaseMissingChunkInfo:
      properties:
        chunk_text:
          type: string
          title: Chunk Text
          description: Text of chunk_id that is missing
        artifact_id:
          type: string
          title: Artifact Id
          description: Artifact ID of the missing chunk
        artifact_name:
          type: string
          title: Artifact Name
          description: Artifact Name of the missing chunk
        artifact_content_modification_identifier:
          type: string
          title: Artifact Content Modification Identifier
          description: Artifact Content Modification Identifier of the missing chunk
      type: object
      required:
        - chunk_text
        - artifact_id
        - artifact_name
        - artifact_content_modification_identifier
      title: AutoGeneratedDraftTestCaseMissingChunkInfo
    ExtraInfoSchema:
      oneOf:
        - $ref: '#/components/schemas/ChunkExtraInfoSchema'
        - $ref: '#/components/schemas/StringExtraInfoSchema'
      title: ExtraInfoSchema
      discriminator:
        propertyName: schema_type
        mapping:
          CHUNKS:
            $ref: '#/components/schemas/ChunkExtraInfoSchema'
          STRING:
            $ref: '#/components/schemas/StringExtraInfoSchema'
    ChunkExtraInfoSchema:
      properties:
        schema_type:
          type: string
          const: CHUNKS
          title: Schema Type
          default: CHUNKS
        chunks:
          items:
            $ref: '#/components/schemas/ChunkData'
          type: array
          title: Chunks
      type: object
      required:
        - chunks
      title: ChunkExtraInfoSchema
    StringExtraInfoSchema:
      properties:
        schema_type:
          type: string
          const: STRING
          title: Schema Type
          default: STRING
        info:
          type: string
          title: Info
      type: object
      required:
        - info
      title: StringExtraInfoSchema
    ChunkData:
      properties:
        text:
          type: string
          title: Text
        metadata:
          title: Metadata
          additionalProperties: true
          type: object
      type: object
      required:
        - text
      title: ChunkData

````