Launch Week 3: Five days of launches

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.

PUT/v2/rt-frameworks/{rtFrameworkId}/risk-categories/{riskCategoryId}
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
  }
}'
200
{
  "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_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • rtFrameworkIdstringRequired

    The id of the red teaming framework the category belongs to.

  • riskCategoryIdstringRequired

    The id of the risk category.

Request body

  • namestring

    The name of the risk category, unique within the framework.

  • descriptionstring | null

    What this risk category covers. Send null to clear it.

  • vulnerabilityTypeIdslist of strings

    The ids of the vulnerability types to probe for. The list replaces the category's current selection.

  • attackMethodIdslist of strings

    The ids of the attack methods to probe with. The list replaces the category's current selection.

  • vulnerabilityIdToPriorityLevelobject | null

Response

Update Risk Category succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    One 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
    • idstring

      The id of the risk category, generated by Confident AI.

    • namestring

      The name of the risk category, unique within the framework.

    • descriptionstring | null

      What this risk category covers.

    • vulnerabilityTypeslist of objects

      The vulnerability types this category probes for.

      Show 4 propertiesHide 4 properties
      • idstring

        The id of the vulnerability type.

      • namestring

        The name of the vulnerability type.

      • vulnerabilityIdstring

        The id of the vulnerability this type belongs to.

      • vulnerabilityNamestring

        The name of the vulnerability this type belongs to.

    • attackMethodslist of objects

      The attack methods this category probes with.

      Show 3 propertiesHide 3 properties
      • idstring

        The id of the attack method.

      • namestring

        The name of the attack method.

      • multiTurnboolean

        Whether the attack plays out over a conversation rather than a single request.

    • vulnerabilityIdToPriorityLevelobject

      How 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.

  • linkstring

    This is the URL of the resource on the Confident AI platform.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI