FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.2   R E S T   R E P O S I T O R Y   U T I L I T Y

Delete Item Endpoint

Deletes an item in the repository.

 

Availability: Business Analyst Server.

 

URL Example

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/DeleteItem/execute

Parameters

Parameter

Description

WorkspaceName (required)

Workspace name. Type string.

ProjectName (required)

Project name. Type string.

FolderType (required)

Folder type to create item. Type esriFolderType.

ItemName (required)

Item name. Type string.

f (optional)

Response format. Type string. Available formats: HTML, JSON, PJSON, XML.

Default: HTML.

token

Authentication token. This parameter is required if your Business Analyst Server is secured. Type string.

Returns

Variable of type boolean

Remarks

If the item is absent, this method has no effect.

Example Usage

The example below demonstrates the deletion of an existing folder item in Business Analyst Server Repository.

 

STEP 1: Upload Custom Feature Set

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/UploadFeatureSet/execute?
FeatureSet={"Recordset":{
  "geometryType":"esriGeometryPolygon",
  "spatialReference":{"wkid":4269},
  "features":[
    {
      "geometry":{
        "rings":[[
          [-122.4346,37.8566476371076],[-122.360655858915,37.826739954428],
          [-122.347749703146,37.761714833162],[-122.406398364369,37.7151967133423],
          [-122.488250155425,37.7254855017619],[-122.525947479981,37.784114591287],
          [-122.488335196333,37.8427896412311],[-122.4346,37.8566476371076]
        ]],
        "spatialReference":{"wkid":4269}
      },
      "attributes":{"AREA_ID":"1_1","STORE_ID":"1","RING":1,"RING_DEFN":"5","AREA_DESC":"0 - 5 Miles"}
    },
    {
      "geometry":{
        "rings":[[
          [-122.4329,37.8057482650651],[-122.35900658434,37.775840365754],
          [-122.346109142864,37.7108146974946],[-122.404717633044,37.6642961225184],
          [-122.48651348554,37.6745850161913],[-122.524184911958,37.7332146557964],
          [-122.486598312884,37.791890171551],[-122.4329,37.8057482650651]
        ]],
        "spatialReference":{"wkid":4269}
      },
      "attributes":{"AREA_ID":"2_1","STORE_ID":"2","RING":1,"RING_DEFN":"5","AREA_DESC":"0 - 5 Miles"}
    }
  ]
}}&
OutputAnalysisItem={
  "workspaceName":"Default Workspace",
  "projectName":"Default Project",
  "folderType":"esriFolderTradeAreas",
  "itemName":"existingItem_DeleteItem"
}&
f=PJSON

 

STEP 2: Execute the DeleteItem request

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/DeleteItem/execute?
WorkspaceName=Default Workspace&
ProjectName=Default Project&
FolderType=esriFolderTradeAreas&
ItemName=existingItem_DeleteItem&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"OutputStatus",
      "dataType":"GPBoolean",
      "value":true
    }
  ],
  "messages":
  [
  ]
}

 

In attempt to delete a missing item, the false value is returned in the case of shapefile-based repository and an error message is returned in the case of SDE-based repositury:

 

Response from a Shapefile-Based Repository

{
  "results":
  [
    {
      "paramName":"OutputStatus",
      "dataType":"GPBoolean",
      "value":false
    }
  ],
  "messages":
  [
  ]
}

 

Response from a SDE-Based Repository

{
  "error":
  {
    "code":-2147467259,
    "message":"Failed to delete folder item.",
    "details":
    [
      "Error code: 0x80004005\n...\n"
    ]
  },
  "messages":
  [
  ]
}

 

NOTE: The response has been abbreviated where "..." is noted.

 

See Also

Business Analyst Server REST Reference