- URL:
- https://<kgserver_replicaId>/synchronize
- Methods:
POST- Version Introduced:
- 12.1
Description
The synchronize operation is performed on a knowledge graph service replica. The operation synchronizes changes between the knowledge graph service and the replica based on the replica provided by the client. The Sync feature must be enabled on the knowledge graph service.
The client obtains the replica by executing the create operation or by accessing the replicas resource. The sync determines what kind of edits are accepted during the synchronize operation. sync is defined during the create operation and is determined by a combination of portal user types and knowledge graph service capabilities. The create operation provides more details on the sync types defined in a replica.
When synchronizing changes from the knowledge graph service to the replica, the synchronize response returns the sync which can be used to download the file containing edits for the replica.
Request parameters
| Parameter | Details |
|---|---|
(Required) | Specifies what data will be downloaded. When this option is set to When using Syntax Values: |
(required) | The format of the download data. The only supported format is |
(required) | Specifies how edits will be uploaded from the replica to the knowledge graph service. When using When using Syntax Values: |
(optional) | Specifies the file format for upload when |
(Optional) | If Values: |
| The response format. The default format is Values: |
Example usage
The following is a sample URL used to access the synchronize operation for a replica ID 13034e5f-177d-4754-af3e-298bc708cbc4 on a knowledge graph service named Field. This example request highlights downloading a snapshot of the knowledge graph service and using an upload file for edit upload:
https
{
"synchronizeReplicaRequest": {
"downloadParameters": {
"replicaSnapshot": {},
"dataFormat": "PBF"
},
"uploadEdits": {
"uploadFile": {
"editsUploadId": "00000001-ABCD-EF11-9999-0123456789AB",
"uploadFormat": "PBF"
}
}
}
}Example Response syntax
{
"synchronizeReplicaResult": {
"replicaId": <bytes>,
"syncDate": <int64>,
"downloadResults": {
"syncDataFormat": <PBF>,
"syncDataUrl": <URL>
}
}
}Example Response
The below is the example response to the above request:
{
"synchronizeReplicaResult": {
"replicaId": "{6ED11D5E-F3B8-4D15-9A78-B784E54803D8}",
"syncDate": "2026-03-07T23:09:14.993Z",
"downloadResults": {
"syncDataFormat": "PBF",
"syncDataUrl": "https:///organization.example.com/server/rest/directories/arcgisoutput/Hosted/FieldService_KnowledgeGraphServer/_ags_kgs_25556a35-b71e-472e-a20b-56aba12b0dba.zip"
}
}
}Requests and responses
This operation can be performed by sending a PBF-formatted request and receiving a PBF-formatted response. The status of the operation can be queried using a PBF-formatted response. Details of the request and response parameters are provided in the appropriate .proto files.
PBF Request
Create a PBF-formatted request to perform this operation based on the Synchronize file.
PBF Response
When executing this operation asynchronously, create a PBF-formatted response to query the status of the operation based on the Async file.
Create a PBF-formatted response to query the status of the operation based on the Synchronize file.