draft

list every draft the current user has in this workspace, across all kinds

Changed on
get/w/{workspace}/drafts/list

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/w/{workspace}/drafts/list
  • Auth: one of:
    • HTTP bearer
    • API key in cookie token

Path parameters

workspacestring required

Query parameters

all_usersboolean

List every draft in the workspace (all users), not just the current user's own + legacy rows. Other users' rows come back with mine=false (view-only).

compare_to_workspacestring

A fork passes its parent workspace id here to have each row flagged with unchanged_from_parent. Ignored unless it is exactly this workspace's parent.

Response

the user's drafts

kind'script' | 'flow' | 'app' | 'raw_app' | 'resource' | 'variable' | 'trigger_schedule' | 'trigger_webhook' | 'trigger_default_email' | 'trigger_email' | 'trigger_http' | 'trigger_websocket' | 'trigger_postgres' | 'trigger_kafka' | 'trigger_nats' | 'trigger_mqtt' | 'trigger_amqp' | 'trigger_sqs' | 'trigger_gcp' | 'trigger_azure' | 'trigger_poll' | 'trigger_cli' | 'trigger_nextcloud' | 'trigger_google' | 'trigger_github' | 'data_pipeline' required

Closed set of item kinds a user can autosave as a draft. Mirrors the Postgres DRAFT_KIND enum and the backend UserDraftItemKind.

pathstring required
summarystring

Best-effort, read from the draft JSON's summary field when the editor shape carries one.

draft_pathstring

User-typed friendly path from the draft JSON's draft_path, when set and different from the storage path (e.g. a never-deployed item parked at u/{user}/draft_{uuid}).

draft_onlyboolean required

No deployed counterpart exists at this path — the draft is the whole item.

legacy_draftboolean required

The listed draft is a legacy workspace-level row (email NULL) predating the per-user drafts migration. Only true when no per-user draft exists at this path.

created_atstring date-time required
can_writeboolean required

Whether the current user may deploy/discard this draft (same check the deploy/discard endpoints enforce).

mineboolean required

The row belongs to the current user (own draft or the legacy no-owner row) and is therefore actionable. Always true in the default listing; with all_users=true, other users' rows are false (view-only).

unchanged_from_parentboolean

Only present when compare_to_workspace was passed. True when this draft is identical to the parent's draft at the same path/kind/owner (cloned in on fork and never edited here).

Changes

    • warning

      added the new trigger_amqp enum value to the / response property for the response status

    • info

      added the new optional query request parameter compare_to_workspace

    • info

      added the optional property / to the response with the status