Update Collection
PUThttps://api.confident-ai.com/v1/metric-collections/{id}
Updates a metric collection's name and metricSettings.
curl -X PUT "https://api.confident-ai.com/v1/metric-collections/{id}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"multiTurn": true,
"metricSettings": [
{
"metric": {
"name": "string"
},
"activated": true,
"threshold": 0.5,
"includeReason": true,
"strictMode": false,
"sampleRate": 1
}
]
}'{
"success": true,
"data": {
"id": "string"
},
"deprecated": true
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
idstringRequiredThe id of the metric collection you want to update.
Request body
namestringThe name of the metric collection, which must be unique within your project.
multiTurnbooleanThis is true if your metric collection is multi-turn, which contains only multi-turn metrics. Defaulted to
false.metricSettingslist of objectsThis is the list of metric settings for the collection.
Show 6 propertiesHide 6 properties
metricobjectThis is a metric object, which contains the metric name.
Show 1 propertyHide 1 property
namestringRequiredThis is the name of the metric.
activatedbooleanThis determines if the metric is activated. Only activated metrics are used for evaluations. Non-activated metrics are skipped.
thresholdnumberThis determines the threshold for the metric which determines if the metric passes or fails depending on if the metric score is equal or greater than the threshold.
includeReasonbooleanThis determines if the reason for the metric score should be generated during evaluations.
strictModebooleanThis determines if the metric is in strict mode. Metrics in strict mode output a binary score of 0 or 1, indicating pass or fail, as opposed to a continuous score from 0 to 1.
sampleRatenumberThis determines the probability of the metric being ran for evaluation.
Response
successbooleanThis is true if the metric collection was updated successfully.
dataobjectThis maps to the id of the metric collection.
Show 1 propertyHide 1 property
idstringThis is the id of the metric collection.
deprecatedbooleanThis is true if this metric collection endpoint is deprecated.