Delete From Definition (Feature Layer)

Description

The deleteFromDefinition operation supports deleting a definition property in a feature service layer. The result of this operation is a response indicating success or failure with error code and description.

Parameters

Parameter

Details

f

Description: The response format. The default response format is html.

Values: html | json | pjson

deleteFromDefinition

Description: The deleteFromDefinition parameter supports deleting a definition property in a feature service layer.

async

Description: Support options for asynchronous processing. The default format is false.

Values: true | false

Example Usage

Example 1: Delete fields from feature service layer

Example 2: Delete indexes from feature service layer

Example 1: Delete fields from a feature service layer:

http://services.myserver.com/OrgID/ArcGIS/rest/admin/services/example1/FeatureServer/0/deleteFromDefinition

Example input (POST body)

{
  "fields" : [
    {
      "name" : "GlobalID"
    },
    {
      "name" : "date1"
    },
    {   
      "name" : "str2"
    }
  ]
}

JSON Response Syntax

{
  "success": <true|false>,
  "error": {
    "code": <code>,
    "message": "<description>",
    "details": [
      "<message>"
    ]
  }
}

JSON Response Example (when deleteFromDefinition succeeds)

{
  "success" : true
}

JSON Response Example (when deleteFromDefinition fails)

{
  "error" : 
  {
    "code" : 400, 
    "message" : "", 
    "details" : [
      "Unable to delete feature service layer definition."
    ]
  }
}

Example 2: Delete indexes from a feature service layer:

http://services.myserver.com/OrgID/ArcGIS/rest/admin/services/example2/FeatureServer/0/deleteFromDefinition

Example input (POST body)

{
  "indexes" : [
  {
    "name" : "index1"
  },
  {
    "name" : "index2" 
  }
 ]
}

JSON Response Syntax

{
  "success": <true|false>,
  "error": {
    "code": <code>,
    "message": "<description>",
    "details": [
      "<message>"
    ]
  }
}

JSON Response Example (when deleteFromDefinition succeeds)

{
  "success" : true
}

JSON Response Example (when deleteFromDefinition fails)

{
  "error" : 
  {
    "code" : 400, 
    "message" : "", 
    "details" : [
      "Unable to delete feature service layer definition."
    ]
  }
}

9/13/2017