Update Risk Category
(v2)PUT
Updates a risk category and returns it. Each list you send replaces the stored selection rather than adding to it, so send the complete set of vulnerability type ids or attack method ids you want the category to hold.
curl -X PUT "https://api.confident-ai.com/v2/rt-frameworks/{rtFrameworkId}/risk-categories/{riskCategoryId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Data protection",
"description": "Risks around leaking data the model was given.",
"vulnerabilityTypeIds": [
"<VULNERABILITY-TYPE-ID>"
],
"attackMethodIds": [
"<ATTACK-METHOD-ID>"
],
"vulnerabilityIdToPriorityLevel": {
"<VULNERABILITY-ID>": 2
}
}'{
"success": true,
"data": {
"id": "<RISK-CATEGORY-ID>",
"name": "Data protection",
"description": "Risks around leaking data the model was given.",
"vulnerabilityTypes": [
{
"id": "<VULNERABILITY-TYPE-ID>",
"name": "System prompt disclosure",
"vulnerabilityId": "<VULNERABILITY-ID>",
"vulnerabilityName": "Prompt Leakage"
}
],
"attackMethods": [
{
"id": "<ATTACK-METHOD-ID>",
"name": "Prompt Injection",
"multiTurn": false
}
],
"vulnerabilityIdToPriorityLevel": {
"<VULNERABILITY-ID>": 2
}
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/frameworks/<RT-FRAMEWORK-ID>",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
rtFrameworkIdstringRequiredThe id of the red teaming framework the category belongs to.
riskCategoryIdstringRequiredThe id of the risk category.
Request body
namestringThe name of the risk category, unique within the framework.
descriptionstring | nullWhat this risk category covers. Send
nullto clear it.vulnerabilityTypeIdslist of stringsThe ids of the vulnerability types to probe for. The list replaces the category's current selection.
attackMethodIdslist of stringsThe ids of the attack methods to probe with. The list replaces the category's current selection.
vulnerabilityIdToPriorityLevelobject | null
Response
Update Risk Category succeeded.
successbooleanIndicates if the request was successful.
dataobjectOne area of risk inside a framework, pairing the vulnerability types to probe for with the attack methods to probe with.
Show 6 propertiesHide 6 properties
idstringThe id of the risk category, generated by Confident AI.
namestringThe name of the risk category, unique within the framework.
descriptionstring | nullWhat this risk category covers.
vulnerabilityTypeslist of objectsThe vulnerability types this category probes for.
Show 4 propertiesHide 4 properties
idstringThe id of the vulnerability type.
namestringThe name of the vulnerability type.
vulnerabilityIdstringThe id of the vulnerability this type belongs to.
vulnerabilityNamestringThe name of the vulnerability this type belongs to.
attackMethodslist of objectsThe attack methods this category probes with.
Show 3 propertiesHide 3 properties
idstringThe id of the attack method.
namestringThe name of the attack method.
multiTurnbooleanWhether the attack plays out over a conversation rather than a single request.
vulnerabilityIdToPriorityLevelobjectHow much of the assessment each vulnerability gets, keyed by vulnerability id, from 0 to 3. A vulnerability with no entry runs at the default weight.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.