Python
import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
red_team_runs = client.dataframer.red_team_runs.list()
print(red_team_runs)curl https://df-api.dataframer.ai/api/dataframer/red-team-runs/ \
-H "Authorization: Bearer $DATAFRAMER_API_KEY"[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"red_team_spec_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spec_name": "<string>",
"number_of_behaviors": 123,
"number_of_prompts_per_behavior": 123,
"model_name": "<string>",
"status": "PENDING",
"completed_at": "2023-11-07T05:31:56Z",
"created_by_email": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]Red Teaming
List red team runs
Get all red team runs for your company
GET
/
api
/
dataframer
/
red-team-runs
/
Python
import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
red_team_runs = client.dataframer.red_team_runs.list()
print(red_team_runs)curl https://df-api.dataframer.ai/api/dataframer/red-team-runs/ \
-H "Authorization: Bearer $DATAFRAMER_API_KEY"[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"red_team_spec_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spec_name": "<string>",
"number_of_behaviors": 123,
"number_of_prompts_per_behavior": 123,
"model_name": "<string>",
"status": "PENDING",
"completed_at": "2023-11-07T05:31:56Z",
"created_by_email": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]Use the
spec_id query parameter to filter runs by a specific red team spec.Authorizations
Response
List of red team runs

