Assesses the validity and correctness of responses from external APIs, ensuring that they align with expected criteria. This evaluation is essential for systems that depend on API integrations, helping to verify response structure, data accuracy, and reliability.
expected_status_code
, contained valid JSON if validate_json_body
was true).Click here to learn how to setup evaluation using the Python SDK.
Input Type | Parameter | Type | Description |
---|---|---|---|
Required Inputs | response | string | The API response content (e.g., JSON body as a string, or status code). |
Configuration Parameters | expected_status_code | int | (Optional) The expected HTTP status code for success. |
validate_json_body | bool | (Optional) If true, checks if the response string is valid JSON. Default: False . |
Output | Type | Description |
---|---|---|
Result | bool | Returns 1.0 if the validation passes, 0.0 otherwise (Fail). |