Use this endpoint to retrieve the details for a specific defend workflow
status field indicates whether the workflow is active and currently accepting events. If the workflow status is inactive, no events submitted for the workflow will be processed.stats field contains counts of the events processed by the workflow, which can be used to determine the efficacy of the workflow. The events field lists the details of the most recent events processed by the workflow in a format similar to what is returned when you retrieve an event’s details.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the workflow to retrieve.
Limit the number of returned events associated with this workflow. Defaults to 10.
Workflow retrieved successfully
A unique workflow ID used to identify the workflow in other endpoints.
"defend_abc123"
A human-readable name for the workflow that will correspond to it's workflow ID.
"Test Workflow"
A description for the workflow, to help you remember what that workflow means to your organization.
"A workflow used to test the DeepRails API"
Status of the selected workflow. May be inactive or active. Inactive workflows will not accept events.
inactive, active "active"
The time the workflow was created in UTC.
The most recent time the workflow was updated in UTC.
Type of thresholds used to evaluate the event.
custom, automatic "custom"
Mapping of guardrail metric names to tolerance values. Values can be strings (low, medium, high) for automatic tolerance levels.
null
Mapping of guardrail metric names to threshold values. Values can be floating point numbers (0.0-1.0) for custom thresholds.
{ "correctness": 0.9 }An array of events associated with this workflow.
[
{
"event_id": "evt_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"improvement_tool_status": null,
"improved_model_output": null,
"evaluations": [
{
"attempt": "Initial Evaluation",
"evaluation_status": "completed",
"guardrail_metrics": ["correctness"],
"run_mode": "smart",
"model_input": {
"system_prompt": "You are a helpful assistant.",
"user_prompt": "Hello, how are you?"
},
"model_output": "I am good, thank you!",
"nametag": "Test Event",
"progress": 100,
"error_message": null,
"evaluation_result": {
"correctness": {
"score": 1,
"rationale": "The response is correct.",
"threshold": 0.9
}
},
"evaluation_total_cost": 0.01,
"created_at": "2025-11-10T01:32:44.591Z",
"modified_at": "2025-11-10T01:32:44.591Z"
}
]
}
]Extended AI capabilities available to the event, if any. Can be web_search and/or file_search.
List of files associated with the workflow. If this is not empty, models can search these files when performing evaluations or remediations
[
{
"file_name": "example.pdf",
"file_id": "file_xxxxxxxx",
"file_size": 1024
}
]The action used to improve outputs that fail one or more guardrail metrics for the workflow events.
regen, fixit, do_nothing "fixit"