retention

Set the retention policy (org admins; a partial body patches)

Set what Autoresearch retains about this organization's workloads (org admins only, audited). A PARTIAL call PATCHES: a field you omit keeps its current value, so turning one capture off never silently re-enables another. Pass zero: true for zero data retention - every optional capture off in one call. The switches are command_output, command_history, declared_results, logs, traces and job_objects_at_end; command_content_days (1-365) is how long output and command lines survive; snapshot_default_days (1-365, 0 clears) stamps an expiry on NEW snapshots. Turning a capture off stops it immediately AND PURGES what it already holds (an hourly sweep drains history), and turning one back ON RECOVERS NOTHING - new content was never written and old content is gone. Each switch costs a product surface (get_command's output, mission receipts, query_logs, the Commands tab); call get_retention first and tell the human what they lose before you call this.

patch/preview/retention

Request

  • Base URL: https://autoresearch.sfcompute.com
  • URL: https://autoresearch.sfcompute.com/preview/retention
  • Auth: HTTP bearer

Query parameters

workspacestring

Act in this workspace (its slug). Omitted: the token's bound workspace, then the organization's default. Never ambient - there is no switch-workspace mutation on this door.

Request body

command_content_daysinteger nullable

How many days command output and command lines survive before the sweep nulls them, 1-365. Applies to every org; the default is 90.

command_historyboolean nullable

Keep the command line itself. Off empties the mission Commands tab and leaves support unable to see what an agent ran.

command_outputboolean nullable

Keep the last 8 KiB of a command's output after it exits. Off means get_command returns no output once the command ends.

declared_resultsboolean nullable

Keep the result an agent declares with finish_mission or a command's declared result. Off means mission receipts carry no answer - the largest product loss of the six.

job_objects_at_endboolean nullable

Delete a job's own log, artifact, preview and sample objects when the job reaches a terminal state, instead of keeping them 30 days. Uploaded contexts are never purged this way - they are shared across jobs and have their own delete_context door.

logsboolean nullable

Ship command logs to the log store. Off means query_logs and the mission Logs tab return nothing, and log ingest stops billing. Logs still stream to the node's own encrypted volume.

logs_retention_daysinteger nullable

How many days the logs plane keeps this org's logs, 1-365 (0 returns it to the platform window of 31 days). Bounded by the org's logs_retention_days limit. Unlike the capture switches this is not immediate: the plane applies it on its next compaction, and shortening it deletes logs already stored.

orgstring nullable

Organization: an org uuid or an org name from list_team's memberships; omitted = your active org.

snapshot_default_daysinteger nullable

An expiry stamped on NEW node and sandbox snapshots, 1-365 days. 0 clears it. An expiry named per snapshot always wins, and existing snapshots keep the expiry they were created with.

tracesboolean nullable

Accept OTLP spans from your workloads. Off means search_traces and get_trace return nothing for your own spans; platform lifecycle spans are unaffected.

traces_retention_daysinteger nullable

The same for traces, whose platform window is 14 days.

zeroboolean nullable

Turn every optional capture off in one call - zero data retention. Applied first, so a field you also pass still wins.

Response

The capability's JSON result.

objectstring

The resource type, when the result is one resource.

Changes

No recorded changes to this operation across all 1 revision of this API.