There are four main document statuses:
Mozaik supports document versioning, and a document version can have the following statuses:
When querying documents through the API it will return only the documents with Published status by default.
A new document version is created every time a Published document is modified. However when a document version is in Draft or Timed status the content will be overwritten on update.
Mozaik always keeps the full edit history. Although the content of a document version in Draft or Timed status is overwritten on update, the previous versions are still saved.
Since Mozaik supports document versioning, it comes with a simple publishing workflow as well. There are eight operations for documents:
When a new document is created it gets into Draft status. A document cannot be created and published at the same time. Saving updates to a draft document updates that version, but all edit history is kept for every version.
When a document is in draft status it can be either scheduled for publishing (when this happens the document status is changed to Timed) or publish immediately (document status is changed to Published).
Saving changes to a published document doesn't effect the live content of your document but creates a new document version in Draft status. If you are happy with your changes you can simply publish the new version.
A document can be unpublished. It changes the document status to draft, and it won't be returned in the document queries.
Documents cannot be deleted at the moment, but they can be archived. When a document is in Archived status, it is not returned in the document queries. All versions and edit history are kept.
An archived document can be unarchived. When it happens the main document status becomes Published if there was a Published version at any point in time, and becomes Draft if there was none.
If a document is in Published status and the latest version is Published too, it can be reverted to the previous published version. When it happens the current version becomes a draft and the previous version becomes the live version again.