Release workflow¶
Drafts and published data live side by side. Your work in progress never reaches consumers until someone releases it.
stateDiagram-v2
[*] --> UNRELEASED: create
UNRELEASED --> RELEASED: release
RELEASED --> HAS_CHANGED: update the draft
HAS_CHANGED --> RELEASED: release again
RELEASED --> UNRELEASED: unrelease
HAS_CHANGED --> UNRELEASED: unrelease
UNRELEASED --> [*]: delete
| Status | Meaning |
|---|---|
UNRELEASED |
Exists only as a draft |
RELEASED |
The published version equals the draft |
HAS_CHANGED |
Published, but the draft has newer changes |
Release and unrelease¶
| Action | Request | Permission |
|---|---|---|
| Publish or re-publish | PUT /v4/instances/{id}/release |
RELEASE |
| Retract | DELETE /v4/instances/{id}/release |
UNRELEASE |
A released instance is a snapshot of the draft at the moment of release.
Links in the released stage only connect to instances which are released themselves. A link to an unreleased target stays unresolved in that stage until the target is released. Consumers of the released data therefore never see references into drafts.
Automatic release
A space with autoRelease publishes each change right away.
Released instances are protected: to move or
delete them, unrelease them first (or use forceUnrelease when deleting).
Check the status¶
A dataset is rarely ready on its own. Before releasing it, you may want to know whether the things around it are released as well. The status endpoint can answer for a whole scope:
releaseTreeScope |
What is considered |
|---|---|
TOP_INSTANCE_ONLY |
The instance itself |
CHILDREN_ONLY |
The instances in the scopes of the type, without the instance itself |
CHILDREN_ONLY_RESTRICTED |
The same, but only the instances you can read |
The aggregated status is the worst one found: UNRELEASED before HAS_CHANGED before RELEASED.
By default all the scopes of the type are combined. Pass scope=<name> to use a single one.
For several instances at once, post a list of UUIDs to POST /v4/instancesByIds/release/status with the same
parameters.
To add the status of the instance itself to regular responses, use
returnReleaseStatus.