Skip To Content

Update parcel history

Description

The updateParcelHistory operation sets the specified parcel features to current or historic using the specified record. When setting current parcels as historic, the Retired By Record field of the features is updated with the global ID of the specified record. When setting historic parcels as current, the Created By Record field of the features is updated with the global ID of the specified record.

Learn more about setting parcel history

Request parameters

ParameterDetails
gdbVersion

The name of the geodatabase version (the default is the DEFAULT version).

Syntax

gdbVersion=<version>
sessionId

The token (GUID) used to lock the version. If the calling client is editing a named version, the sessionId value is required. If the specified version is currently locked by another session, the request will fail if the sessionId value is not provided or does not match the sessionId value that holds the exclusive lock. If the client is editing the default version, the sessionId value is not required.

Syntax

sessionId=<guid>
parcelFeatures

(Required)

The parcel features that will be set as historic or current. The features can be parcels, parcel polygons, parcel points, and parcel lines.

Syntax

parcelFeatures=[{"id":"<guid>","layerId":"<layerID>"},{...}]
setAsHistoric

(Required)

Specifies whether the features will be set as historic (true) or current (false).

Syntax

setAsHistoric= <Boolean>
record

(Required)

The unique identifier (GUID) of the record that will be assigned to the features set as current or historic.

Syntax

record=<guid>
async

Specifies whether the request will be processed as an asynchronous job and a URL that points to a location displaying the status of the job will be returned. See the topic regarding asynchronous usage for more information. The default is false.

Values: true | false

Syntax

async=true|false
f

Specifies the output format of the response. The default response format is html.

Values: html | json

Example usage

This example shows the steps for setting a parcel as historic using the updateParcelHistory operation.

Note:
The sessionId parameter value must be the same for starting the edit session, performing the edit operation, and stopping the edit session.

  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={f24783f6-1e2a-47d6-9505-1b36898d632a}

  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={f24783f6-1e2a-47d6-9505-1b36898d632a}

  3. Set a parcel as historic using the specified record.

    Request URL and parameters:

    
    https://machine.domain.com/webadaptor/rest/services/CountyFabric/ParcelFabricServer/updateParcelHistory
    f=json
    gdbVersion=admin.Version1
    sessionId={f24783f6-1e2a-47d6-9505-1b36898d632a}
    parcelFeatures=[{"id":"{E60840C7-8A91-45BD-85C8-9DDF00BF2C82}","layerId":"13"}]
    setAsHistoric=true
    record={C379E2BB-7F9E-4593-B760-D4E908F8445D}
    async=false
  4. If edits are complete, stop the edit session.
  5. Stop and release the service session.

JSON Response syntax

The following response is returned when async is false:


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

The following response is returned when async is true:


{
		"statusUrl": <url>
}

JSON Response example

The following is a response example when async is false:


{
  "moment": 1570745734610,
  "exceededTransferLimit": false,
  "serviceEdits": [
    {
      "id": 2,
      "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": 1219,
              "IsRetired": 1,
              "GlobalID": "{FAE29AAC-961A-4C83-8EB8-2ED820535625}",
              "created_user": "admin",
              "create_date": 1570745734000,
              "last_edited_user": "admin",
              "last_edited_date": 1570745734000,
              "Shape__Area": 20798.630091624309,
              "Shape__Length": 580.8910761475563
            },
            "geometry": {
              "rings": [
                [
                  [7500809.29035432637, 445965.093503937125],
                  [7500809.29035432637, 446127.375656172633],
                  [7500937.45374016464, 446127.375656172633],
                  [7500937.45374016464, 445965.093503937125],
                  [7500809.29035432637, 445965.093503937125]
                ]
              ]
            }
          }
        ]
      }
    },
    {
      "id": 13,
      "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
        },
        "updates": [
          {
            "attributes": {
              "OBJECTID": 79,
              "Name": "79",
              "ParcelSubtype": 1,
              "CreatedByRecord": "{EDFA0845-B4E4-4B4B-9B4B-D4CDF4908D1F}",
              "RetiredByRecord": null,
              "StatedArea": 15083.0,
              "StatedAreaUnit": null,
              "CalculatedArea": null,
              "MiscloseRatio": 98608.16744183,
              "MiscloseDistance": 0.00529591,
              "IsSeed": 0,
              "created_user": "GIS",
              "create_date": 1570125823000,
              "last_edited_user": "GIS",
              "last_edited_date": 1570125949000,
              "GlobalID": "{E60840C7-8A91-45BD-85C8-9DDF00BF2C82}",
              "RecName": "SP7-1",
              "Shape__Area": 15085.6812471367994,
              "Shape__Length": 525.1310711063993
            },
            "geometry": {
              "hasZ": true,
              "curveRings": [
                [
                  [7500892.46653543413, 446063.351706042886, 0],
                  [7500937.44061680138, 446061.856955379248, 0],
                  [7500935.60531495512, 446006.659776896238, 0],
                  [7500934.22440944612, 445965.106627300382, 0],
                  [7500922.23195537925, 445965.505249351263, 0],
                  [7500809.30347768962, 445969.258202105761, 0],
                  [7500813.68077427149, 446100.981955379248, 0],
                  {
                    "c": [
                      [7500856.152230978, 446127.362532809377, 0],
                      [7500838.91768937, 446107.730526505213]
                    ]
                  },
                  [7500892.46653543413, 446063.351706042886, 0]
                ]
              ]
            }
          },
          {
            "attributes": {
              "OBJECTID": 41,
              "CreatedByRecord": "{EDFA0845-B4E4-4B4B-9B4B-D4CDF4908D1F}",
              "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": 1570479613000,
              "last_edited_user": "admin",
              "last_edited_date": 1570479613000,
              "GlobalID": "{4939E0F3-40E2-44B1-A9C8-3C7D845F68B6}",
              "Shape__Length": 11.9990772193294273
            },
            "geometry": {
              "hasZ": true,
              "paths": [
                [
                  [7500934.22440944612, 445965.106627300382, 0],
                  [7500922.23195537925, 445965.505249351263, 0]
                ]
              ]
            }
          }
        ]
      }
    }
  ],
  "success": true
}