UmweltDocs
Reference/Commands/timeline.rebase
timeline.rebasecommandsince 0.1

Replays an active draft on top of its parent’s current head.

Request
umwelt call story.umw timeline.rebase '{
  "projectId": "ball",
  "timelineId": "chapter-2"
}'
Request
const result = await client.timelineRebase({ projectId: 'ball', timelineId: 'chapter-2' });
Request
var result = engine.TimelineRebase(new TimelineRef { ProjectId = "ball", TimelineId = "chapter-2" });
Response
{
  "kind": "draft",
  "id": "chapter-2",
  "status": "active",
  "projectId": "ball",
  "label": "Chapter 2",
  "baseVersion": 16,
  "createdAt": "2026-11-11T18:21:58.6687174Z",
  "depth": 1,
  "headVersion": 17,
  "maxTick": 11,
  "parentTimelineId": "main"
}

Payload

FieldTypeDescription
projectIdrequiredstringThe project to write to.
timelineIdrequiredstringdefault "main"The timeline to write to.

Result

FieldTypeDescription
idalwaysstringThe timeline’s id. Main is always main.
projectIdalwaysstringThe project it belongs to.
kindalways"main" | "draft"main or draft.
statusalways"active" | "promoted" | "discarded"active, promoted or discarded. Only an active timeline accepts writes.
labelstringIts label.
parentTimelineIdstringThe timeline it branched from: main or another draft. Absent for main.
depthalwaysintegerDrafts from main down to it: 0 for main, 1 for a draft of main, at most 4.
baseVersionintegerThe parent’s head when it was opened. Absent for main.
headVersionalwaysintegerThe version of its latest commit, or its base when it has none.
maxTickalwaysintegerThe highest tick it sees.
createdAtalwaysstringWhen it was opened (UTC).
closedAtstringWhen it was promoted or discarded.
purgedAtstringWhen its rows were purged.

Rules

All of it or nothing. Every commit is validated and applied again with new versions. If one no longer fits, nothing changes and the error names it.

Ids stay. Commits keep their ids and attempt ids; events keep their positions on every axis; documents keep their vectors.

No meaning is resolved. If the parent and the draft now disagree, both are kept and contradictions reports it.

Errors

VALIDATION_FAILEDA commit no longer fits. details has failedAttemptId, failedEventId and cause.
NOT_FOUNDThe project or draft does not exist.
INVALID_STATEThe draft is not active, or other drafts depend on it (details.descendants).
HANDSHAKE_REQUIREDOver the protocol, hello was not sent first.

Every code is listed in Errors.

See also

Was this page helpful?