Patch Blueprint Api V1 Workstreams Workplans Blueprint Id Patch
patch
/api/v1/workstreams/workplans/{blueprint_id}Patch workplan config (partial save)
Partially update a workplan's saved configuration β the WorkPlan-detail
Save control (two-col / S2). Every field is optional; only the fields
present in the body are changed (omitting a field leaves the stored value
untouched). Accepts the same plan-settings as the PUT update:
- `schedule` β cron expression (validated; invalid cron β 422)
- `schedule_timezone` β IANA timezone (validated; unknown tz β 422)
- `max_duration_minutes` β guardrail, positive and β€ 1440 (24h)
- `human_checkpoints` β sign-off gate list ([] clears the gate)
- `run_mode` / `default_context.autonomy` β propose|auto_run (enum-validated)
Tenant-scoped: only the owning workspace may patch the workplan (a foreign
workplan id is a 404, never a cross-firm write). Returns the updated
Workplan in the same shape as the GET read so the FE can refresh in place.
**Authentication Required:** JWT Bearer token
Path parameters
blueprint_idrequiredpath | β |
Request bodyapplication/json
| Field | Type | Description |
|---|---|---|
name | string | null | Workplan name |
description | string | null | Workplan description |
client_id | string (uuid) | null | Client UUID (references platform.clients). Omit to leave unchanged; send an explicit null to clear the assignment (the handler distinguishes the two via fields-set). |
config_overrides | object | null | Configuration overrides β shallow-merged into the stored configuration (existing keys survive unless explicitly overridden). |
schedule | string | null | Cron schedule expression (folded into configuration; null = unscheduled) |
schedule_timezone | string | null | IANA timezone for the schedule (folded into configuration) |
max_duration_minutes | integer | null | Per-instance duration guardrail in minutes (folded into configuration). Positive and β€ 1440 (24h). |
human_checkpoints | any[] | null | Sign-off gate checkpoints (folded into configuration); [] clears the gate |
run_mode | string | null | Run posture / autonomy: propose|auto_run (folded into configuration) |
default_context | object | null | Run-context bag. Its ``autonomy`` key is an alias for ``run_mode`` (propose|auto_run) β supplied here it is folded into the effective run posture when ``run_mode`` is not given explicitly. |
status | "draft" | "active" | "paused" | "archived" | null | Workplan status |
Responses
200Workplan config saved
| Field | Type | Description |
|---|---|---|
idrequired | string (uuid) | Workplan UUID |
template_idrequired | string (uuid) | Source template UUID (workstream_id in DB) |
namerequired | string | Workplan name |
client_id | string (uuid) | null | Client UUID (optional) |
client_name | string | null | Client name |
run_mode | WorkplanRunMode | The WorkPlan's effective run posture (S2-READ Β§1a).
``effective`` resolves: plan-level ``configuration.run_mode`` β the
workstream default β ``propose``. ``source`` tells the FE whether the value
was set on this plan or inherited. ``locked`` is the firm-lock governance
flag β always ``False`` in S2.show nested |
cohort | WorkplanCohort | Structural facts about the WorkPlan's bound client set (S2-READ Β§1b).
Live exception/ready counts live on the roster's ``summary`` (one
authoritative source); this object carries only the cohort's size + shape.
With no multi-client cohort writer yet, ``total_clients`` resolves to 0/1
and ``selector_kind`` to ``single`` β the shape is frozen, the populating
data is S2-write BE work behind it.show nested |
config_overrides | object | Configuration (from DB)show nestedEmpty object. |
effective_config | object | Merged effective configshow nestedEmpty object. |
schedule | string | null | Cron schedule expression (from configuration; null = unscheduled) |
schedule_timezone | string | IANA timezone for the schedule (from configuration; defaults UTC) |
max_duration_minutes | integer | null | Per-instance duration guardrail in minutes (from configuration; null = unset) |
human_checkpoints | any[] | Sign-off gate checkpoints (from configuration). Non-empty means a partner sign-off gate is on. |
statusrequired | "draft" | "active" | "paused" | "archived" | Status for workstream entities.draftactivepausedarchived |
last_run_at | string (date-time) | null | Most recent cycle start for this WorkPlan (null if never run) |
next_run_at | string (date-time) | null | Next scheduled execution β computed; see GET /workplans/{id}/next-run (P1) |
created_by | string (uuid) | null | Creator user ID (owner_id in DB) |
created_atrequired | string (date-time) | Creation timestamp |
updated_atrequired | string (date-time) | Last update timestamp |
401Unauthorized
404Workplan not found
422Invalid schedule / timezone / autonomy / guardrail
curl https://api.dev.arch.ie/api/v1/workstreams/workplans/<blueprint_id> \
-X PATCH \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"name": null,
"description": null,
"client_id": null,
"config_overrides": null,
"schedule": null,
"schedule_timezone": null,
"max_duration_minutes": null,
"human_checkpoints": null,
"run_mode": null,
"default_context": null,
"status": null
}'