Menu
Retention rules, Trash toggle, and conflicts·View as Markdown
Automations & Trash
Base: /workspaces/{workspaceId}
List automations
GET .../automations?conflicts=1 · automations:read
Returns { trashEnabled, automations, conflicts }. Seeds default Trash retention when missing.
Create
POST .../automations · automations:write
{
"kind": "custom",
"name": "Videos short TTL",
"scope": { "bucketIds": ["..."] },
"priority": 10,
"rules": [
{
"kind": "trash_ttl",
"sortOrder": 0,
"config": { "ttlDays": 3, "extensions": ["mp4", "mov"] }
}
]
}
Omitting name auto-names with Haiku.
Get / patch / delete
GET .../automations/{automationId}·automations:readPATCH .../automations/{automationId}·automations:write— fields + optional fullrulesreplace;enabledtoggles on/off;autoName: truerenamesDELETE .../automations/{automationId}·automations:writePOST .../automations/{automationId}/name·automations:write— Haiku renameGET .../automations/conflicts·automations:read
Trash settings
GET .../trash·automations:read→{ trashEnabled }PATCH .../trash·automations:write→{ "trashEnabled": true }
When Trash is off, destructive deletes hard-delete objects (no _trash/ copy).
Trash / move files
Under .../buckets/{bucketId}/files:
POST .../trash·files:delete—{ "keys": ["a.jpg"] }(uses Trash rules / hard-delete)POST .../move·files:write—{ "moves": [{ "fromKey", "toKey" }] }DELETE .../files/{fileId}·files:delete— same as trash for that file's key