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

# Get Test Case Collection By Identifier

> Fetches dataset/test case collection by its ID or name.

Args:
    test_collection_identifier (Union[str, int]): ID or name of the test case collection/dataset.

<RequestExample>
  ```python python theme={null}
  p = Parea(api_key="PAREA_API_KEY")  # replace with your API key

  test_collection = p.get_collection(test_collection_identifier="Math problems")
  ```

  ```typescript typescript theme={null}
  const p = new Parea("PAREA_API_KEY"); // replace with your API key

  const response = await p.getCollection("Math problems");
  ```

  ```bash curl theme={null}
  curl --location 'https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/collection/121' \
  --header 'x-api-key: PAREA_API_KEY'
  ```
</RequestExample>


## OpenAPI

````yaml get /api/parea/v1/collection/{test_collection_identifier}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /api/parea/v1/collection/{test_collection_identifier}:
    get:
      summary: Get Test Case Collection By Identifier
      description: |-
        Fetches dataset/test case collection by its ID or name.

        Args:
            test_collection_identifier (Union[str, int]): ID or name of the test case collection/dataset.
      operationId: >-
        get_test_case_collection_by_identifier_api_parea_v1_collection__test_collection_identifier__get
      parameters:
        - name: test_collection_identifier
          in: path
          required: true
          schema:
            anyOf:
              - type: string
              - type: integer
            title: Test Collection Identifier
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GetTestCaseCollectionResponseSchema'
                  - type: 'null'
                title: >-
                  Response Get Test Case Collection By Identifier Api Parea V1
                  Collection  Test Collection Identifier  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - APIKeyHeader: []
        - APIKeyHeader: []
components:
  schemas:
    GetTestCaseCollectionResponseSchema:
      properties:
        id:
          type: integer
          title: Id
          description: Unique identifier for the test case collection
        name:
          type: string
          title: Name
          description: Name of the test case collection
        column_names:
          items:
            type: string
          type: array
          title: Column Names
          description: Column names for the test case collection
        created_at:
          type: string
          title: Created At
          description: Timestamp when the test case collection was created
        last_updated_at:
          type: string
          title: Last Updated At
          description: Timestamp when the test case collection was last updated
        test_cases:
          additionalProperties:
            $ref: '#/components/schemas/GetTestCaseResponseSchema'
          type: object
          title: Test Cases
          description: Dictionary mapping test case ID to test case
      type: object
      required:
        - id
        - name
        - column_names
        - created_at
        - last_updated_at
        - test_cases
      title: GetTestCaseCollectionResponseSchema
      examples:
        - column_names:
            - language
            - framework
          created_at: '2021-06-01T00:00:00Z'
          id: 5000
          last_updated_at: '2021-06-01T00:00:00Z'
          name: Hello World Programs
          test_cases:
            '12345':
              id: 12345
              inputs:
                framework: fastapi
                language: python
              tags:
                - easy
              target: a good program here
              test_case_collection_id: 5000
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GetTestCaseResponseSchema:
      properties:
        inputs:
          additionalProperties:
            type: string
          type: object
          title: Inputs
          description: >-
            Dictionary mapping input names to values. Input names correspond to
            the column names of the test case collection.
        target:
          anyOf:
            - type: string
            - type: 'null'
          title: Target
          description: Optional target/ground truth value for the test case/inputs
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: List of tags associated with the test case
          default: []
        id:
          type: integer
          title: Id
          description: Unique identifier for the test case
        test_case_collection_id:
          type: integer
          title: Test Case Collection Id
          description: Unique identifier for the test case collection of this test case
      type: object
      required:
        - inputs
        - id
        - test_case_collection_id
      title: GetTestCaseResponseSchema
      examples:
        - id: 12345
          inputs:
            framework: fastapi
            language: python
          tags:
            - easy
          target: a good program here
          test_case_collection_id: 5000
    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:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-user-id

````