Delete From Definition (Feature Layer)

URL:
https://<adminRoot>/services/<serviceName>/FeatureServer/<layerId>/deleteFromDefinition
Methods:
GET

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.

Request parameters

ParameterDetails

deleteFromDefinition

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

async

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

Values: true | false

f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

Example one: Delete fields from feature service layer

Example two: Delete indexes from feature service layer

Example one: Delete fields from a feature service layer

Below is a sample URL used to access the deleteFromDefinition operation:

Use dark colors for code blocksCopy
1
https://services.myserver.com/OrgID/ArcGIS/rest/admin/services/example1/FeatureServer/0/deleteFromDefinition

Example input for the deleteFromDefinition parameter:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "fields": [
    {
      "name": "GlobalID"
    },
    {
      "name": "date1"
    },
    {
      "name": "str2"
    }
  ]
}

Example two: Delete indexes from a feature service layer

Below is a sample URL used to access the deleteFromDefinition operation:

Use dark colors for code blocksCopy
1
https://services.myserver.com/OrgID/ArcGIS/rest/admin/services/example2/FeatureServer/0/deleteFromDefinition

Example input for the deleteFromDefinition parameter:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
{
  "indexes": [
    {
      "name": "index1"
    },
    {
      "name": "index2"
    }
  ]
}

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
{
  "success": <true|false>,
  "error": {
    "code": <code>,
    "message": "<description>",
    "details": [
      "<message>"
    ]
  }
}

JSON Response example

When deleteFromDefinition succeeds:

Use dark colors for code blocksCopy
1
2
3
{
  "success": true
}

When deleteFromDefinition fails:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
  "error": {
    "code": 400,
    "message": "",
    "details": [
      "Unable to delete feature service layer definition."
    ]
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.