[MGNLSYNC-49] DOC: Synchronization module changes for 1.9 Created: 25/Jun/20  Updated: 29/Mar/22  Resolved: 15/Jul/20

Status: Closed
Project: Magnolia Synchronization Module
Component/s: None
Affects Version/s: 1.9
Fix Version/s: 1.9

Type: Task Priority: Neutral
Reporter: Federico Grilli Assignee: Richard Gange
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2020-07-06 at 15.38.40.png    
Issue Links:
documentation
documents MGNLSYNC-43 Finalize support for invoking synchro... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Team: Nucleus

 Description   
GET .rest/synchronization/v1/reset //Resets and flushes all synchronizations
GET .rest/synchronization/v1/status/ {syncId}
//Returns the status of a synchronization request

POST .rest/synchronization/v1/trigger //Starts a synchronization of content on a Magnolia public instance
JSON body of the request (in the current documentation these are request params, now part of the request body instead): "template" and "url" are mutually exclusive params, you can choose either but not both. 
{
   "workspace": "website" //target workspace
   "path" : "/", //target path
   "template" : "receiverName" //receiver template configured under synchronization module config (can be added via module config decoration)
    "url" : "http://localhost:8080/magnoliaPublic" //target URL
   "fromPath" : "/", 
   "fromDate" : "2012-03-29T10:05:45-06:00"}
   ... (all params in the current documentation)
}

To be clarified (ask Roman or Mika): what's the difference between path and fromPath?

Also a nice request example (copy/pasteable), courtesy of Roman

curl -u superuser:superuser http://localhost:8080/magnoliaAuthor/.rest/synchronization/v1/trigger --data '
{"url" : "http://localhost:8080/magnoliaPublic", "workspace": "website", "fromPath" : "/", "fromDate" : "2012-03-29T10:05:45-06:00"}
' --header "Content-Type: application/json"

There also are some known issues upon updating in case a 1.9 beta version is installed

2020-06-25 15:10:19,851 WARN  agnolia.transformer.ClassPropertyBasedTypeResolver: Encountered the 'class' property but failed to resolved the type from its value: [info.magnolia.synchronization.commands.RestSynchronizationCommand]

This is harmless and the following node will have to be removed manually from the JCR configuration

/modules/synchronization-rest/commands

Due to the fact that update/install tasks are not run from beta to final versions, the following configuration will have to be created manually

Also, in case 1.9-beta3 is installed, the following node will have to be removed from JCR configuration

/modules/synchronization-core/commands/synchronization/synchronize/synchronizationSenderClass


 Comments   
Comment by Richard Gange [ 26/Jun/20 ]

It would really be helpful if we could add some sample cURL calls to the documentation. Using the travel demo like we do here would be great.

I really don't think this synchronizeWith is a 100% clear. We should show how to use the template.

Specifies a receiver template configured in the module configuration.

Generated at Mon Feb 12 07:39:22 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.