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

# List Code Evaluation Criteria

> 
Retrieve all code evaluation criteria in a project. Optionally filter by target type and ID.

`page_size` defaults to 30, maximum 100.



## OpenAPI

````yaml https://app.freeplay.ai/openapi.json get /api/v2/projects/{project_id}/evaluation-criteria/code
openapi: 3.1.0
info:
  title: Freeplay API
  version: 0.1.0
servers: []
security:
  - BearerAuth: []
paths:
  /api/v2/projects/{project_id}/evaluation-criteria/code:
    get:
      tags:
        - Evaluation Criteria
      summary: List Code Evaluation Criteria
      description: >-

        Retrieve all code evaluation criteria in a project. Optionally filter by
        target type and ID.


        `page_size` defaults to 30, maximum 100.
      operationId: get_list_code_eval_criteria
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          schema:
            default: 1
            title: Page
            type: integer
        - name: page_size
          in: query
          schema:
            default: 30
            title: Page Size
            type: integer
        - name: target_type
          in: query
          schema:
            default: null
            oneOf:
              - $ref: '#/components/schemas/TargetType'
              - type: 'null'
        - name: target_id
          in: query
          schema:
            default: null
            title: Target Id
            format: uuid
            type:
              - string
              - 'null'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/CodeEvalCriteriaInfo'
                    title: Data
                    type: array
                  pagination:
                    $ref: '#/components/schemas/PaginationInfo'
                required:
                  - data
                  - pagination
                title: CodeEvalListResponse
                type: object
          description: >-
            CodeEvalListResponse(data:
            list[server.api_routes.code_eval_criteria_api_v2.CodeEvalCriteriaInfo],
            pagination: server.api_routes.api_v2_common.PaginationInfo)
components:
  schemas:
    TargetType:
      enum:
        - prompt
        - agent
      title: TargetType
      type: string
    CodeEvalCriteriaInfo:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
        type:
          title: Type
          type: string
        target_type:
          $ref: '#/components/schemas/TargetType'
        target_id:
          format: uuid
          title: Target Id
          type: string
        latest_version_id:
          title: Latest Version Id
          format: uuid
          type:
            - string
            - 'null'
        is_enabled:
          title: Is Enabled
          type: boolean
        generate_insights:
          title: Generate Insights
          type: boolean
        sample_rate:
          title: Sample Rate
          type:
            - number
            - 'null'
        description:
          title: Description
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - type
        - target_type
        - target_id
        - latest_version_id
        - is_enabled
        - generate_insights
        - sample_rate
        - description
      title: CodeEvalCriteriaInfo
      type: object
    PaginationInfo:
      properties:
        page:
          title: Page
          type: integer
        page_size:
          title: Page Size
          type: integer
        has_next:
          title: Has Next
          type: boolean
      required:
        - page
        - page_size
        - has_next
      title: PaginationInfo
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````