Duplicate parcels

Description

Duplicates parcels to a specified parcel type and subtype. A record is required to duplicate parcels. After duplicating parcels, build the parcel fabric so that record polygon and parcel count reflects the newly added parcels.

Learn more about duplicating parcels

Request parameters

Parameter

Details

gdbVersion

Parameter specifying the name of the geodatabase version (the default is the DEFAULT version).

Syntax

gdbVersion=<version>
sessionId

Parameter representing the token (guid) used to lock the version. If the calling client has previously started a service session (editing) and holds an exclusive lock on the specified version, the request will fail if the sessionId is not provided. If the specified version is currently locked by any other session, the request will fail if the sessionId is not provided or does not match the sessionId that holds the exclusive lock.

Syntax

sessionId=<guid>
parcels

(Required)

Parameter representing the parcels to duplicate.

Syntax

parcels=[{"id":"<parcelguid>","layerId":"16"},{...}]
targetParcelType

(Required)

Parameter representing the target parcel type.

Syntax

targetParcelType=<layer id>
targetParcelSubtype

(Required)

Parameter representing the target parcel subtype.

Syntax

targetParcelSubtype=<subtype id>

//If not using a subtype
targetParcelSubtype=0
record

(Required)

Parameter representing the unique identifier (guid) of the record. The duplicated parcel will be associated to the specified record.

Syntax

record=<guid>
f

Parameter representing the output format of the response. The default response format is html.

Values: html | json

Example usage

This example shows the steps for duplicating a parcel to a different parcel type using the duplicateParcels operation.

NoteNote:
The sessionId parameters must be the same for starting the edit session, performing the edit operation and stopping the edit session.

Steps:
  1. Start a service session on the version.

    Request URL and parameters:

    https://machine.domain.com/webadaptor/rest/services/CountyFabric/VersionManagementServer/versions/E4DAED9D-C859-489B-9053-767A45F1D97C/startReading
    f=json
    sessionId={bba242fc-e671-4aa2-83d4-1c013347fa4f}
    

  2. Start an edit session on the version.

    Request URL and parameters:

    https://machine.domain.com/webadaptor/rest/services/CountyFabric/VersionManagementServer/versions/E4DAED9D-C859-489B-9053-767A45F1D97C/startEditing
    f=json
    sessionId={bba242fc-e671-4aa2-83d4-1c013347fa4f}
    

  3. Duplicate a parcel in the tax parcel type to the lot parcel type using the specified record.

    Request URL and parameters:

    https://machine.domain.com/webadaptor/rest/services/CountyFabric/ParcelFabricServer/duplicateParcels
    f=json
    gdbVersion=admin.Version1
    sessionId={bba242fc-e671-4aa2-83d4-1c013347fa4f}
    parcels=[{"id":"{5B9C7139-FBE0-4B43-B9BB-092EB98635E6}","layerId":"13"}]
    targetParcelType=10
    targetParcelSubtype=0
    record={78BEE123-4A76-4B6C-9B12-C30786E46B48}
    
  4. If edits are complete, stop the edit session.
  5. Stop and release the service session.

JSON Response syntax

{
  "exceededTransferLimit: <true | false>,
  "moment": <datetime>,
  "error": {  // only if success is false
    "extendedCode": <HRESULT>,
    "message": <error message>,
    "details": [<detail>]
  },
  "serviceEdits": {  // only if transfer limit is not exceeded
    "editedFeatures": {
      "adds": {
        "attributes": {...},
        "geometry": {...}
      },
      {
        "spatialReference": {<spatial reference>}
      },
      "id": <layerID>
    }
  },
  "success": <true | false>
}

JSON Response example

{
  "moment": 1570556718167,
  "exceededTransferLimit": false,
  "serviceEdits": [
    {
      "id": 10,
      "editedFeatures": {
        "spatialReference": {
          "wkid": 2913,
          "latestWkid": 2913,
          "xyTolerance": 0.0032808398950131233,
          "zTolerance": 0.001,
          "mTolerance": 0.001,
          "falseX": -111333600,
          "falseY": -98152500,
          "xyUnits": 3048,
          "falseZ": -100000,
          "zUnits": 10000,
          "falseM": -100000,
          "mUnits": 10000},
          "adds": [
            {
              "attributes": {
                "OBJECTID": 417,
                "Name": "231",
                "ParcelSubtype": null,
                "CreatedByRecord": "{78BEE123-4A76-4B6C-9B12-C30786E46B48}",
                "RetiredByRecord": null,
                "StatedArea": null,
                "StatedAreaUnit": null,
                "CalculatedArea": null,
                "MiscloseRatio": 100000.0,
                "MiscloseDistance": 0.00021189,
                "IsSeed": 0,
                "created_user": "admin",
                "create_date": 1570556718000,
                "last_edited_user": "admin",
                "last_edited_date": 1570556718000,
                "GlobalID": "{E401636E-2617-49C4-9FBB-C480E1F7417A}",
                "Shape__Area": 4485.04508148817058,
                "Shape__Length": 287.336770079595112
              },
              "geometry": {
                "hasZ": true,
                "curveRings": [
                  [
                    [7500983.244094491, 446986.32119423151, 0],
                    [7500878.35465879738, 446990.401574805379, 0],
                    [7500879.79625983536, 447034.365157485008, 0],
                    [7500959.86220473051, 447031.250328078866, 0],
                      {
                        "c": [
                          [7500983.87171916664, 447005.455380573869, 0],
                          [7500977.186862452, 447023.304530537338]
                        ]
                      },
                    [7500983.244094491, 446986.32119423151, 0]
                  ]
                ]
              }
            }
          ]
        }
      },
      {
        "id": 9,
        "editedFeatures": {
          "spatialReference": {
            "wkid": 2913,
            "latestWkid": 2913,
            "xyTolerance": 0.0032808398950131233,
            "zTolerance": 0.001,
            "mTolerance": 0.001,
            "falseX": -111333600,
            "falseY": -98152500,
            "xyUnits": 3048,
            "falseZ": -100000,
            "zUnits": 10000,
            "falseM": -100000,
            "mUnits": 10000
          },
          "adds": [
            {
              "attributes": {
                "OBJECTID": 401,
                "CreatedByRecord": "{78BEE123-4A76-4B6C-9B12-C30786E46B48}",
                "RetiredByRecord": null,
                "ParentLineID": null,
                "Direction": null,
                "Distance": null,
                "Radius": null,
                "ArcLength": null,
                "Radius2": null,
                "COGOType": null,
                "IsCOGOGround": null,
                "COGOAccuracy": null,
                "Rotation": null,
                "Scale": null,
                "created_user": "admin",
                "create_date": 1570556718000,
                "last_edited_user": "admin",
                "last_edited_date": 1570556718000,
                "GlobalID": "{41D86B48-1B93-48BF-B772-CE92FB67F9F4}",
                "Shape__Length": 43.9872119550819676
              },
              "geometry": {
                "hasZ": true,
                "paths": [
                  [
                    [7500879.79625983536, 447034.365157485008, 0],
                    [7500878.35465879738, 446990.401574805379, 0]
                  ]
                ]
              }
            },
            {
              "attributes": {
                "OBJECTID": 402,
                "CreatedByRecord": "{78BEE123-4A76-4B6C-9B12-C30786E46B48}",
                "RetiredByRecord": null,
                "ParentLineID": null,
                "Direction": null,
                "Distance": null,
                "Radius": null,
                "ArcLength": null,
                "Radius2": null,
                "COGOType": null,
                "IsCOGOGround": null,
                "COGOAccuracy": null,
                "Rotation": null,
                "Scale": null,
                "created_user": "admin",
                "create_date": 1570556718000,
                "last_edited_user": "admin",
                "last_edited_date": 1570556718000,
                "GlobalID": "{023F689A-85C2-4E05-BD00-7A6A71D45860}",
                "Shape__Length": 104.968772621927869
              },
              "geometry": {
                "hasZ": true,
                "paths": [
                  [
                    [7500878.35465879738, 446990.401574805379, 0],
                    [7500983.244094491, 446986.32119423151, 0]
                  ]
                ]
              }
            },
            {
              "attributes": {
                "OBJECTID": 403,
                "CreatedByRecord": "{78BEE123-4A76-4B6C-9B12-C30786E46B48}",
                "RetiredByRecord": null,
                "ParentLineID": null,
                "Direction": null,
                "Distance": null,
                "Radius": null,
                "ArcLength": null,
                "Radius2": null,
                "COGOType": null,
                "IsCOGOGround": null,
                "COGOAccuracy": null,
                "Rotation": null,
                "Scale": null,
                "created_user": "admin",
                "create_date": 1570556718000,
                "last_edited_user": "admin",
                "last_edited_date": 1570556718000,
                "GlobalID": "{802D1EC2-55E7-4238-8607-D073BE26786B}",
                "Shape__Length": 80.12651055788146
              },
              "geometry": {
                "hasZ": true,
                "paths": [
                  [
                    [7500959.86220473051, 447031.250328078866, 0],
                    [7500879.79625983536, 447034.365157485008, 0]
                  ]
                ]
              }
            },
            {
              "attributes": {
                "OBJECTID": 404,
                "CreatedByRecord": "{78BEE123-4A76-4B6C-9B12-C30786E46B48}",
                "RetiredByRecord": null,
                "ParentLineID": null,
                "Direction": null,
                "Distance": null,
                "Radius": null,
                "ArcLength": null,
                "Radius2": null,
                "COGOType": null,
                "IsCOGOGround": null,
                "COGOAccuracy": null,
                "Rotation": null,
                "Scale": null,
                "created_user": "admin",
                "create_date": 1570556718000,
                "last_edited_user": "admin",
                "last_edited_date": 1570556718000,
                "GlobalID": "{870371AF-5BAD-4925-8EA0-34A1FDF02243}",
                "Shape__Length": 39.1097979417612578
              },
              "geometry": {
                "hasZ": true,
                "curvePaths": [
                  [
                    [7500983.87171916664, 447005.455380573869, 0],
                      {
                        "c": [
                          [7500959.86220473051, 447031.250328078866, 0],
                          [7500977.186862452, 447023.304530537629]
                        ]
                      }
                    ]
                  ]
                }
              },
              {
                "attributes": {
                  "OBJECTID": 405,
                  "CreatedByRecord": "{78BEE123-4A76-4B6C-9B12-C30786E46B48}",
                  "RetiredByRecord": null,
                  "ParentLineID": null,
                  "Direction": null,
                  "Distance": null,
                  "Radius": null,
                  "ArcLength": null,
                  "Radius2": null,
                  "COGOType": null,
                  "IsCOGOGround": null,
                  "COGOAccuracy": null,
                  "Rotation": null,
                  "Scale": null,
                  "created_user": "admin",
                  "create_date": 1570556718000,
                  "last_edited_user": "admin",
                  "last_edited_date": 1570556718000,
                  "GlobalID": "{75F283E8-AD17-4B8A-B96F-9A1BB6466695}",
                  "Shape__Length": 19.14447700297826
                },
                {
                  "geometry": {
                    "hasZ": true,
                    "paths": [
                      [
                        [7500983.87171916664, 447005.455380573869, 0],
                        [7500983.244094491, 446986.32119423151, 0]
                      ]
                    ]
                  }
                }
              }
            }
          ]
        }
      }
    }
  ],
  "success": true
}