...
By default, versioning is disabled for all nodes. In order to enable version-related operations for a node, you must first add When you make a request to create a version, the mix:versionable
mixin .To enable versioning for a single node using the REST APIis added to that node automatically.
This mixin can also be added manually using SPARQL Update:
Code Block | ||||
---|---|---|---|---|
| ||||
echo "insert data { <> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.jcp.org/jcr/mix/1.0versionable> . }" \ | curl -X PATCH --upload-file - http://localhost:8080/rest/path/to/object |
...
If you wish to restore an object to a previous version you may do so using the REST API, or even the HTML view. In the HTML view of a historic version, a button exists on the right hand side saying "Revert to this Version" that when clicked restores the object (and possibly the subgraph) to the version viewed.
Info |
---|
Regardless of your auto-versioning settings immediately Immediately before restoring an old version, a version snapshot is made to reflect the current state of the object. |