List Metric Data
(v2)GET
Lists every metric result in your Confident AI project one page at a time, newest first, across all evaluations on traces, spans, threads and test cases.
curl -X GET "https://api.confident-ai.com/v2/metrics-data" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"metricsData": [
{
"id": "<METRIC-DATA-ID>",
"name": "Answer Relevancy",
"score": 0.95,
"reason": "The answer directly states the capital of France.",
"success": true,
"threshold": 0.5,
"strictMode": false,
"skipped": false,
"flaky": false,
"evaluationModel": "gpt-4o",
"evaluationCost": 0.0004,
"error": null,
"errorType": "AI_CONNECTION_ERROR",
"createdAt": "2025-01-15T10:30:06.000Z",
"evaluatedAt": "2025-01-15T10:30:09.000Z",
"multiTurn": false,
"traceUuid": "3f9c2a1e-5b7d-4c8e-9f01-2a3b4c5d6e7f",
"spanUuid": null,
"threadId": null,
"testCaseId": "string",
"testRunId": null
}
],
"totalMetricsData": 120,
"page": 1,
"pageSize": 25
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Query parameters
pageintegerdefault: 1The page of metric data to return. Defaults to 1.
pageSizeintegerdefault: 25The number of results per page, at most 100. Defaults to 25.
startstringReturns only results recorded at or after this ISO 8601 datetime.
endstringReturns only results recorded before this ISO 8601 datetime.
multiTurnenumFilter for results evaluated on your test case type, true for multi-turn, false for single-turn. Returns both if not specified.
searchTermstringReturns only results whose metric name contains this text, case-insensitively.
Response
List Metric Data succeeded.
successbooleanIndicates if the request was successful.
dataobjectOne page of metric results, with the total across all pages.
Show 4 propertiesHide 4 properties
metricsDatalist of objectsThe metric results for the current page, newest first. Each result reports whether it was evaluated on a multi-turn conversation, and carries the ids of whatever it was recorded against.
Show 21 propertiesHide 21 properties
idstringThe unique identifier of the metric data entry.
namestringThe name of the metric.
scorenumber | nullThe final metric score, or null when the metric errored or was skipped.
reasonstring | nullThe reason for the metric score, generated by the evaluation model at evaluation time.
successboolean | nullWhether the metric score is above the threshold, or null while the evaluation is still running.
thresholdnumber | nullThe threshold for the metric, which determines if the metric is passing or failing.
strictModebooleanWhether the metric was run in strict mode, which outputs a binary score of 0 or 1.
skippedbooleanWhether the metric evaluation was skipped.
flakybooleanWhether the metric's verdict was non-deterministic across runs.
evaluationModelstring | nullThe evaluation model used to run the evaluation.
evaluationCostnumber | nullThe cost of running the evaluation in USD.
errorstring | nullThe error message if the evaluation failed.
errorTypeenum | nullWhy an evaluation errored: the AI connection or a transformer failed, the evaluation model failed, the test case lacked the parameters the metric needs, or an internal error occurred.
Show 5 enum valuesHide 5 enum values
AI_CONNECTION_ERRORTRANSFORMER_ERROREVALUATION_MODEL_ERRORINVALID_TEST_CASE_PARAMETERSINTERNAL_ERROR
createdAtstringThe time the metric data was created.
evaluatedAtstring | nullThe time the metric was evaluated, or null while it is still running.
multiTurnbooleanWhether this metric was evaluated on a multi-turn conversation.
traceUuidstring | nullThe uuid of the trace this metric was evaluated on, or null if it was not evaluated on one.
spanUuidstring | nullThe uuid of the span this metric was evaluated on, for component-level metrics.
threadIdstring | nullThe id of the thread this metric was evaluated on, for conversation-level metrics.
testCaseIdstring | nullThe id of the test case this metric was evaluated on.
testRunIdstring | nullThe id of the test run this result belongs to. Retrieve that test run to read the result alongside the rest of its test cases.
totalMetricsDataintegerThe total number of results matching the query across all pages.
pageintegerThe page this response covers.
pageSizeintegerThe number of results per page.
deprecatedbooleanIndicates if this endpoint is deprecated.