Skip to main content

Branches and versions

A branch is a workspace in the API. Drafts and versions share the /versions/:id routes.

RouteWhat it does
GET /documents/:id/workspacesA document's branches
POST /documents/:id/workspacesBranch: { name, fromVersionId, description? }
GET /workspaces/:id, PATCH /workspaces/:idRead, rename
POST /workspaces/:id/archive, /unarchive, DELETE /workspaces/:idArchive, bring back, delete one without versions of its own
POST /workspaces/:id/versionsMake a version of the draft: { name?, comment? }
POST /workspaces/:id/take-overBring a version into this draft: { versionId, force? }. 409 lists what would be lost unless force
POST /workspaces/:id/restorePut a version back into this draft: { versionId }
POST /workspaces/:id/checkout, /checkin, /checkout/heartbeatReserve, give back, keep reserved
GET /versions/:id, PATCH /versions/:idA draft or version; name and comment
POST /versions/:id/releaseRelease: { comment? }. Answers with the revision
GET /documents/:id/revisions, GET /revisions/:id, PATCH /revisions/:idRevisions and their comment
POST /revisions/:id/obsoleteMake it obsolete
DELETE /revisions/:idTake a release back (administrators)
GET /documents/:id/version-graphEverything the history graph draws
GET /versions/:id/audit, GET /revisions/:id/auditTheir audit log