Update Method
PUThttps://api.confident-ai.com/v2/attack-methods/{attackMethodId}
Configures the parameter values your project runs an attack method with, and returns the method. The values replace this project's stored configuration wholesale, so send every value you want kept. An attack method that takes no parameters cannot be configured.
curl -X PUT "https://api.confident-ai.com/v2/attack-methods/{attackMethodId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"parameters": {
"persona": "urgent"
}
}'{
"success": true,
"data": {
"id": "Prompt Injection",
"name": "Prompt Injection",
"description": "Embeds instructions in the input that try to override the system prompt.",
"multiTurn": false,
"exploitability": "LOW",
"configurable": true,
"parameters": {}
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/threats/attacks",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
attackMethodIdstringRequiredThe id of the attack method, as the list returns it. A method's catalog name also resolves.
Request body
parametersobjectRequiredThe values to configure, keyed by parameter name. They replace this project's stored configuration wholesale, so send every value you want kept, and each must match the type its parameter declares.
Response
Update Method succeeded.
successbooleanIndicates if the request was successful.
dataobjectOne way of attacking the system under test, drawn from the Confident AI catalog and configured per project.
Show 7 propertiesHide 7 properties
idstringThe id of the attack method. It is the method's catalog name until this project configures it, and its generated id afterwards; both keep resolving.
namestringThe name of the attack method, as the catalog spells it.
descriptionstring | nullWhat the attack method does to the system under test.
multiTurnbooleanWhether the attack plays out over a conversation rather than a single request.
exploitabilityenum | nullA three-step scale, LOW to HIGH, used for how exposed a system under test is and how easily an attack method exploits it.
Show 3 enum valuesHide 3 enum values
LOWMEDIUMHIGH
configurablebooleanWhether the attack method takes parameters. Updating one that takes none is rejected.
parametersobject | null
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.