Get Task Results Summary of a specific test type
curl --request GET \
--url https://api.enkryptai.com/redteam/v3/results/summary/{test_type} \
--header 'apikey: <api-key>'import requests
url = "https://api.enkryptai.com/redteam/v3/results/summary/{test_type}"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api.enkryptai.com/redteam/v3/results/summary/{test_type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.enkryptai.com/redteam/v3/results/summary/{test_type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/redteam/v3/results/summary/{test_type}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enkryptai.com/redteam/v3/results/summary/{test_type}")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/redteam/v3/results/summary/{test_type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"summary": {
"advbench_extended": {
"basic": {
"summary": [
{
"harmful_test": {
"total": 1,
"success": 0,
"categories": {
"Hate Speech & Discrimination": {
"total": 1,
"success(%)": 0
}
},
"scenarios": {},
"attack_methods": {
"Basic": {
"total": 1,
"success": 0
}
}
}
}
]
}
}
}
}Red Team (Legacy)
Get Task Results Summary of a specific test type
GET
/
redteam
/
v3
/
results
/
summary
/
{test_type}
Get Task Results Summary of a specific test type
curl --request GET \
--url https://api.enkryptai.com/redteam/v3/results/summary/{test_type} \
--header 'apikey: <api-key>'import requests
url = "https://api.enkryptai.com/redteam/v3/results/summary/{test_type}"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api.enkryptai.com/redteam/v3/results/summary/{test_type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.enkryptai.com/redteam/v3/results/summary/{test_type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/redteam/v3/results/summary/{test_type}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enkryptai.com/redteam/v3/results/summary/{test_type}")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/redteam/v3/results/summary/{test_type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"summary": {
"advbench_extended": {
"basic": {
"summary": [
{
"harmful_test": {
"total": 1,
"success": 0,
"categories": {
"Hate Speech & Discrimination": {
"total": 1,
"success(%)": 0
}
},
"scenarios": {},
"attack_methods": {
"Basic": {
"total": 1,
"success": 0
}
}
}
}
]
}
}
}
}Authorizations
Headers
The Redteam task ID
Example:
"generate-and-redteam-94f40d84-5b4e-4e97-a793-48357b71490a"
The test name
Example:
"Test 1"
Path Parameters
The test type
Available options:
bias_test, cbrn_test, csem_test, harmful_test, insecure_code_test, toxicity_test, pii_test, copyright_test, misinformation_test, system_prompt_extractions_test, sponge_test, competitor_test, adv_bias_test, adv_info_test, adv_tool_test, adv_command_test, adv_pii_test, adv_competitor_test, custom_test, alignment_and_governance_test, input_and_content_integrity_test, infrastructure_and_integration_test, security_and_privacy_test, human_factors_and_societal_impact_test, access_control_test, physical_and_actuation_safety_test, reliability_and_monitoring_test, governance_test, agent_output_quality_test, tool_misuse_test, privacy_test, reliability_and_observability_test, agent_behaviour_test, access_control_and_permissions_test, tool_extraction_test Example:
"bias_test"
Response
200 - application/json
Successful Response
- RedteamResultsSummaryTestTypeResponse
- RedteamResultsSummaryTestTypePendingResponse
Show child attributes
Show child attributes

