Skip To Content

Replicas (Feature Service)

Description

The replicas resource lists all replicas that have been created on the feature service. This list includes the replica name and replica ID of each replica. For secured services, all replicas are listed when logged in as the admin user. Otherwise, only replicas created by the logged-in user are listed.

New at 10.8.1

New advancedReplicasResourceCapabilities properties in syncCapabilities are provided for sync enabled feature services published from ArcGIS Pro that reference enterprise geodatabase data. These describe new parameters that can be passed to the replicas resource. These include replicaVersion, returnLastSyncDate, and returnVersion. See details below in the Request Parameters table.

For sync enabled, branch versioned data, determined by the layer resource returning isDataBranchVersioned as true, the replicas resource will list, and allow, access to all replicas from all users if the connected user has the Version Management privilege assigned to them either through the default administrator role or through a custom role. Users with this privilege can also unregister any replica from any users.

Note:

Users with this privilege can't view or unregister replica from others if the data is not branch versioned.

Request parameters

ParameterDetails
replicaVersion

Can be set when the service resource's advancedReplicasResourceCapabilities property includes supportsVersion as true. When replicaVersion is included in the request, only replicas with a replica version matching the value provided will be returned in the replicas response.

Note:

The parameter value is not applied if the data is not versioned.

Example

replicaVersion=SDE.DEFAULT
returnVersion

Can be set if the service resource's advancedReplicasResourceCapabilties property includes supportsReturnVersion as true. When returnVersion is true, the version name associated with each replica is included in the replicas response. The default value is false.

Note:

The parameter value is not applied if the data is not versioned.

Values: true | false

returnLastSyncDate

Can be set if the service resource's advancedReplicasResourceCapabilities property includes supportsReturnLastSyncData as true. when returnLastSyncData is true, the lastSyncDate value associated with each replica is included in the replicas response. The default value is false.

Values: true | false

f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

URL listing the replicas, as well as the version name and lastSyncDate values associated with each replica, in the USA feature service:

https://machine.domain.com/webadaptor/rest/services/USA/FeatureServer/replica?returnVersion=true&returnLastSyncDate=true&f=pjson

JSON Response syntax


[ 
  {
    "replicaName": "replicaName1",
    "replicaID": "replicaID1"
  },
  {
    "replicaName": "replicaName1",
    "replicaID": "replicaID2"
  }
]

JSON Response examples

The following response demonstrates the information returned when returnLastSyncDate and returnVersion are true:


[
  {
		  "replicaName": "Ags_Fs_1587781611176",
		  "replicaID": "A849811F-6FDF-4AEC-9DD0-3E3DF7142603",
		  "replicaVersion": "GDB.admin_counties_v_1587781587098",
		  "lastSyncDate": 1587781611254
	 },
	 {
		  "replicaName": "Ags_Fs_1587781611208",
		  "replicaID": "1FBA41AA-55B0-432A-B918-96024ECF2533",
		  "replicaVersion": "GDB.admin_counties_v_1587781587066",
		  "lastSyncDate": 1587781611286
	 }
]

The following response demonstrates what is returned when replicaVersion is defined (for this example, it was defined as GBD.admin_counties_v_1587781587098) and returnVersion is true.


[
  {
	   "replicaName": "Ags_Fs_1587781611176",
	   "replicaID": "A849811F-6FDF-4AEC-9DD0-3E3DF7142603",
	   "replicaVersion": "GDB.admin_counties_v_1587781587098"
  }
]