Archive a scenario
SDK platic.evals.scenarios.archive()
Stop using a scenario in new tests. First remove it from suites that use it or archive those suites, then send its scenarioId to archive it. All versions become archived, and past runs keep their conversations.
Example
curl -X POST "https://api.platic.ai/v1/evals/scenarios/$SCENARIO_ID/archive" \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.evals.scenarios.archive("greets"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
scenarioId | string | The scenario you archive | ✓ |
The request has no body.
Response
200 with the scenario's newest version, already archived:
{
"status": "success",
"data": {
"scenarioId": "books_tuesday_appointment",
"version": 3,
"scope": "workspace",
"status": "archived",
"proposedBy": "user",
"contentHash": "sha256:0c7e…",
"scenario": {
"scenarioId": "books_tuesday_appointment",
"title": "Books an appointment",
"profileId": "general",
"type": "script",
"run": { "nTrials": 3, "maxTurns": 12 }
}
}
} The response includes the complete scenario; the example shows only part of it.
Response fields
The same as in List scenarios.
Errors
| Status | details.code | When |
|---|---|---|
404 | EVAL_NOT_FOUND | The scenario does not exist in your workspace. |
409 | EVAL_SCENARIO_IN_USE | A suite that is not archived still uses it. details.suiteIds says which. |
409 | EVAL_SCENARIO_READONLY | It is a platform scenario (scope: "platform"): it cannot be archived. |
With a scenario that a suite still uses:
{
"code": 409,
"error": "Conflict - The resource state conflicts with this request",
"details": {
"code": "EVAL_SCENARIO_IN_USE",
"message": "Scenario books_tuesday_appointment is listed by suites that are not archived",
"suiteIds": ["s8Kd2LmQ"]
}
} Remove it from those suites with Replace a suite, or archive them, and try again.
Notes
- Archiving it again returns it unchanged.
- It requires permission to edit agents (any).