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.
curl -X GET "https://api.confident-ai.com/v2/rt-frameworks/{rtFrameworkId}/risk-categories" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"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_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
rtFrameworkIdstringRequiredThe id of the red teaming framework.
Query parameters
pageintegerdefault: 1The page to return. Defaults to 1.
pageSizeintegerdefault: 25The number of results per page, at most 100. Defaults to 25.
Response
List Risk Categories succeeded.
successbooleanIndicates if the request was successful.
dataobjectOne page of risk categories, with the total across all pages.
Show 4 propertiesHide 4 properties
riskCategorieslist of objectsThe risk categories for the current page, ordered by name.
Show 5 propertiesHide 5 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.
numVulnerabilityTypesintegerHow many vulnerability types the category selects.
numAttackMethodsintegerHow many attack methods the category selects.
totalRiskCategoriesintegerThe total number of risk categories in this framework.
pageintegerThe page this response covers.
pageSizeintegerThe number of risk categories per page.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.