> ## 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.

# Get Code Evaluation Criteria

> 
Retrieve a code evaluation criteria and its latest version, including eval code.



## OpenAPI

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

        Retrieve a code evaluation criteria and its latest version, including
        eval code.
      operationId: get_get_code_eval_criteria
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: criteria_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  id:
                    format: uuid
                    title: Id
                    type: string
                  version_id:
                    format: uuid
                    title: Version Id
                    type: string
                  name:
                    title: Name
                    type: string
                  type:
                    $ref: '#/components/schemas/AutoEvalCriteriaType'
                  version_number:
                    title: Version Number
                    type: integer
                  is_deployed:
                    title: Is Deployed
                    type: boolean
                  created_at:
                    title: Created At
                    type: integer
                  sample_rate:
                    title: Sample Rate
                    type:
                      - number
                      - 'null'
                  target:
                    $ref: '#/components/schemas/EvaluationCriteriaTarget'
                  created_by_user:
                    oneOf:
                      - $ref: '#/components/schemas/UserInfo'
                      - type: 'null'
                  position:
                    title: Position
                    type:
                      - number
                      - 'null'
                  is_enabled:
                    title: Is Enabled
                    type: boolean
                  generate_insights:
                    title: Generate Insights
                    type: boolean
                  criteria_description:
                    title: Criteria Description
                    type:
                      - string
                      - 'null'
                  eval_code:
                    title: Eval Code
                    type:
                      - string
                      - 'null'
                  language:
                    oneOf:
                      - $ref: '#/components/schemas/CodeEvalLanguage'
                      - type: 'null'
                required:
                  - id
                  - version_id
                  - name
                  - type
                  - version_number
                  - is_deployed
                  - created_at
                  - sample_rate
                  - target
                  - created_by_user
                  - position
                  - is_enabled
                  - generate_insights
                  - criteria_description
                  - eval_code
                  - language
                title: CodeEvalCriteriaVersionInfo
                type: object
          description: >-
            CodeEvalCriteriaVersionInfo(info:
            server.evaluations.evaluations.EvaluationCriteriaVersionInfo)
components:
  schemas:
    AutoEvalCriteriaType:
      enum:
        - 1-5
        - 1-3
        - 1-100
        - yes-no
        - multi-select
        - text
        - auto-categorization
        - code-bool
        - code-float
      title: AutoEvalCriteriaType
      type: string
    EvaluationCriteriaTarget:
      properties:
        target_type:
          $ref: '#/components/schemas/TargetType'
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
      required:
        - target_type
        - id
        - name
      title: EvaluationCriteriaTarget
      type: object
    UserInfo:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        email_address:
          title: Email Address
          type: string
        roles:
          items:
            type: string
          title: Roles
          type: array
        first_name:
          title: First Name
          type: string
        last_name:
          title: Last Name
          type: string
        signup_source:
          title: Signup Source
          type: string
        profile_picture:
          default: null
          title: Profile Picture
          type:
            - string
            - 'null'
        profile_color:
          default: null
          title: Profile Color
          type:
            - string
            - 'null'
      required:
        - id
        - email_address
        - roles
        - first_name
        - last_name
        - signup_source
      title: UserInfo
      type: object
    CodeEvalLanguage:
      enum:
        - python
        - typescript
      title: CodeEvalLanguage
      type: string
    TargetType:
      enum:
        - prompt
        - agent
      title: TargetType
      type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````