Delete parcels

Description

Deletes parcels and updates the associated record polygon. Deletes the parcel polygon and deletes the parcel lines and points if they are not associated with any other parcels.

Learn more about deleting 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 is editing a named version, the session ID is required. If the specified version is currently locked by any other session, the request will fail if the session ID is not provided or does not match the session ID that holds the exclusive lock. If the client is editing the default version, the session ID is not required.

Syntax

sessionId=<guid>
parcels

Parameter representing the parcels to be deleted.

Syntax

parcels=[{"id":"<parcelguid>","layerId":"<layerID>"},{...}]
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 deleting a parcel using the deleteParcels 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. 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"}]
    
  4. If edits are complete, stop the edit session.
  5. Stop and release the service session.

JSON Response syntax

{
  "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>
    }
  ]
}

JSON Response example

{
  "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
}