NameComposum Platform Staging Servlet
Path/bin/cpm/platform/staging
SuffixPath to release root
SelectorreplicationState Extensionjson MethodGET OperationReplication State
Examples
-
In this example there are two remote replications configured at the paths given as id. The second one is enabled and was recently run (this data is not persistent). All timestamps are Unix timestamps in milliseconds.http://localhost:9090/bin/cpm/platform/staging.replicationState.json/content/composum/prototype/assets/pagesintegration
{ "status": 200, "success": true, "warning": false, "data": { "replicationStates": { "/conf/content/composum/prototype/assets/pagesintegration/replication/launch2fullsite": { "id": "/conf/content/composum/prototype/assets/pagesintegration/rep lication/launch2fullsite", "name": "2nd local server", "description": "Replication to a second local server at port 9100.", "state": "idle", "messages": [], "enabled": false }, "/conf/content/composum/prototype/assets/pagesintegration/replication/localfullsite": { "id": "/conf/content/composum/prototype/assets/pagesintegration/replication/localfullsite", "name": "same server", "description": "For debugging - replication to the testserver itself at 9090 with a debugging root.", "state": "success", "startedAt": 1579260024881, "finishedAt": 1579260025129, "messages": [ { "level": "info", "text": "Replication done for upd-CtAWlOiwBtjS", "timestamp": 1579260025129 } ], "isSynchronized": true, "enabled": true, "lastReplicationTimestamp": 1579260025089 } } } }
SelectoraggregatedReplicationState Extensionjson MethodGET OperationAggregated Replication State
Examples
-
"everythingIsSynchronized" means all remote repositories are at the same release change number. There are currently no replications running, and none of the replication processes show errors.http://localhost:9090/bin/cpm/platform/staging.aggregatedReplicationState.json/content/composum/prototype/assets/pagesintegration
{ "status": 200, "success": true, "warning": false, "data": { "aggregatedReplicationState": { "result": { "everythingIsSynchronized": true, "replicationsAreRunning": false, "haveErrors": false, "numberEnabledProcesses": 1 } } } }
SelectorcompareTree Extensionjson MethodPOST OperationCompare remote content
Parameters
-
processId
If given, we do the compare operation only for the release change process with the given id. Can be given multiple times. -
details
Numeric detail level. If 0, only difference counts are returned. If 1, the paths for the different nodes are returned, too. Normally these are not returned since there might be a large number of differences.
Examples
-
http://localhost:9090/bin/cpm/platform/staging.compareContent.json/content/composum/prototype/assets/pagesintegration?details=true
Compares the content of the replicated release from /content/composum/prototype/assets/pagesintegration to the remote content. As requested with parameter details, the response gives full details, including the different paths.
The node below compareTree is named as the ID of the replication configuration - if there are several, there can be several results.
{ "status": 200, "success": true, "warning": false, "data": { "compareTree": { "/conf/content/composum/prototype/assets/pagesintegration/replication/localfullsite": { "equal": false, "releaseChangeNumbersEqual": false, "differentVersionablesCount": 3, "changedParentNodeCount": 3, "changedChildrenOrderCount": 1, "differentVersionables": [ "/content/composum/prototype/assets/pagesintegration/home/jcr:content", "/content/composum/prototype/assets/pagesintegration/home/noassets/jcr:content", "/content/composum/prototype/assets/pagesintegration/home/test/jcr:content" ], "changedParentNodes": [ "/content/composum/prototype/assets/pagesintegration/home", "/content/composum/prototype/assets/pagesintegration/home/noassets", "/content/composum/prototype/assets/pagesintegration/meta/search" ], "changedChildrenOrders": [ "/content/composum/prototype/assets/pagesintegration/home" ] } } } }
NameRemote replication receiver servlet
Path/bin/cpm/platform/replication/publishreceiver
Suffixa path into a site or a path to the site's top directory
Selectorcontentstate Extensionjson MethodGET OperationGet the content state
Parameters
-
path
The path(s) for which we return information about the present versionables.
Examples
-
http://localhost:9100/bin/cpm/platform/replication/publishreceiver.contentstate.json? path=/content/composum/prototype/assets/pagesintegration/home
Retrieves the versions of the versionables in the release as it is replicated at /content/composum/prototype/assets/pagesintegration/home .
{ "versionables": [ { "path": "/content/composum/prototype/assets/pagesintegration/home/test/jcr:content", "version": "1f18eb90-f3ba-47c2-8307-f4ce93b1beb9" }, { "path": "/content/composum/prototype/assets/pagesintegration/home/noassets/jcr:content", "version": "08146707-1bbf-45f8-ab61-7b04e58edb6f" } ], "status": 200, "success": true, "warning": false }
Selectorstartupdate Extensionjson MethodPOST OperationStart a content update
Parameters
-
releaseRoot
The root of the release containing the path. -
srcPath
Optionally, the path of the content that is actually replicated - can be releaseRoot or a subpath. Default: releasRoot.
-
targetPath
Optionally, the path where the content below srcPath is placed - if different than srcPath this will imply reference transformation. Default: releaseRoot
Examples
-
http://localhost:9100/bin/cpm/platform/replication/publishreceiver.startupdate.json/content/composum/prototype/assets/pagesintegration/home
A new temporary directory with the id upd-vicgwNl6NbG6 was created. The release change number and the timestamp of the last replication (Unix timestamp in milliseconds) of the synchronized content are also included.
{ "updateInfo": { "updateId": "upd-vicgwNl6NbG6", "originalPublisherReleaseChangeId": "chg9000483602364128923", "lastReplication": 1579260025089 }, "status": 200, "success": true, "warning": false }
Selectorcomparecontent Extensionjson MethodPUT OperationCompare remote content
Parameters
-
updateid
The update id returned by the startupdate operation.
Examples
-
Returned are the paths that are different - either because they are not present correspond to a different version.http://localhost:9090/bin/cpm/platform/replication/publishreceiver.comparecontent.json/content/composum/prototype/assets/pagesintegration/home [ { "path": "/content/composum/prototype/assets/pagesintegration/home/test/jcr:content", "version": "1f18eb90-f3ba-47c2-8307-f4ce93b1beb9" }, { "path": "/content/composum/prototype/assets/pagesintegration/home/noassets/jcr:content", "version": "08146707-1bbf-45f8-ab61-7b04e58edb6f" } ]
{ "status": 200, "success": true, "warning": false, "data": { "data": { "path": [ "/content/composum/prototype/assets/pagesintegration/home/jcr:content" ] } } }
Selectorpathupload Extensionjson MethodPUT OperationUploads a package for one path
Parameters
-
updateid
The update id returned by the startupdate operation. -
(request)
The request contains a content package containing the data from the path.
Examples
-
http://localhost:9090/bin/cpm/platform/replication/publishreceiver.pathupload.zip/content/composum/prototype/assets/pagesintegration/home/jcr:content? updateId=upd-MhGbZhJtuWGv
Unpacks the package with one versionable which transmitted in the request input stream to the temporary directory identified by the updateId. The suffix is the path to the versionable.
{"status":200,"success":true,"warning":false}
Selectorcommitupdate Extensionjson MethodPOST OperationFinishes and commits the content update
Parameters
-
updateid
The update id created in the startreplacement operation. -
deletedpath
A path that is to be deleted from the content. Can occur multiple times.
Examples
-
The deletedpath(s) are deleted, the uploaded versionables are moved from the temporary directory into the release root and the child orderings are changed to the given child orderings: for each path with orderable children the childNames in their JCR order are transmitted.http://localhost:9100/bin/cpm/platform/replication/publishreceiver.commitupdate.json { "updateId": "upd-MhGbZhJtuWGv", "releaseChangeNumber": "chg8900357471976124478", "deletedpath": [ "/content/composum/prototype/assets/pagesintegration/home/jcr:content" ], "childOrderings": [ { "path": "/content/composum/prototype/assets/pagesintegration", "childNames": [ "releasedassets", "jcr:content", "home", "meta" ] }, { "path": "/content/composum/prototype/assets/pagesintegration/home", "childNames": [ "test", "noassets" ] } ] }
{"status":200,"success":true,"warning":false}
Selectorabortupdate Extensionjson MethodPOST OperationAbort the update
Parameters
-
updateid
The updateid created in the startupdate operation.
Examples
-
http://localhost:9100/bin/cpm/platform/replication/publishreceiver.abortupdate.json? updateId=upd-MhGbZhJtuWGv
{"status":200,"success":true,"warning":false}
Selectorreleaseinfo Extensionjson MethodGET OperationGet information about release state
Examples
-
https://localhost:9100/bin/cpm/platform/replication/publishreceiver.releaseinfo.json/content/composum/prototype/assets/pagesintegration
The example says that the path /content/composum/prototype/assets/pagesintegration contains the release with the release change number chg9000483602364128923 , which was last replicated at Unix timestamp 1579260025089 (milliseconds).
{ "updateInfo": { "originalPublisherReleaseChangeId": "chg9000483602364128923", "lastReplication": 1579260025089 }, "status": 200, "success": true, "warning": false }