Operating system set to macOS
Documentation jurisdiction set to United States
Sign inConnect Claude
API/schemas
Schema

JobDefinitionResponse

Job definition response.

FieldTypeDescription
idrequiredstring (uuid)β€”
permakeystring | nullStable human-readable key for the batch/fan-out deep-link URL /workstreams/{ws}/cycles/{permakey}/… (#173). Null on legacy rows.
namerequiredstringβ€”
descriptionstring | nullβ€”
domainrequiredstringβ€”
goal_templaterequiredstringβ€”
toolsrequiredstring[]β€”
deliverablesrequiredobject[]β€”
item shape
Empty object.
max_turnsrequiredintegerβ€”
max_cost_usdrequirednumberβ€”
max_duration_minutesrequiredintegerβ€”
target_selectorrequiredobjectβ€”
show nested
Empty object.
per_client_overridesrequiredobjectβ€”
show nested
Empty object.
input_bindingsrequiredobjectβ€”
show nested
Empty object.
default_contextrequiredobjectβ€”
show nested
Empty object.
source_tracingrequiredbooleanβ€”
human_checkpointsrequiredstring[]β€”
schedulestring | nullβ€”
schedule_timezonerequiredstringβ€”
skip_weekendsbooleanβ€”
holiday_calendarstring | nullβ€”
not_ready_policystringFan-out ready-gating policy for a not-ready client at a scheduled fire.
schedule_overridesobjectPer-client schedule override map (clientId -> override spec).
show nested
Empty object.
trigger_typestringPersisted 'How it runs' trigger choice (manual/schedule/webhook/email/api).
schedule_specobject | nullStructured ScheduleEditor spec (opaque JSONB round-trip; cron stays the execution shape).
is_enabledrequiredbooleanβ€”
next_run_atany | nullβ€”
last_run_atany | nullβ€”
statusrequiredstringβ€”
created_byrequiredstringβ€”
created_by_namestring | nullDisplay name behind created_by, for the detail header's 'Created <date> by <who>'. Null when the id no longer resolves to a user β€” render the date alone rather than an id.
created_atrequiredanyβ€”
updated_bystring | nullUser id of whoever last edited this WorkPlan. Null for edits predating the column.
updated_by_namestring | nullDisplay name behind updated_by, for 'Edited <date> by <who>'.
updated_atrequiredanyβ€”
current_versioninteger | nullThe WorkPlan's own latest config version in job_definition_version; null if no history yet. Not a WorkStream version: see workstream_current_version.
workstream_current_versioninteger | nullHighest workstreams.workstream_version.version of the WorkPlan's WorkStream (default_context.source_workstream_id); null when the WorkPlan has no WorkStream or it has no saved version.
pinned_workstream_versioninteger | nullPinned version of the WorkPlan's WorkStream: workstreams.workstream_version.version for default_context.source_workstream_id; null = follow the latest.
upstream_update_availablebooleanTrue when pinned_workstream_version is set AND the WorkPlan's WorkStream has a version row with a higher number (workstream_current_version).
cost_so_far_gbpnumber | nullSum of customer-facing GBP cost (hourly_rate_gbp x elapsed) across all cycles for this job definition. Null when no cycles exist.
hourly_rate_gbpnumberThis customer's WorkStream hourly rate in GBP (platform.organizations.workstream_hourly_rate_gbp). Their cost, our revenue β€” never our compute cost. Serialized because the client RENDERS the rate beside the total ('Β£X total Β· Β£Y avg / client Β· Β£Z/hr rate'); without it the frontend had to hardcode 19, which silently disagrees with a total computed at any other rate.
total_runsintegerCount of cycles launched from this job definition. When the list was filtered by workstream_id, this count is scoped to that workstream.
active_runsintegerCount of cycles currently in flight (see ACTIVE_CYCLE_STATUSES). Same scoping rule as total_runs. Exists so a caller that only needs 'how many are running' does not have to fetch every cycle of every job to count them client-side β€” the shell rail did exactly that, at one request per job on every authenticated page load.
last_cycle_atany | nullStart timestamp of the most recent cycle (scoped to the requested workstream if filtered).
last_cycle_statestring | nullStatus of the most recent cycle (scoped to the requested workstream if filtered).
latest_cycle_launch_idstring (uuid) | nullThe most recent cycle_launch (the product's Cycle - one launch of a plan) for this job_definition, so list consumers (the shell rail 'Running cycles', the @ 'cycle' picker, the TopicLivePage cycle mention) can link the plan's latest cycle directly. Card 'Every link the app emits uses the cycle's own address': emitting the plan's job id in the cycle slot redirected to the WorkPlan, not the cycle. Null when the plan has no cycle_launch yet.
latest_cycle_launch_permakeystring | nullThe permakey of the most recent cycle_launch - the canonical CYCLE address (/workstreams/{ws}/cycles/{permakey}). List consumers link THIS (not the plan's job permakey) for the cycle slot. Card 'Every link the app emits uses the cycle's own address'.
latest_cycle_launch_workstream_idstring (uuid) | nullThe workstream id of the most recent cycle_launch - the parent WorkStream for the nested cycle URL. Null when the launch has none (should not happen; cycle_launch.workstream_id is NOT NULL).
latest_cycle_launch_workstream_permakeystring | nullThe workstream permakey of the most recent cycle_launch - the canonical WorkStream segment for the nested cycle URL, so a list consumer can build /workstreams/{ws_permakey}/cycles/{launch_permakey} without a second fetch.
run_modeWorkplanRunModeThe 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
autonomy_configAutonomyConfig | nullFine-grained autonomy controls from default_context.autonomy_config, or null if unset.
cohortWorkplanCohortStructural 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