Launch Week 3: Five days of launches

List Risk Categories

(v2)

GET

Lists the risk categories of a red teaming framework one page at a time, ordered by name. Each is returned with its selections counted; retrieve one by id to see which vulnerability types and attack methods it holds.

GET/v2/rt-frameworks/{rtFrameworkId}/risk-categories
curl -X GET "https://api.confident-ai.com/v2/rt-frameworks/{rtFrameworkId}/risk-categories" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "success": true,
  "data": {
    "riskCategories": [
      {
        "id": "<RISK-CATEGORY-ID>",
        "name": "Data protection",
        "description": "Risks around leaking data the model was given.",
        "numVulnerabilityTypes": 4,
        "numAttackMethods": 3
      }
    ],
    "totalRiskCategories": 8,
    "page": 1,
    "pageSize": 25
  },
  "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.

Query parameters

  • pageintegerdefault: 1

    The page to return. Defaults to 1.

  • pageSizeintegerdefault: 25

    The number of results per page, at most 100. Defaults to 25.

Response

List Risk Categories succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    One page of risk categories, with the total across all pages.

    Show 4 propertiesHide 4 properties
    • riskCategorieslist of objects

      The risk categories for the current page, ordered by name.

      Show 5 propertiesHide 5 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.

      • numVulnerabilityTypesinteger

        How many vulnerability types the category selects.

      • numAttackMethodsinteger

        How many attack methods the category selects.

    • totalRiskCategoriesinteger

      The total number of risk categories in this framework.

    • pageinteger

      The page this response covers.

    • pageSizeinteger

      The number of risk categories per page.

  • linkstring

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

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI