Synchronize Replica

Description

The synchronizeReplica operation is performed on a feature service resource. This operation synchronizes changes between the feature service and a client based on the replicaID provided by the client. Requires the sync capability. See Sync overview for more information on sync.

The client obtains the replicaID by first calling the createReplica operation.

Synchronize applies the client's data changes by importing them into the server's geodatabase. It then exports the changes from the server geodatabase that have taken place since the last time the client got the data from the server. Edits can be supplied in the edits parameter, or, alternatively, by using the editsUploadId and editUploadFormat to identify a file containing the edits that were previously uploaded using the upload_item operation.

The response for this operation includes the replicaID, new replica generation number, or the layer's generation numbers. The response has edits or layers according to the syncDirection/syncLayers. Presence of layers and edits in the response is indicated by the responseType.

If the responseType is esriReplicaResponseTypeEdits or esriReplicaResponseTypeEditsAndData, the result of this operation can include arrays of edit results for each layer/table edited as specified in edits. Each edit result identifies a single feature on a layer or table and indicates if the edits were successful or not. If an edit is not successful, the edit result also includes an error code and an error description.

If syncModel is perReplica and syncDirection is download or bidirectional, the synchronizeReplica operation's response will have edits. If syncDirection is snapshot, the response will have replacement data.

If syncModel is perLayer, and syncLayers have syncDirection as download or bidirectional, the response will have edits. If syncLayers have syncDirection as download or bidirectional for some layers and snapshot for some other layers, the response will have edits and data. If syncDirection for all the layers is snapshot, the response will have replacement data.

When syncModel is perReplica, the createReplica and synchronizeReplica operations' responses contain replicaServerGen. When syncModel is perLayer, the createReplica and synchronizeReplica operations' responses contain layerServerGens.

You can provide arguments to the synchronizeReplica operation as defined in the parameters table below.

New in 10.5.1

The synchronizeReplica operation supports a replicaServerSibGen parameter which is used when syncing perReplica replicas with targetType server. When syncing perLayer replicas with targetType server, the syncLayers parameter can include a serverSibGen value for each layer.

Request parameters

Parameter

Details

f

Description: The response format. The default response format is html.

Values: html | json

replicaID

Required

Description: The ID of the replica you want to synchronize.

Syntax: replicaID=<replicaID>

Example: replicaID={90F07F7B-991C-4818-B7CA-97B2BF4F7CAA}

replicaServerGen

Description: replicaServerGen is a generation number that allows the server to keep track of what changes have already been synchronized. A new replicaServerGen is sent with the response to the synchronizeReplica operation. Clients should persist this value and use it with the next synchronizeReplica call.

It applies to replicas with syncModel = perReplica.

For replicas with syncModel = perLayer, layer generation numbers are specified using parameter: syncLayers; and replicaServerSibGen is not needed.

Syntax: replicaServerGen=<replicaServerGen>

Example: replicaServerGen=2

replicaServerSibGen

Description: replicaServerSibGen is a generation number that allows the server to keep track of what changes have already been received. It is set when synchronizing where syncModel = perReplica and targetType = server. The replicaServerSibGen is updated in the replica metadata on the replica resource once the process completes successfully.

Replicas with targetType = server are designed to allow syncing between services. When syncing, the replicaServerSibGen value is derived from the replicaServerGen of the other services matching replica.

For replicas with syncModel = perLayer, layer generation numbers are specified using parameter: syncLayers; and replicaServerGen is not needed.

This value is not set for replicas where the targetType=client.

Syntax: replicaServerSibGen=<replicaServerSibGen>

Example: replicaServerSibGen=2

transportType

Description: transportType represents the response format. If the transportType is esriTransportTypeUrl, the operation's response is contained in a file, and the URL link to the file is returned. Otherwise, the JSON object is returned directly in the response. The default is esriTransportTypeUrl. Note that for asynchronous processing (async=true), or when the response is returned in sqlite (dataFormat=sqlite ), results are always returned via URL regardless of how the parameter is set.

Values: esriTransportTypeUrl | esriTransportTypeEmbedded

closeReplica

Description: If true, the replica will be unregistered when the synchronize completes. This is the same as calling synchronize and then calling unregisterReplica. Otherwise, the replica can continue to be synchronized. The default is false.

Values: true | false

returnIdsForAdds

Description: If true, the objectIDs and globalIDs of features added during the synchronize will be returned to the client in the addResults sections of the response. Otherwise, the IDs are not returned. The default is false.

Values: true | false

edits

Description: The edits the client wants to apply to the service. Alternatively, the editsUploadID and editsUploadFormat can be used to specify the edits in a delta file.

The edits are described using an array where an element in the array includes:

  • The layer or table ID
  • The feature or row edits to apply listed as inserts, updates, and deletes
  • The attachments to apply listed as inserts, updates, and deletes

For features, adds and updates are specified as feature objects that include geometry and attributes.

Deletes can be specified using globalIDs for features and attachments.

For attachments, updates and adds are specified using the following set of properties for each attachment. If embedding the attachment, set the data property; otherwise, set the url property. All other properties are required:

  • globalid—The globalID of the attachment that is to be added or updated.
  • parentGlobalid—The globalID of the feature associated with the attachment.
  • contentType—Describes the file type of the attachment (for example, image/jpeg).
  • name—The file name (for example, hydrant.jpg).
  • data—The base 64 encoded data if embedding the data. Only required if the attachment is embedded.
  • url—The location where the service will upload the attachment file (for example, http://machinename/arcgisuploads/Hydrant.jpg). Only required if the attachment is not embedded.

Syntax:

[
	{ 
	"id" : <layerId1>,
	"features" : {
		"adds" : [<feature1>, <feature2>],
		"updates" : [<feature1>, <feature2>],
		"deleteIds" : [<globalID1>, <globalID2>]},
	"attachments" : {
		"adds" : [ <attachment1>, <attachment2> ],
		"updates" : [ <attachment1>, <attachment2> ],
		"deleteIds" : [ <attachment1>, <attachment2> ]},
	},
	{ 
	"id" : <layerId2>,
	"features" : {
		"adds" : [<feature1>, <feature2>],
		"updates" : [<feature1>, <feature2>],
		"deleteIds" : [<globalID1>, <globalID2>]},
	"attachments" : {
		"adds" : [<attachment1>, <attachment2> ],
		"updates" : [<attachment1>, <attachment2> ],
		"deleteIds" : [ <globalID1>, <globalID2> ]},
	}
]

Example:

[
    {"id" : 1,
    "features" : { 
     "adds" : [ 
    {
      "geometry" : 
	      {
        "x" : -178.24479999999991,
        "y" : 50.012500000000045
       },
      "attributes" : 
	      {
	       "globalID" :"{8991B712-D26F-407d-9116-06B0CEF0F010}",
        "datetime" : 1272210710000,
        "depth" : 31.100000000000001,
        "eqid" : "2010vma5",
        "latitude" : 50.012500000000003,
        "longitude" : -178.2448,
        "magnitude" : 4.7999999999999998,
        "numstations" : 112,
        "region" : "Andreanof Islands, Aleutian Islands, Alaska",
        "source" : "us",
        "version" : "Q"
       }
    }
   ],
     "updates" : [
    {
      "geometry" : 
	     {
        "x" : -178.24479999999991,
        "y" : 50.012500000000045
      },
      "attributes" : 
	  {
	       "globalID" :"{59229CA9-4DF2-4d4d-B6A3-5504D08C1F7A}",
        "datetime" : 1272210710000,
        "depth" : 31.100000000000001,
        "eqid" : "2010vma5",
        "latitude" : 50.012500000000003,
        "longitude" : -178.2448,
        "magnitude" : 4.7999999999999998,
        "numstations" : 112,
        "region" : "Andreanof Islands, Aleutian Islands, Alaska",
        "source" : "us",
        "version" : "Q"
      }
    }    
	],
    "deleteIds" : [
	       "{AAB7CD51-AA70-4a99-B3F6-E71E5D356758}",
	       "{47EC4FF1-C748-456b-B9DF-AC9F32A9EDBC}"
     ]
    },  
    "attachments" : { 
     "adds" : [ 
	{
  	     "globalId" : "{6CD00D29-F37E-4e77-9C74-361B719A42DB}",
	       "parentGlobalId":"{8991B712-D26F-407d-9116-06B0CEF0F010}",// feature's id
	       "contentType":"image/pjpeg"
	       "name:"Hydrant101.jpg"
	       "url:"http://machinename/arcgisuploads/Hydrant101.jpg"
	}
     ],
     "updates" : [ 
	{
	       "globalId" : "{934D1E05-BC1D-4d45-961A-4892C8C65135}",
	       "contentType":"image/pjpeg"
	       "name:"Hydrant202.jpg"
	       "url:"http://machinename/arcgisuploads/Hydrant202.jpg"
	}
     ],
    "deleteIds" : [
	  "{3048BF42-425B-48f4-8C2B-E3797EF9C64C}",
	  "{6E562021-B13F-4915-9218-3D93B483F8DA}"
     ]
    } //end of attachments
  }, //end of layer 1 data
  {
    "id" :5,
    "features" : {
     "adds" : [
    {
      "geometry" : {
        "x" : 242.24556961400003,
        "y" : 34.260686249000059
      },
      "attributes" : {
	       "globalId" : "{50EBEDE7-8C9B-4bb5-95B5-1C78B8A90D76}",
        "type" : 0,
        "description" : "California Fire Department"
      }
    },
    {
      "geometry" : {
        "x" : 242.44111296000005,
        "y" : 34.266616200000044
      },
      "attributes" : {
	       "globalId" : "{022265BD-5153-4b59-B62D-27D3C051528D}",
        "type" : 6,
        "description" : "San Gorgonio mountain"
      }
    }
  ],
     "updates" : [
    {
      "geometry" : {
        "x" : 242.21472194300009,
        "y" : 34.33949752500007
      },
      "attributes" : {
	       "globalId" : "{14CAFE0D-A9E0-4467-9905-06DC31E9C76B}",
        "type" : 1,
        "description" : "100 bed shelter."
      }
    },
    {
      "geometry" : {
        "x" : 242.17137744600006,
        "y" : 34.259303879000072
      },
      "attributes" : {
	       "globalId" : "{89682769-E960-4a07-BC57-19634AAD7638}",
        "type" : 5,
        "description" : "gutted ranger station"
      }
    }
  ],
    "deleteIds" : [ 
	  "{0AA0E51C-0B3D-45b8-92EE-7E5E4329BF03}",
	  "{DE708C1C-ACAF-4a75-8815-1BE35B06CC38}"
     ]
    } //end of features
  } //end of layer 2 data
] //end of layers

returnAttachmentDatabyURL

Description: If true, a reference to a URL will be provided for each attachment returned from synchronizeReplica. Otherwise, attachments are embedded in the response. The default is true.

Applies only if attachments are included in the replica.

Values: true | false

async

Description: If true, the request is processed as an asynchronous job and a URL is returned that a client can visit to check the status of the job. See the topic on asynchronous usage for more information. The default is false.

Values: true | false

syncDirection

Description: Determines whether to upload, download, or upload and download on sync. By default, a replica is synchronized bi-directionally. Only applicable when syncModel = perReplica. If syncModel = perLayer, sync direction is specified using syncLayers .

Values: download | upload | bidirectional | snapshot

  • download—The changes that have taken place on the server since last download are returned. Client does not need to send any changes. If the changes are sent, service will ignore them.
  • upload—The changes submitted in the edits or editsUploadID/editsUploadFormatt parameters are applied, and no changes are downloaded from the server.
  • bidirectional—The changes submitted in the edits or editsUploadID/editsUploadFormat parameters are applied, and changes on the server are downloaded. This is the default value.
  • snapshot—The current state of the features is downloaded from the server. If any edits are specified, they will be ignored.

Example: syncDirection = download

syncLayers

Description: syncLayers allows a client to specify layer-level generation numbers for a sync operation. It can also be used to specify sync directions at layer-level. This parameter is needed for replicas with syncModel = perLayer. It is ignored for replicas with syncModel = perReplica.

serverGen is required for layers with syncDirection = bidirectional or download.

serverSibGen is needed only for replicas where the targetType = server. For replicas with syncModel = perLayer, the serverSibGen serves the same purpose at the layer level as the replicaServerSibGen does in the case of syncModel = perReplica. See the replicaServerSibGen parameter for more information.

If a sync operation has both the syncDirection and syncLayersparameters, and the replica's syncModel is perLayer, the layers that do not have syncDirection values will use the value of the syncDirection parameter. If the syncDirection parameter is not specified, the default value of bidirectional is used.

Values: download | upload | bidirectional | snapshot

Syntax:

"syncLayers": [{"id": <layerId1>, "serverGen": <genNum1>, "serverSibGen": <sibGenNum1"syncDirection": "syncDirection1"}, {"id": <layerId2>,  "serverGen": <genNum2>, "serverSibGen": <sibGenNum2>, "syncDirection": "syncDirection2"}]

Example:

"syncLayers":[{"id": 0, "serverGen": 1000, "syncDirection": "download"}, {"id": 1, "serverGen": 1100, "syncDirection": "upload"}, {"id": 2, "serverGen": 1200, "syncDirection": "bidirectional"}, {"id": 3, "syncDirection": "snapshot"}]

editsUploadID

Description: The ID for the uploaded item that contains the edits the client wants to apply to the service. Used in conjunction with editsUploadFormat.

edits

Example: editsUploadID={300B4F9C-FAD6-4af3-88FD-DE77621FAFDD}

editsUploadFormat

Description: The data format of the uploaded data reference in editsUploadId .

NoteNote:
editsUploadFormat must reflect the data format of the uploaded item.

Values: sqlite

dataFormat

Description: The data format for the returned data.

NoteNote:
When the format is sqlite, a delta mobile geodatabase is returned which can be used in ArcGIS runtime applications.

Values: json | sqlite

rollbackOnFailure

Description: Determines the behavior when there are errors while importing edits on the server during synchronization. This only applies in cases where edits are being uploaded to the server (syncDirection = upload or bidirectional). See the RollbackOnFailure and Sync Models topic for more details.

When true, if an error occurs while importing edits on the server, all edits are rolled back (not applied), and the operation returns an error in the response. Use this setting when the edits are such that you will either want all or none applied.

When false, if an error occurs while importing an edit on the server, the import process skips the edit and continues. All edits that were skipped are returned in the edits results with information describing why the edits were skipped.

syncCapabilitiessynchronizeReplicarollbackOnFailure

If the supportsRollbackOnFailure property is true, you can set the rollbackOnFailure parameter to true or false.

If the supportsRollbackOnFailure property is false, the synchronizeReplica operation does not support the parameter.

When supportsRollbackOnFailure is false and only a perLayer sync model is supported ("supportsPerLayerSync": true and supportsPerReplicaSync": false), synchronizeReplica always applies the rollbackOnFailure = false behavior above.

When supportsRollbackOnFailure is false and only a perReplica sync model is supported ("supportsPerLayerSync": false and supportsPerReplicaSync": true), synchronizeReplica always applies the rollbackOnFailure = true behavior above.

Values: true | false

JSON request syntax

{  
  "replicaID": "<replicaID>", //unique value that identifies the replica/server
  "replicaServerGen": "<serverGen>", //not needed if modelType is perLayer 
  "transportType": "<esriTransportTypeUrl | esriTransportTypeEmbedded>",
  "closeReplica": "<false | true>",
  "returnIdsForAdds": "<false | true>",
  "edits": [
    {
        "id": <layerId1>,
        "features": {
            "adds": [<feature1>, <feature2>],
            "updates": [<feature1>, <feature2>],
            "deleteIds": [<globalId1>, <globalId2>]
        },
        "attachments": {
            "adds": [<attachment1>, <attachment2>],
            "updates": [<attachment1>, <attachment2>],
            "deleteIds": [<globalId1>, <globalId2>]
        }
      },
    {
        "id": <layerId2>,
        "features": {
            "adds": [<feature1>, <feature2>],
            "updates": [<feature1>, <feature2>],
            "deleteIds": [<globalId1>, <globalId2>]
        },
        "attachments": {
            "adds": [<attachment1>, <attachment2>],
            "updates": [<attachment1>, <attachment2>],
            "deleteIds": [<globalId1>, <globalId2>]
        }
      }
    ]
  "returnAttachmentsDataByUrl": "<true | false>",
  "async": "<false | true>",
  "syncDirection": "<bidirectional | upload | download | snapshot>",
  "syncLayers": [
    {"id": <layerId1>, "serverGen": <genNum1>,  "syncDirection": "syncDirection1"}, 
    {"id": <layerId2>, "serverGen": <genNum2>, "syncDirection": "syncDirection2"}],
  "editsUploadId": "<syncRequestUploadId>",  
  "editsUploadFormat"= "<sqlite>",
  "rollbackOnFailure": "<false | true>",
  "dataFormat"= "<json | sqlite>",
  "f"= "<json | html>"
}

JSON request example (edits provided in uploaded file, and dataFormat=sqlite)

{  
  "replicaID": "{b7b70c50-7b8d-4938-a6f9-61f376e94c75}",
  "replicaServerGen": 5, //empty if modelType is perLayer 
  "replicaServerSibGen": 10, //empty if modelType is perLayer 
  "transportType": "esriTransportTypeURL",
  "closeReplica": false,
  "returnIdsForAdds": false,
  "edits": []
  "returnAttachmentsDataByUrl": true,
  "syncDirection": bidirectional,
  "async": true,
  "syncLayers":[]
  "editsUploadId": "{300B4F9C-FAD6-4af3-88FD-DE77621FAFDD}",  
  "editsUploadFormat": "sqlite",
  "dataFormat"= "sqlite" 
  "rollbackOnFailure": true,
  "f"=json
}

JSON request example (edits in JSON, and dataFormat=json)

{  
  "replicaID": "{b7b70c50-7b8d-4938-a6f9-61f376e94c75}",
  "replicaServerGen": , //empty if modelType is perLayer 
  "transportType": "esriTransportTypeEmbedded",
  "closeReplica": false,
  "returnIdsForAdds": false,
  "edits": [
    {
        "id": 0,
        "features": {
            "adds": [
                {
                    "geometry": {
                        "x": -120.739,
                        "y": 35.166
                    },
                    "attributes": {
                        "Type": 2,
                        "Confirmed": 0,
                        "Comments": "",
                        "Submitted": 1298911207000,
                        "GlobalID": "72e499ac-8bff-42e8-9897-12f121898565"
                    }
                }
            ],
            "updates": [
                {
                    "geometry": {
                        "x": -120.54,
                        "y": 35.11
                    },
                    "attributes": {
                        "Type": 2,
                        "Confirmed": 0,
                        "Comments": "",
                        "Submitted": 1298911207300,
                        "GlobalID": "a699a609-8cbd-4a18-a363-42ac87e75e19"
                    }
                }
            ],
            "deleteIds": [
                "{ed8e7ee8-4a91-4d5e-8bed-9f609c66387b}"
            ]
        },
        "attachments": {
            "adds": [
                {
                    "globalId": "AD5C23B6-27CD-4501-9A0D-C5C8DB774A38",
                    "parentGlobalId": "a699a609-8cbd-4a18-a363-42ac87e75e19",
                    "contentType": "image/jpeg",
                    "name": "manatee.jpg",
                    "uploadId": "c5210e85845a49018afb6028b05234f5"
                }
            ],
            "updates": [
                {
                    "globalId": "6C78143A-231F-4CBB-BFFE-96F27B67E6FA",
                    "parentGlobalId": "85e499ac-8bff-42e8-9897-12f121898565",
                    "contentType": "image/jpeg",
                    "name": "salmon.jpg",
                    "uploadId": "92ea2e2bed874febab6bb8a0e1729c31"
                }
            ],
            "deleteIds": []
        }
      }
    ]
  "returnAttachmentsDataByUrl": true,
  "syncDirection": bidirectional,
  "async": true,
  "syncLayers":[{"id":0,"serverGen":8411,"syncDirection":"bidirectional"}]
  "editsUploadId": "",  
  "editsUploadFormat": "",
  "rollbackOnFailure": false,
  "dataFormat"= "json", 
  "f"= "json"
}

Example usage

http://services.myserver.com/lidGgNLxw9LL0SbI/ArcGIS/rest/services/SaveTheBay/FeatureServer/synchronizeReplica

JSON response syntax (when transportType=esriTransportTypeEmbedded)

{  
  "transportType" : "<esriTransportTypeEmbedded | esriTransportTypeURL>",
  "replicaID"   : "<replicaID>", // unique value that identifies the replica/server
  "replicaServerGen": ,    //only if modelType is perReplica
  "layerServerGens": [     //only if modelType is perLayer
	   {"id":<layer1Id>,"serverGen":<genNum>},
	   {"id":<layer2Id,"serverGen":<genNum>}
	  ],
  "responseType": "<esriReplicaResponseTypeEdits | esriReplicaResponseTypeReplacementData |  
  esriReplicaResponseTypeEditsAndData | esriReplicaResponseTypeNoEdits>",
  "edits": [
  {
    "id" : <layerId1>,
    "features" : {
	"adds":[<feature1>, <feature2>],
	"updates":[<feature1>, <feature2>],
	"deleteIds":["<globalId1>", "<globalId2>"],
	"addResults":[], // reports errors, if any
	"updateResults":[], // reports errors, if any
	"deleteResults":[] // reports errors, if any
	},
    "attachments" : {
	"adds":[<attachment1>, <attachment2>],
	"updates":[<attachment1>, <attachment2>],
	"deleteIds":["<globalId1>", "<globalId2>"],
	"addResults":[], // reports errors, if any
	"updateResults":[], // reports errors, if any
	"deleteResults":[] // reports errors, if any
	},
  }, // end of layer 1 edits
  {
    "id" : <layerId2>,
    "features" : {
	"adds":[<feature1>, <feature2>],
	"updates":[<feature1>, <feature2>],
	"deleteIds":["<globalId1>", "<globalId2>"],
	"addResults":[], // reports errors, if any
	"updateResults":[], // reports errors, if any
	"deleteResults":[] // reports errors, if any
	},
    "attachments" : {
	"adds":[<attachment1>, <attachment2>],
	"updates":[<attachment1>, <attachment2>],
	"deleteIds":["<globalId1>", "<globalId2>"],
	"addResults":[], // reports errors, if any
	"updateResults":[], // reports errors, if any
	"deleteResults":[] // reports errors, if any
	},
   } // end of layer 2 edits
 ] // end of edits
}

JSON response example (when transportType=esriTransportTypeURL and dataFormat=json)

{
   "transportType": "esriTransportTypeUrl",
   "responseType": "esriReplicaResponseTypeEdits",
   "URL" : "http://services.myserver.com/ArcGIS/rest/services/SaveTheBay/replicafiles/6169a9c5f6cc46e9b30afba6a125e4fc.json"
}

JSON response example (when transportType=esriTransportTypeURL and dataFormat=sqlite)

{
   "transportType": "esriTransportTypeUrl",
   "responseType": "esriReplicaResponseTypeEdits",
   "URL" : "http://services.myserver.com/ArcGIS/rest/services/SaveTheBay/replicafiles/_ags_data{756FD98A8F58464B96A2B1FB7BAE42BF}.geodatabase"
}

JSON response syntax (async=true and transportType=esriTransportTypeUrl)

When async=true, the request is processed as an asynchronous job and a URL is returned that a client can visit to check the status of the job.

{
  "statusUrl": "<url>"
}

JSON syntax of status resource:

{ 
  "transportType": "esriTransportTypeUrl",
  "responseType": <esriReplicaResponseTypeEdits | esriReplicaResponseTypeEditsAndData| esriReplicaResponseTypeNoEdits>,
  "replicaServerGen": "<replicaServerGen>",
  "replicaName": "<replicaName>",
  "replicaID": "<replicaID>",
  "targetType": <"client" | "server">,
  "resultUrl": "<url>", //path to JSON (dataFormat=JSON) or a SQLite geodatabase (dataFormat=sqlite)
  "submissionTime": "<T1>",  //Time since epoch in milliseconds
  "lastUpdatedTime": "<T2>", //Time since epoch in milliseconds
  "status": "<Pending | InProgress | Completed | Failed | ImportChanges | ExportChanges | ExportingData | ExportingSnapshot 
	       | ExportAttachments | ImportAttachments | ProvisioningReplica | UnRegisteringReplica | CompletedWithErrors>"

}

JSON response example, perLayer sync model (when transportType=esriTransportTypeEmbedded)

{
  "transportType" : "esriTransportTypeEmbedded", 
  "replicaID" : "{b7b70c50-7b8d-4938-a6f9-61f376e94c75}", 
  "layerServerGens" : [
    {
      "id" : 0, 
      "serverGen" : 8411
    }
  ], 
  "responseType" : "esriReplicaResponseTypeEdits", 
  "edits" : [
    {
      "id" : 0, 
      "features" : {
        "adds" : [
        {
             "geometry": {
                 "x": -120.41,
                 "y": 35.83
             },
             "attributes": {
                 "OBJECTID": 211,
                 "Type": 2,
                 "Confirmed": 0,
                 "Comments": "",
                 "Submitted": 1298911207302,
                 "GlobalID": "{b895c100-9ddc-5a32-b184-87db90a95e98}"
             }
         }
        ], 
        "updates" : [
         {
             "geometry": {
                 "x": -120.54,
                 "y": 35.11
             },
             "attributes": {
                 "OBJECTID": 139,
                 "Type": 2,
                 "Confirmed": 0,
                 "Comments": "",
                 "Submitted": 1298911207300,
                 "GlobalID": "{a699a609-8cbd-4a18-a363-42ac87e75e19}"
             }
         }
        ], 
        "deleteIds" : [
             "{7BA1586C-A462-4F5A-BA3F-AC4B675829CD}",
             "{6744DAA2-6E72-4025-B7C6-CDD8034CE127}"
        ],
       "addResults" : [], //no errors for adds
        "updateResults" : [], //no errors for updates
        "deleteResults" : [] //no errors for deletes
      }, 
      "attachments" : {
        "adds" : [], 
        "updates" : [], 
        "deleteIds" : [],
        "addResults" : [], //no errors for adds
        "updateResults" : [], //no errors for updates
        "deleteResults" : [] //no errors for deletes
      }
    }
  ]
}

JSON response example, perReplica sync model (when transportType=esriTransportTypeEmbedded)

{
  "transportType" : "esriTransportTypeEmbedded", 
  "replicaID" : "{b7b70c50-7b8d-4938-a6f9-61f376e94c75}", 
  "replicaServerGen" : 1368489013116, 
  "responseType" : "esriReplicaResponseTypeEdits", 
  "edits" : [
    {
      "id" : 0, 
      "features" : {
        "adds" : [
        {
             "geometry": {
                 "x": -120.41,
                 "y": 35.83
             },
             "attributes": {
                 "OBJECTID": 211,
                 "Type": 2,
                 "Confirmed": 0,
                 "Comments": "",
                 "Submitted": 1298911207302,
                 "GlobalID": "{b895c100-9ddc-5a32-b184-87db90a95e98}"
             }
         }
        ], 
        "updates" : [
         {
             "geometry": {
                 "x": -120.54,
                 "y": 35.11
             },
             "attributes": {
                 "OBJECTID": 139,
                 "Type": 2,
                 "Confirmed": 0,
                 "Comments": "",
                 "Submitted": 1298911207300,
                 "GlobalID": "{a699a609-8cbd-4a18-a363-42ac87e75e19}"
             }
         }
        ], 
        "deleteIds" : [
             "{7BA1586C-A462-4F5A-BA3F-AC4B675829CD}",
             "{6744DAA2-6E72-4025-B7C6-CDD8034CE127}"
        ],
       "addResults" : [], //no errors for adds
        "updateResults" : [], //no errors for updates
        "deleteResults" : [] //no errors for deletes
      }, 
      "attachments" : {
        "adds" : [], 
        "updates" : [], 
        "deleteIds" : [],
        "addResults" : [], //no errors for adds
        "updateResults" : [], //no errors for updates
        "deleteResults" : [] //no errors for deletes
      }
    }
  ]
}

7/5/2017