Skip To Content

Delete parcels

Description

The deleteParcels operation deletes parcels and updates the associated record polygon. It deletes parcel polygons as well as the parcel lines and points if they are not associated with any other parcels.

Learn more about deleting parcels

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>
parcels

The parcels that will be deleted.

Syntax

parcels=[{"id":"<parcelguid>","layerId":"<layerID>"},{...}]
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 deleting a parcel using the deleteParcels 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={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. Delete a single parcel.

    Request URL and parameters:

    
    https://machine.domain.com/webadaptor/rest/services/CountyFabric/ParcelFabricServer/deleteParcels
    f=json
    gdbVersion=admin.Version1
    sessionId={bba242fc-e671-4aa2-83d4-1c013347fa4f}
    parcels=[{"id":"{BECEBF25-9DFA-4FA3-9A8C-F6738E55DFC3}","layerId":"10"}]
    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>},
          "deletes": [
            {
              "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": 1570488938750,
  "exceededTransferLimit": false,
  "serviceEdits": [
    {
      "id": 5,
      "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},
          "deletes": [
            {
              "attributes": {
                "ObjectID": 1,
                "OriginClassID": 120,
                "OriginID": 1,
                "DestClassID": 0,
                "DestID": 0,
                "TopoRuleType": 63,
                "TopoRuleID": 10,
                "IsException": 0,
                "GlobalID": "{762030E7-B8E9-4530-9116-7145CB55E8CD}",
                "created_user": "admin",
                "create_date": 1570479604000,
                "last_edited_user": "admin",
                "last_edited_date": 1570479604000,
                "Shape__Area": 210.26616475628785,
                "Shape__Length": 198.005644447414227
              },
              "geometry": {
                "rings": [
                  [
                    [7500935.60531495512, 446006.659776896238],
                    [7500934.22440944612, 445965.106627300382],
                    [7500933.66141732037, 445965.125328078866],
                    [7500933.66141732037, 446061.982611551881],
                    [7500937.44061680138, 446061.856955379248],
                    [7500935.60531495512, 446006.659776896238]
                  ]
                ]
              }
            }
          ]
        }
      },
      {
        "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},
            "deletes": [
              {
                "attributes": {
                  "OBJECTID": 1,
                  "Name": "79_(1)",
                  "ParcelSubtype": 1,
                  "CreatedByRecord": null,
                  "RetiredByRecord": null,
                  "StatedArea": 15083.0,
                  "StatedAreaUnit": null,
                  "CalculatedArea": null,
                  "MiscloseRatio": 98607.50818911,
                  "MiscloseDistance": 0.00529595,
                  "IsSeed": 0,
                  "created_user": "GIS",
                  "create_date": 1570125893000,
                  "last_edited_user": "GIS",
                  "last_edited_date": 1570125893000,
                  "GlobalID": "{BECEBF25-9DFA-4FA3-9A8C-F6738E55DFC3}",
                  "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]
                    ]
                  ]
                }
              }
            ]
          }
        }
      }
    }
  ],
  "success": true
}