Create Replica

Description

The createReplica operation is performed on a feature service resource. This operation creates the replica between the feature service and a client based on a client-supplied replica definition. It requires the Sync capability. For more information on the Sync capability, see Sync overview.

The response for createReplica includes replicaID, server generation number, and data similar to the response from the feature service query operation.

The createReplica operation returns a response of type esriReplicaResponseTypeData, as the response has data for the layers in the replica. If the operation is called to register existing data using replicaOptions, the response type will be esriReplicaResponseTypeInfo, and the response won't contain data for the layers in the replica.

For detailed examples, see Sync workflow examples.

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

NoteNote:

Creating a replica from a service with only Query and Sync capabilities as an owner or an administrator creates a bidirectional replica (allows sync upload). Creating a replica from a service with Query and Sync capabilities as a nonowner creates a download replica that only allows sync downloads (edits can't be uploaded during sync). This allows owners or administrators to sync edits and manage the data while providing read-only access to other users.

At ArcGIS 10.6.1, there's an exception to this rule for feature services running on versioned data with only Query and Sync capabilities. In this case, a download replica is created for all users including owners and administrators. To administer the data, owners or administrators can use direct connections to the back end enterprise geodatabase in ArcMap or ArcGIS Pro. This exception means that all replicas created from these services will download from the published version on sync.

New at ArcGIS 10.7

New at ArcGIS 10.5.1

Request parameters

Parameter

Details

f

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

Values: html | json

replicaName

Description: The name of the replica on the server. The replica name is unique per feature service.

This is not a required parameter. If not specified, a replica name will be assigned and returned in the createReplica response. If specified, but the replicaName already exists on the server, a unique name will be returned in the response using the given replicaName as a base (that is, MyReplica may be returned as MyReplica_0 if there is already a replica named MyReplica on the server).

Syntax: replicaName=<replicaName>

Example: replicaName=myReplica

layers

Description: (Required) The list of layers and tables to include in the replica.

Syntax: layers=[<layer1>, <layer2>, <table1>]

layers=[<layer1>, <layer2>, <table1>]

Example: layers=0, 1, 2

layers=[0, 1, 2]

layerQueries

Description: In addition to the layers and geometry parameters, the layerQueries parameter can be used to further define what is replicated. This parameter allows you to set properties on a per-layer or per-table basis. Only the properties for the layers and tables that you want changed from the default are required.

If a layer's ID is present in the layers parameter and missing from layerQueries, its features that intersect with the filter geometry are returned.

The properties include the following:

  • where—Defines an attribute query for a layer or table. The default is no where clause.
  • useGeometry—Determines whether to apply the geometry for the layer. The default is true. If set to false, other layerQueries properties such as where determine which features are added.
  • includeRelated—Determines whether to add related rows. The default is true. Value true is honored only for queryOption = none. This is only applicable if your data has relationship classes. Relationships are only processed in a forward direction from origin to destination.
  • queryOption—Defines whether and how filters will be applied to a layer. queryOption was added at 10.2. See the Compatibility notes topic for more information.

    Values: <none | useFilter | all>

    When the value is none, no features are returned based on where and filter geometry. If includeRelated is false, no features are returned. If includeRelated is true, features in this layer (that are related to the features in other layers in the replica) are returned.

    When the value is useFilter, features that satisfy filtering based on geometry and where are retuned. The value of includeRelated is ignored.

    When the value is all, all the features from the layer are returned. All other parameters for the layer query are ignored.

Syntax: layerQueries={ Layer_or_tableID1 : {"where":"attribute query" , "useGeometry" : true | false, "includeRelated" : true | false}, Layer_or_tableID2: {.}}

Examples:

  • A service has a facilities layer (id=0) and inspection layer (id=1), and they are related. To replicate facilities in an area that needs inspection:

    layerQueries = {"0":{"queryOption": "useFilter", "useGeometry": true, "where": "requires_inspection = Yes"}}

  • To replicate facilities in an area that needs inspection and their related inspections:

    layerQueries = {"0":{" queryOption": "useFilter", "useGeometry": true, "where": "requires_inspection = Yes"}, {"1":{"queryOption": "none", "includeRelated": true}}

  • To replicate all aircraft in a layer:

    layerQueries = {"2":{"queryOption": "all"}}

  • To replicate all international aircraft:

    layerQueries = { "2":{"queryOption": "useFilter", "useGeometry": false, "where": "international= true" }}

  • To only upload a device's GPS tracks and not get any tracks back:

    layerQueries ={"3":{"queryOption": "none", "includeRelated": false}}

geometry

Description: (Required) The geometry to apply as the spatial filter. All the features in layers intersecting this geometry will be replicated. The structure of the geometry is the same as the structure of the JSON geometry objects returned by the ArcGIS REST API. In addition to the JSON structures, for envelopes and points, you can specify the geometry with a simpler comma-separated syntax.

Syntax:

  • JSON structures: geometryType=<geometryType>&geometry={geometry}
  • Envelope simple syntax: geometryType=esriGeometryEnvelope&geometry=<xmin>,<ymin>,<xmax>,<ymax>
  • Point simple syntax: geometryType=esriGeometryPoint&geometry=<x>,<y>

Examples:

  • geometryType=esriGeometryEnvelope&geometry={xmin: -104, ymin: 35.6, xmax: -94.32, ymax: 41}
  • geometryType=esriGeometryEnvelope&geometry=-104,35.6,-94.32,41
  • geometryType=esriGeometryPoint&geometry=-104,35.6

geometryType

Description: The type of geometry specified by the geometry parameter. The geometry type can be an envelope, point, line, or polygon. The default geometry type is an envelope.

Values: esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline | esriGeometryPolygon | esriGeometryEnvelope

inSR

Description: The spatial reference of the input geometry.

The spatial reference can be specified as either a well-known ID or a spatial reference JSON object, which can be defined using either a well-known ID (wkid) or a well-known text (wkt).

If inSR is not specified, the geometry is assumed to be in the spatial reference of the map.

replicaSR

Description: The spatial reference of the replica geometry.

The spatial reference can be specified as either a well-known ID or as a spatial reference JSON object, which can be defined using either well-known ID (wkid) or well-known text (wkt).

If the replicaSR is not specified, the replica data will be in the spatial reference of the map.

transportType

Description: The transportType represents the response format. If the transportType is esriTransportTypeUrl, the JSON response is contained in a file, and the URL link to the file is returned. Otherwise, the JSON object is returned directly. The default is esriTransportTypeUrl.

If async is true, the results will always be returned as if transportType is esriTransportTypeUrl. If dataFormat is sqlite, the transportFormat will always be esriTransportTypeUrl regardless of how the parameter is set.

Values: esriTransportTypeUrl | esriTransportTypeEmbedded

returnAttachments

Description: If true, attachments are added to the replica and returned in the response. Otherwise, attachments are not included. The default is false. This parameter is only applicable if the feature service has attachments.

Values: true | false

returnAttachmentsDatabyURL

Description: If true, a reference to a URL will be provided for each attachment returned from createReplica. Otherwise, attachments are embedded in the response. The default is true. This parameter is only applicable if the feature service has attachments and if returnAttachments is true and f=json.

Values: true | false

attachmentsSyncDirection

This option was added at 10.4. This parameter is available when the service resource syncCapabilities property includes "supportsAttachmentsSyncDirection" : true

Description: Clients can specify the attachmentsSyncDirection when creating a replica. This parameter defines how attachments will be synced and is only applicable if the feature service has attachments.

Values include the following:

  • bidirectional—Attachment edits can be both uploaded from the client and downloaded from the service when syncing.
  • Upload—Attachment edits can only be uploaded from the client when syncing. When the client calls synchronizeReplica, feature and row edits will be downloaded but attachments will not be. This is useful in cases where the data collector does not want to consume space with attachments from the service, but does need to collect new attachments.
  • None—Attachment edits are never synced from either the client or the server.

When returnAttachments is set to true, you can set attachmentsSyncDirection to either bidirectional (default) or upload. In this case, createReplica includes attachments from the service.

When returnAttachments is set to false, you can set attachmentsSyncDirection to either upload or none (default). In this case, createReplica does not include attachments from the service.

All other combinations are not valid.

AttachmentsSyncDirection is set during the createReplica operation and cannot be overridden during sync.

Values: bidirectional | upload | none

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

syncModel

Description: This parameter is used to indicate that the replica is being created for per-layer sync or per-replica sync. To determine which model types are supported by a service, query the supportsPerReplicaSync, supportsPerLayerSync, and supportsSyncModelNone properties of the feature service. By default, a replica is created for per-replica sync. If syncModel is perReplica, the syncDirection specified during sync applies to all layers in the replica. If the syncModel is perLayer, the syncDirection is defined on a layer-by-layer basis.

If syncModel is perReplica, the response will have replicaServerGen. A perReplica syncModel requires the replicaServerGen on sync. The replicaServerGen tells the server the point in time from which to send back changes.

If syncModel is perLayer, the response will include an array of server generation numbers for the layers in layerServerGens. A perLayer sync model requires the layerServerGens on sync. The layerServerGens tell the server the point in time from which to send back changes for a specific layer.

syncModel=none can be used to export the data without creating a replica. Query the supportsSyncModelNone property of the feature service to see if this model type is supported.

See the RollbackOnFailure and Sync Models topic for more details.

Values: perReplica | perLayer | none

Example: syncModel=perLayer

dataFormat

Description: The format of the replica geodatabase returned in the response. The default is json.

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

Syntax: sqlite | filegdb| shapefile | json

Example: dataFormat=sqlite

replicaOptions

Description: The replicaOptions parameter can be used to either create a new replica based on an existing replica definition or to include layers that are not of "type": "feature layer" or "type": "table" in the replica. Both types of replica options cannot be used together in one call.

To use replicaOptions to create a new replica based on an existing replica definition, it must include the registerExistingData property and reference an existing replica definition (refReplicaId).

This parameter instructs the createReplica operation to create a new replica based on an existing replica definition (refReplicaId). The operation will create a replica but will not return data. The responseType returned in the createReplica response will be esriReplicaResponseTypeInfo.

The new replica will have the definition of the reference replica, which is identified by refReplicaId. The replica definition consists of parameters: layers, layerQueries, geometry, geometryType, inSR, returnAttachments, and syncModel.

refReplicaServerGen is the generation number of the data from the reference replica. It applies to the reference replica created with syncModel = perReplica.

refLayerServerGens is an array of layers' generation numbers in the reference replica. It applies to the reference replica created with syncModel = perLayer.

Either refReplicaServerGen or refLayerServerGens should be provided, not both. If the syncModel of the reference replica is perLayer, then refLayerServerGens should be provided. If the syncModel of the reference replica is perReplica, then refReplicaServerGen should be provided. If syncModel is set, it will be ignored.

If refReplicaId is specified and the replica is present on the server, its definition is used while creating a new replica. If the reference replica is specified and no longer present, the operation will return an error. If the reference replica is no longer available, the parameters that define the replica are required.

The server will return the provided refReplicaServerGen/ refLayerServerGens in the response. If refReplicaServerGen (or refLayerServerGens) is not specified in the parameter, the server will return new generation numbers. In this case, the client will not be able to get the changes, if any, from the time of reference replica creation to the time of new replica creation.

NoteNote:

Starting in 10.7, the registerExistingData option can be used with traditionally versioned data (layer property "isDataVersioned": true) as indicated with the "supportsRegisteringExistingData": true, property on the service. Using registerExistingData with traditionally versioned data requires the reference replica to have never been synced. If the reference replica needs to be updated, it must be dropped and re-created.

Syntax:

replicaOptions = {"registerExistingData":{"refReplicaId": "<replica_guid>", "refReplicaServerGen": <genNum>, "refLayerServerGens": [{"id": <layer1Id>, "serverGen": <genNum>}, {"id": <layer2Id>, "serverGen": <genNum>}]}}

Examples:

replicaOptions = {"registerExistingData": {"refReplicaId": "{4721B2DD-CAE4-4a0f-B4E2-EAEB0AA80B0A}", "refReplicaServerGen": 100}}

replicaOptions = {"registerExistingData": {"refReplicaId": "{313E3D39-8BAC-4e40-99DC-548A015E27FA}", "refLayerServerGens": [{"id": 0, "serverGen": 0}, {"id": 1, "serverGen": 0}]}}

To use replicaOptions to include layers that are not of "type": "feature layer" or "type": "table" in the replica, it must include the syncDataOptions property. The syncDataOptions property can be included if the service supportedSyncDataOptions property is set. Possible layer types that may be include are as follows:

  • {"syncDataOptions": 1} is specified to include annotation feature layers.
  • {"syncDataOptions": 2} is specified to include dimension feature layers.
  • {"syncDataOptions": 4} is specified to include contingent values.

To include multiple syncDataOptions in the replica, the values can be added together. For example, to include annotation and dimension feature layers, {"syncDataOptions": 3}. To include all three, {"syncDataOptions": 7}.

The value of the supportedSyncDataOptions property indicates the layer types available in the service. For example, “supportedSyncDataOptions”: 3 indicates that there is at least one annotation and one dimension layer in the service.

NoteNote:

  • Even though contingent values will be included in the replica when specified, they will not be updated when sync is performed on the service. Any violations resulting from incorrect contingent values will be caught during the validation process and not during the sync process.
  • {"syncDataOptions": 0} will be treated the same as if the parameter was not passed.

Syntax:

replicaOptions = {"syncDataOptions": <syncDataOptions>}

Example:

replicaOptions = {"syncDataOptions": 4}

targetType

This option was added at 10.5.1.

Description: Can be set to either server or client. If not set, the default is client.

A targetType of client will generate a replica that matches those generated in pre-10.5.1 releases. These are designed to support syncing with lightweight mobile clients and have a single generation number (serverGen or replicaServerGen).

A targetType of server generates a replica that supports syncing in one direction between two feature services running on servers or between an ArcGIS Server feature service and an ArcGIS Online feature service. When the targetType is server, the replica information includes a second generation number. This second generation number is called replicaServerSibGen for perReplica types and serverSibGen for perLayer types.

targetType server replicas generated with dataFormat SQLite can be published as new services in another ArcGIS Online organization or in ArcGIS Enterprise. When published, a replica is generated on these new services with a matching replicaID and a replicaServerSibGen or serverSibGens. The replicaServerSibGen or serverSibGens values can be used as the replicaServerGen or serverGen values when calling synchronize replica on the source service to get the latest changes. These changes can then be imported into the new service using the synchronizeReplica operation. When calling synchronizeReplica on the new service to import the changes, be sure to pass the new replicaServerGen or serverGen from the source service as the replicaServerSibGen or serverSibGen. This will update the replica metadata appropriately such that it can be used in the next sync.

NoteNote:

The targetType as well as the replicaServerSibGen or serverSibGen values are stored in the replica metadata, which can be accessed from the replicas resource.

Example: targetType=server

syncDirection

Description: Defaults to bidirectional when the targetType is client and download when the targetType is server. If set, only bidirectional is supported when targetType is client. If set, only upload or download are supported when targetType is server.

A syncDirection of bidirectional matches the functionality from replicas generated in pre-10.5.1 releases and allows upload and download of edits. It is only supported when targetType is client.

When targetType is server, only a one way sync is supported; thus, only upload or download are valid options.

A syncDirection of upload means that the synchronizeReplica operation allows only sync with an upload direction. Use this option to allow the upload of edits from the source service.

A syncDirection of download means that the synchronizeReplica operation allows only sync with a download direction. Use this option to allow the download of edits to provide to the source service.

See the targetType parameter for more information.

NoteNote:

The syncDirection values are stored in the replica metadata which can be accessed from the replicas resource.

Example: syncDirection=download

Example usage

createReplica request URL for dataFormat=sqlite

Request URL:

https://services.myserver.com/ERmEceOGq5cHrItq/ArcGIS/rest/services/LandUse/FeatureServer/createReplica

POST parameters:

"geometry": {"xmin": -120.8, "ymin": 35.14, "xmax": -120.66, "ymax": 35.2},
    "geometryType": "esriGeometryEnvelope", 
    "inSR": 4326,
    "layerQueries": {"0":{"where":"Type=5"}},
    "layers": "0",
    "replicaName": "Marshes",
    "returnAttachments": true,
    "returnAttachmentsDataByUrl": true,
    "targetType": "client",
    "transportType": "esriTransportTypeURL",
    "async": true,
    "syncModel": "perReplica",
    "dataFormat": "sqlite",
    "replicaOptions": "",
    "f": "pjson"

createReplica request URL for dataFormat=json

Request URL:

https://services.myserver.com/ERmEceOGq5cHrItq/ArcGIS/rest/services/SaveTheBay/FeatureServer/createReplica

POST parameters:

"geometry": {"xmin": -120.8, "ymin": 35.14, "xmax": -120.66, "ymax": 35.2},
    "geometryType": "esriGeometryEnvelope", 
    "inSR": 4326,
    "replicaSR": ,
    "layerQueries": {"0":{"where":"Type=2"}},
    "layers": "0",
    "replicaName": "Marine",
    "returnAttachments": true,
    "returnAttachmentsDataByUrl": true,
    "transportType": "esriTransportTypeURL",
    "async": false,
    "syncModel": "perReplica",
    "dataFormat": "json",
    "replicaOptions": "",
    "f": "pjson"

JSON response syntax (transportType=esriTransportTypeUrl)

When transportType=esriTransportTypeUrl, the file returned in the URL contains a JSON or a sqlite payload (as specified with the dataFormat parameter) with a syntax as follows:

{
  "transportType": "esriTransportTypeURL",
  "responseType": "<esriReplicaResponseTypeData | esriReplicaResponseTypeInfo>",
  "layerServerGens": [{"id": "<layerId>", "serverGen": "<serverGen>"}], //Added in 10.6.1
  "URL":"<url>"
}

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": <esriReplicaResponseTypeData | esriReplicaResponseTypeInfo>,
  "replicaName": "<replicaName>", 
  "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 syntax (written to a JSON file)

If transportType=esriTransportTypeEmbedded and dataFormat=json, a JSON object response is directly returned as follows:

{
  "replicaName": "<replicaName>",
  "replicaID"   : "<replicaID>", // unique value that identifies the replica/server
  "transportType": "<esriTransportTypeUrl | esriTransportTypeEmbedded>", 
  "responseType": "<esriReplicaResponseTypeData | esriReplicaResponseTypeInfo>",
  "syncModel": "<perReplica | perLayer>",
  "layerServerGens": [
	   {"id":<layer1Id>,"serverGen":<genNum>},
	   {"id":<layer2Id,"serverGen":<genNum>}
	 ], // read only values for clients. Only if syncModel = perLayer
  "replicaServerGen: "<replicaServerGen>", // read only value for clients. Only if syncModel = perReplica
  "layers": [
  {
    "id" : <layerId1>,
    "features" : [ //features will include geometry for feature layers only
      <feature1>, <feature2> ],
    "attachments" : [ 
      "<attachment1>, <attachment2> ]
  },
  {
    "id" : <layerId2>,
    "features" : [ //features will include geometry for feature layers only
      <feature1>, <feature2> ],
    "attachments" : [ 
      "<attachment1>, <attachment2> ]
  }
  ]
}

JSON response example (async=true and dataFormat=sqlite)

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. The file returned in the resultURL is a sqlite geodatabase. The sqlite replica geodatabase contains the same information and data as the JSON file content in the subsequent example.

{  
   "statusUrl": "https://services.myserver.com/arcgis/rest/services/LandUse/FeatureServer/jobs/j0b4b6064db0f44e6b5f39c4ef301d1f9"
}

Content of the status resource:

{ 
   "transportType": "esriTransportTypeUrl",
   "responseType": "esriReplicaResponseTypeData",
   "replicaName": "Soils",
   "replicaID": "99F979B0-A93A-4EBF-9015-D4FDB567218E",
   "targetType": "server",
   "resultUrl": "https://services.myserver.com/arcgis/rest/services/directories/replicafiles/_ags_data{422DCB2CDD8340A7B73639846E9AB43C}.geodatabase"
   "submissionTime": 1379366479000, 
   "lastUpdatedTime": 1379366482000, 
   "status": "Completed" 
}

JSON response example (transportType=esriTransportTypeUrl and dataFormat=sqlite)

When creating a replica with transportType = esriTransportTypeUrl and dataFormat = sqlite, the response includes layerServerGens and a sqlite geodatabase.

{
 "transportType": "esriTransportTypeUrl",
 "responseType": "esriReplicaResponseTypeData",
 "layerServerGens": [
  {
   "id": 0,
   "serverGen": 1526605677436
  }
 ],
 "URL": "https://services.myserver.com/arcgis/rest/directories/arcgisoutput/Sync_MapServer/_ags_dataE00E0CEDE72B4526BBD3B659088FE365.geodatabase"
}

JSON response example (transportType=esriTransportTypeUrl and dataFormat=json)

{
  "transportType":"esriTransportTypeUrl", 
  "responseType": "esriReplicaResponseTypeData",
  "replicaName": "Meters", 
  "resultUrl":  "https://arcgis.com/lidGgNLxw9LL0SbI/ArcGIS/rest/services/SaveTheBay/replicafiles/c2f366ffbf5549a48727d2529b2c6ed5.json",   
  "submissionTime": 1379366479000, 
  "lastUpdatedTime": 1379366482000, 
  "status": "Completed"
}

File content:

{
  "replicaName" : "Marine", 
  "replicaID" : "{5016655f-4db8-4745-b1ab-995081dfcb52}", 
  "layerServerGens" : [
    {
      "id" : 0, 
      "serverGen" : 8411
    }
  ], 
  "responseType" : "esriReplicaResponseTypeData", 
  "syncModel" : "perLayer", 
  "layers" : [
    {
      "id" : 0, 
      "features" : [
        {"geometry" : 
          {
            "x" : -120.73650757099995, 
            "y" : 35.165736219000053
          }, 
          
          "attributes" : {
            "OBJECTID" : 5, 
            "Type" : 2, 
            "Confirmed" : 0, 
            "Comments" : "", 
            "creator" : "user1", 
            "editor" : "user1", 
            "Submitted" : 1298911207000, 
            "GlobalID" : "85e499ac-8bff-42e8-9897-12f121898565"
          }
        }, 
        {"geometry" : 
          {
            "x" : -120.74290998099991, 
            "y" : 35.157279059000075
          }, 
          
          "attributes" : {
            "OBJECTID" : 6, 
            "Type" : 2, 
            "Confirmed" : 0, 
            "Comments" : "", 
            "creator" : "user1", 
            "editor" : "user1", 
            "Submitted" : 1298911207000, 
            "GlobalID" : "a699a609-8cbd-4a18-a363-42ac87e75e19"
          }
        }, 
        {"geometry" : 
          {
            "x" : -120.73939627999994, 
            "y" : 35.175259875000052
          }, 
          
          "attributes" : {
            "OBJECTID" : 1627, 
            "Type" : 2, 
            "Confirmed" : 0, 
            "Comments" : "", 
            "creator" : "user1", 
            "editor" : "user1", 
            "Submitted" : 1298652153000, 
            "GlobalID" : "ed8e7ee8-4a91-4d5e-8bed-9f609c66387b"
          }
        }
      ], 
      "attachments" : [
      ]
    }
  ]
}

JSON response example (data contains attachments [dataFormat=json])

{
   "transportType":"esriTransportTypeUrl", 
   "responseType":"esriReplicaResponseTypeData",
   "URL": "https://machinename:6443/arcgis/rest/directories/arcgisoutput/Canada/test113c26d11b80f049c09aef1e6c1327641c.json"
}

File content:

{
 "replicaName": "ags_gfs_4",
 "replicaID": "D4B2D34C-61DD-4AED-BF37-B7AC363CDB08",
 "transportType": "esriTransportTypeUrl",
 "responseType": "esriReplicaResponseTypeData",
 "syncModel": "perReplica",
 "replicaServerGen": 0,
 "responseType": "esriReplicaResponseTypeData",
 "layers": [
  {
   "id": 0,
   "features": [
    {
     "geometry": {
      "x": -123.06999969499992,
      "y": 49.159999847000051
     },
     "attributes": {
      "OBJECTID": 1,
      "NAME": "Vancouver",
      "CAPITAL": "N",
      "PROV_NAME": "British Columbia",
      "GLOBALID": "{C74D42DB-5D07-4AB8-8C91-11AE1E52E6A3}",
      "POPULATION_DOMAIN": 4,
      "RepRowID": 1
     }
    },
    {
     "geometry": {
      "x": -114.05000305199991,
      "y": 51.029998779000039
     },
     "attributes": {
      "OBJECTID": 2,
      "NAME": "Calgary",
      "CAPITAL": "N",
      "PROV_NAME": "Alberta",
      "GLOBALID": "{6A33F63A-AA90-4970-AB76-76B32E702745}",
      "POPULATION_DOMAIN": 5,
      "RepRowID": 2
     }
    },
    {
     "geometry": {
      "x": -113.27999877899992,
      "y": 53.330001831000061
     },
     "attributes": {
      "OBJECTID": 3,
      "NAME": "Edmonton",
      "CAPITAL": "Y",
      "PROV_NAME": "Alberta",
      "GLOBALID": "{4D809477-4994-4B8C-80E7-1631E0AD3FA9}",
      "POPULATION_DOMAIN": 4,
      "RepRowID": 3
     }
    },
    {
     "geometry": {
      "x": -97.124443053999926,
      "y": 49.921169281000061
     },
     "attributes": {
      "OBJECTID": 4,
      "NAME": "Winnipeg",
      "CAPITAL": "Y",
      "PROV_NAME": "Manitoba",
      "GLOBALID": "{CDB3FD57-2E2A-4FBF-998D-B84E5E26167D}",
      "POPULATION_DOMAIN": 3,
      "RepRowID": 4
     }
    },
    {
     "geometry": {
      "x": -75.650749206999933,
      "y": 45.374221802000079
     },
     "attributes": {
      "OBJECTID": 6,
      "NAME": "Ottawa",
      "CAPITAL": "C",
      "PROV_NAME": "Ontario",
      "GLOBALID": "{0F2F8880-4763-481A-9379-62B573ED3154}",
      "POPULATION_DOMAIN": 4,
      "RepRowID": 6
     }
    },
    {
     "geometry": {
      "x": -73.653526305999947,
      "y": 45.541019440000071
     },
     "attributes": {
      "OBJECTID": 7,
      "NAME": "Montreal",
      "CAPITAL": "N",
      "PROV_NAME": "Quebec",
      "GLOBALID": "{BE529DB3-D879-476F-B3CA-FF4E9B32A36B}",
      "POPULATION_DOMAIN": 6,
      "RepRowID": 7
     }
    },
    {
     "geometry": {
      "x": -71.244926452999948,
      "y": 46.802070618000073
     },
     "attributes": {
      "OBJECTID": 8,
      "NAME": "Quebec",
      "CAPITAL": "Y",
      "PROV_NAME": "Quebec",
      "GLOBALID": "{99FD4EF2-4548-4FD6-97A4-CAC6B3185373}",
      "POPULATION_DOMAIN": 3,
      "RepRowID": 8
     }
    },
    {
     "geometry": {
      "x": -123.34989929199992,
      "y": 48.451988220000032
     },
     "attributes": {
      "OBJECTID": 9,
      "NAME": "Victoria",
      "CAPITAL": "Y",
      "PROV_NAME": "British Columbia",
      "GLOBALID": "{8F558B76-98E1-41AE-92D0-148547E344A6}",
      "POPULATION_DOMAIN": 2,
      "RepRowID": 9
     }
    }
   ],
   "attachments": [
    {
     "attachmentId": 2,
     "globalId": "{A8AFEC66-516B-40E9-9BAC-2F26AB0E0253}",
     "parentGlobalId": "{C74D42DB-5D07-4AB8-8C91-11AE1E52E6A3}",
     "contentType": "application/pdf",
     "size": 762519,
     "name": "celebrate_CND.pdf",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach1c2b660372a64876944b1e874c930b3f.pdf"
    },
    {
     "attachmentId": 3,
     "globalId": "{B5B41B49-73C4-48C1-A5B0-4DFDDCA73F25}",
     "parentGlobalId": "{C74D42DB-5D07-4AB8-8C91-11AE1E52E6A3}",
     "contentType": "image/jpeg",
     "size": 35277,
     "name": "vancouver.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach83633fbcc78e400cbe669f16700d467f.jpg"
    },
    {
     "attachmentId": 4,
     "globalId": "{4E430844-01C2-41F5-A540-B9BE97A0D187}",
     "parentGlobalId": "{8F558B76-98E1-41AE-92D0-148547E344A6}",
     "contentType": "image/jpeg",
     "size": 4424,
     "name": "rockies.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach54cc055852e64c589b5cd60b51ee4645.jpg"
    },
    {
     "attachmentId": 5,
     "globalId": "{E71B2FC1-1173-424E-9B01-57B6FD2CBCD6}",
     "parentGlobalId": "{8F558B76-98E1-41AE-92D0-148547E344A6}",
     "contentType": "image/jpeg",
     "size": 18813,
     "name": "novascotia.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach80bea2ecd080460cbe6155fa1ec79532.jpg"
    },
    {
     "attachmentId": 6,
     "globalId": "{CB299B1F-736D-4080-B01E-C07B1B6ABA88}",
     "parentGlobalId": "{6A33F63A-AA90-4970-AB76-76B32E702745}",
     "contentType": "image/jpeg",
     "size": 52568,
     "name": "mountains.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach60fbca550b944f4b855f2fb1f0375955.jpg"
    },
    {
     "attachmentId": 7,
     "globalId": "{5B2D5F6C-8495-4BB4-9D09-B4DA9EE8D3B9}",
     "parentGlobalId": "{4D809477-4994-4B8C-80E7-1631E0AD3FA9}",
     "contentType": "application/pdf",
     "size": 84256,
     "name": "cnd_doc.pdf",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach8bffd96db040439694bde39b23f8f392.pdf"
    },
    {
     "attachmentId": 24,
     "globalId": "{17686592-E726-40F0-8B73-2168C7543E43}",
     "parentGlobalId": "{BE529DB3-D879-476F-B3CA-FF4E9B32A36B}",
     "contentType": "image/jpeg",
     "size": 4424,
     "name": "rockies.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach981c1c88d9194ac3b6382b67f410d629.jpg"
    },
    {
     "attachmentId": 25,
     "globalId": "{998ECBE2-6D27-4244-82A2-5E05D7A6655D}",
     "parentGlobalId": "{BE529DB3-D879-476F-B3CA-FF4E9B32A36B}",
     "contentType": "image/jpeg",
     "size": 118371,
     "name": "politics.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach9093c7c9ea9748f0a5b41a2972a8db0e.jpg"
    },
    {
     "attachmentId": 29,
     "globalId": "{913DCE0B-0655-410C-8697-95EB872F2EA8}",
     "parentGlobalId": "{0F2F8880-4763-481A-9379-62B573ED3154}",
     "contentType": "image/jpeg",
     "size": 52568,
     "name": "mountains.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach6c2bb62d0c1d43ff8810c2485ca5e21b.jpg"
    },
    {
     "attachmentId": 30,
     "globalId": "{E39194E1-A2B5-4920-9BB2-1189EA5E5FA4}",
     "parentGlobalId": "{0F2F8880-4763-481A-9379-62B573ED3154}",
     "contentType": "image/jpeg",
     "size": 19530,
     "name": "polarbear_cub.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach55256b8ad9724574a17c47f960959cc1.jpg"
    },
    {
     "attachmentId": 31,
     "globalId": "{C7BF62B1-D8DB-4ECD-ACB7-42BEC64DB59B}",
     "parentGlobalId": "{0F2F8880-4763-481A-9379-62B573ED3154}",
     "contentType": "image/jpeg",
     "size": 118371,
     "name": "politics.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach9dc1d884ed0e45e0b1ea1a2ef96f17e4.jpg"
    },
    {
     "attachmentId": 32,
     "globalId": "{CAD4BFAA-F6D6-43A5-8594-DCA86C468F88}",
     "parentGlobalId": "{99FD4EF2-4548-4FD6-97A4-CAC6B3185373}",
     "contentType": "image/jpeg",
     "size": 118371,
     "name": "politics.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attachd807f2238bf04074836a3e2648bb740d.jpg"
    },
    {
     "attachmentId": 33,
     "globalId": "{21A265D7-87BE-4C46-B59F-FBFF5FE8A533}",
     "parentGlobalId": "{99FD4EF2-4548-4FD6-97A4-CAC6B3185373}",
     "contentType": "image/jpeg",
     "size": 28588,
     "name": "flag.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach27740a4f7c4d422a893a6c263bd79575.jpg"
    },
    {
     "attachmentId": 34,
     "globalId": "{FF4E9E9E-BC4C-48F5-B2DA-EA9D243EB6B3}",
     "parentGlobalId": "{99FD4EF2-4548-4FD6-97A4-CAC6B3185373}",
     "contentType": "image/jpeg",
     "size": 69583,
     "name": "highway.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attachc225fced338547cf81f0f6eb575e60e8.jpg"
    },
    {
     "attachmentId": 35,
     "globalId": "{1C6F43AD-68F7-4C27-A683-639D7B973909}",
     "parentGlobalId": "{99FD4EF2-4548-4FD6-97A4-CAC6B3185373}",
     "contentType": "image/jpeg",
     "size": 52568,
     "name": "mountains.jpg",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach31d77279e58e4fec8cc3c6f30a714bb5.jpg"
    },
    {
     "attachmentId": 48,
     "globalId": "{90234EC7-0D60-4178-993A-0D132E63A9EF}",
     "parentGlobalId": "{CDB3FD57-2E2A-4FBF-998D-B84E5E26167D}",
     "contentType": "application/pdf",
     "size": 331959,
     "name": "CND_goose.pdf",
     "url": "https://myserver:6443/arcgis/rest/directories/arcgisoutput/Canada/_ags_fsRep_attach6b4143202a1445ac81f1218b9b28c503.pdf"
    }
   ]
  }
 ]
}