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_spec = client.dataframer.red_team_specs.update(
spec_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
concerns="Should not provide medical diagnoses, prescription recommendations, or discuss specific medications",
)
print(red_team_spec.id)curl https://df-api.dataframer.ai/api/dataframer/red-team-specs/$SPEC_ID/ \
-X PATCH \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $DATAFRAMER_API_KEY" \
-d '{
"concerns": "Should not provide medical diagnoses, prescription recommendations, or discuss specific medications"
}'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"domain_description": "<string>",
"app_description": "<string>",
"concerns": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": 123,
"created_by_email": "<string>"
}{
"error": "<string>",
"name": [
"<string>"
]
}Red Teaming
Update red team spec
Update a red team spec
PATCH
/
api
/
dataframer
/
red-team-specs
/
{spec_id}
/
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_spec = client.dataframer.red_team_specs.update(
spec_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
concerns="Should not provide medical diagnoses, prescription recommendations, or discuss specific medications",
)
print(red_team_spec.id)curl https://df-api.dataframer.ai/api/dataframer/red-team-specs/$SPEC_ID/ \
-X PATCH \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $DATAFRAMER_API_KEY" \
-d '{
"concerns": "Should not provide medical diagnoses, prescription recommendations, or discuss specific medications"
}'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"domain_description": "<string>",
"app_description": "<string>",
"concerns": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": 123,
"created_by_email": "<string>"
}{
"error": "<string>",
"name": [
"<string>"
]
}Authorizations
API Key authentication. Format: "Bearer YOUR_API_KEY"
Path Parameters
UUID of the red team spec
Body
application/json
Response
Red team spec updated successfully
Unique identifier for the red team spec
Name of the red team spec (auto-converted to snake_case)
Description of the domain or industry the application operates in
Description of the application being tested, including its purpose and functionality
Specific security concerns or behaviors to focus on during red teaming
Timestamp when the spec was created
ID of the user who created this spec
Email of the user who created this spec

