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

# List Evaluation Assertions

> Retrieve all evaluation assertions optionally filtered by evaluation ID



## OpenAPI

````yaml get /sdk/v1/evaluation-assertions
openapi: 3.0.0
info:
  title: Prompt Foundry API
  version: 1.0.0
  description: The API for managing prompts, tools, evaluations, and evaluation assertions.
servers:
  - url: https://api.promptfoundry.ai
    description: Prompt Foundry Production API
security: []
paths:
  /sdk/v1/evaluation-assertions:
    get:
      summary: List Evaluation Assertions
      description: Retrieve all evaluation assertions optionally filtered by evaluation ID
      operationId: getEvaluationAssertions
      parameters:
        - schema:
            type: string
            description: Optional ID to filter the assertions by specific evaluation ID
            example: eval-1234
          required: false
          name: evaluationId
          in: query
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EvaluationAssertion'
        '400':
          description: Missing or invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import PromptFoundry from '@prompt-foundry/typescript-sdk';

            const client = new PromptFoundry({
              apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const evaluationAssertions = await client.evaluationAssertions.list();

              console.log(evaluationAssertions);
            }

            main();
        - lang: Python
          source: |-
            import os
            from prompt_foundry_python_sdk import PromptFoundry

            client = PromptFoundry(
                # This is the default and can be omitted
                api_key=os.environ.get("PROMPT_FOUNDRY_API_KEY"),
            )
            evaluation_assertions = client.evaluation_assertions.list()
            print(evaluation_assertions)
components:
  schemas:
    EvaluationAssertion:
      oneOf:
        - $ref: '#/components/schemas/EvaluationAssertionExactMatch'
        - $ref: '#/components/schemas/EvaluationAssertionContainsAll'
        - $ref: '#/components/schemas/EvaluationAssertionContainsAny'
        - $ref: '#/components/schemas/EvaluationAssertionStartsWith'
        - $ref: '#/components/schemas/EvaluationAssertionCost'
        - $ref: '#/components/schemas/EvaluationAssertionLatency'
        - $ref: '#/components/schemas/EvaluationAssertionToolCalled'
        - $ref: '#/components/schemas/EvaluationAssertionToolCalledWith'
      discriminator:
        propertyName: type
        mapping:
          EXACT_MATCH: '#/components/schemas/EvaluationAssertionExactMatch'
          CONTAINS_ALL: '#/components/schemas/EvaluationAssertionContainsAll'
          CONTAINS_ANY: '#/components/schemas/EvaluationAssertionContainsAny'
          STARTS_WITH: '#/components/schemas/EvaluationAssertionStartsWith'
          COST: '#/components/schemas/EvaluationAssertionCost'
          LATENCY: '#/components/schemas/EvaluationAssertionLatency'
          TOOL_CALLED: '#/components/schemas/EvaluationAssertionToolCalled'
          TOOL_CALLED_WITH: '#/components/schemas/EvaluationAssertionToolCalledWith'
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: 'Example: "Prompt ID is required."'
      required:
        - error
    EvaluationAssertionExactMatch:
      type: object
      properties:
        type:
          type: string
          enum:
            - EXACT_MATCH
        evaluationId:
          type: string
        weight:
          type: number
          minimum: 0
          maximum: 1
          default: 1
          description: How heavily to weigh the assertion within the evaluation.
        targetValue:
          type: string
          description: The value to match.
        jsonPath:
          type: string
          nullable: true
          default: $
          description: A JSON path to use when matching a JSON response.
        ignoreCase:
          type: boolean
          default: false
          description: Whether to ignore case when comparing strings.
        negate:
          type: boolean
          default: false
          description: >-
            Whether to negate the assertion. "true" means the assertion must NOT
            be true.
        id:
          type: string
      required:
        - type
        - evaluationId
        - targetValue
        - id
      title: EvaluationAssertionExactMatch
    EvaluationAssertionContainsAll:
      type: object
      properties:
        type:
          type: string
          enum:
            - CONTAINS_ALL
        evaluationId:
          type: string
        weight:
          type: number
          minimum: 0
          maximum: 1
          default: 1
          description: How heavily to weigh the assertion within the evaluation.
        targetValues:
          type: array
          items:
            type: string
          minItems: 1
          description: List of values any of which may be present.
        jsonPath:
          type: string
          nullable: true
          default: $
          description: A JSON path to use when matching a JSON response.
        ignoreCase:
          type: boolean
          default: false
          description: Whether to ignore case when comparing strings.
        negate:
          type: boolean
          default: false
          description: >-
            Whether to negate the assertion. "true" means the assertion must NOT
            be true.
        id:
          type: string
      required:
        - type
        - evaluationId
        - targetValues
        - id
      title: EvaluationAssertionContainsAll
    EvaluationAssertionContainsAny:
      type: object
      properties:
        type:
          type: string
          enum:
            - CONTAINS_ANY
        evaluationId:
          type: string
        weight:
          type: number
          minimum: 0
          maximum: 1
          default: 1
          description: How heavily to weigh the assertion within the evaluation.
        targetValues:
          type: array
          items:
            type: string
          minItems: 1
          description: List of values any of which may be present.
        jsonPath:
          type: string
          nullable: true
          default: $
          description: A JSON path to use when matching a JSON response.
        ignoreCase:
          type: boolean
          default: false
          description: Whether to ignore case when comparing strings.
        negate:
          type: boolean
          default: false
          description: >-
            Whether to negate the assertion. "true" means the assertion must NOT
            be true.
        id:
          type: string
      required:
        - type
        - evaluationId
        - targetValues
        - id
      title: EvaluationAssertionContainsAny
    EvaluationAssertionStartsWith:
      type: object
      properties:
        type:
          type: string
          enum:
            - STARTS_WITH
        evaluationId:
          type: string
        weight:
          type: number
          minimum: 0
          maximum: 1
          default: 1
          description: How heavily to weigh the assertion within the evaluation.
        targetValue:
          type: string
          description: The value that the response should start with.
        jsonPath:
          type: string
          nullable: true
          default: $
          description: A JSON path to use when matching a JSON response.
        ignoreCase:
          type: boolean
          default: false
          description: Whether to ignore case when comparing strings.
        negate:
          type: boolean
          default: false
          description: >-
            Whether to negate the assertion. "true" means the assertion must NOT
            be true.
        id:
          type: string
      required:
        - type
        - evaluationId
        - targetValue
        - id
      title: EvaluationAssertionStartsWith
    EvaluationAssertionCost:
      type: object
      properties:
        type:
          type: string
          enum:
            - COST
        evaluationId:
          type: string
        weight:
          type: number
          minimum: 0
          maximum: 1
          default: 1
          description: How heavily to weigh the assertion within the evaluation.
        targetThreshold:
          type: number
          description: The cost threshold to be evaluated against.
        id:
          type: string
      required:
        - type
        - evaluationId
        - targetThreshold
        - id
      title: EvaluationAssertionCost
    EvaluationAssertionLatency:
      type: object
      properties:
        type:
          type: string
          enum:
            - LATENCY
        evaluationId:
          type: string
        weight:
          type: number
          minimum: 0
          maximum: 1
          default: 1
          description: How heavily to weigh the assertion within the evaluation.
        targetThreshold:
          type: number
          description: The latency threshold to be evaluated against.
        id:
          type: string
      required:
        - type
        - evaluationId
        - targetThreshold
        - id
      title: EvaluationAssertionLatency
    EvaluationAssertionToolCalled:
      type: object
      properties:
        type:
          type: string
          enum:
            - TOOL_CALLED
        evaluationId:
          type: string
        weight:
          type: number
          minimum: 0
          maximum: 1
          default: 1
          description: How heavily to weigh the assertion within the evaluation.
        toolName:
          type: string
          description: The name of the tool that should have been called.
        id:
          type: string
      required:
        - type
        - evaluationId
        - toolName
        - id
      title: EvaluationAssertionToolCalled
    EvaluationAssertionToolCalledWith:
      type: object
      properties:
        type:
          type: string
          enum:
            - TOOL_CALLED_WITH
        evaluationId:
          type: string
        weight:
          type: number
          minimum: 0
          maximum: 1
          default: 1
          description: How heavily to weigh the assertion within the evaluation.
        argKeyName:
          type: string
          description: The argument name to be matched.
        toolName:
          type: string
          description: The name of the tool that should have been called.
        ignoreCase:
          type: boolean
          default: false
          description: Whether to ignore case when comparing argument names.
        negate:
          type: boolean
          default: false
          description: >-
            Whether to negate the assertion. "true" means the assertion must NOT
            be true.
        id:
          type: string
      required:
        - type
        - evaluationId
        - argKeyName
        - toolName
        - id
      title: EvaluationAssertionToolCalledWith

````