Edit Service

Description

The edit operation enables editing the service sourceItemID, minScale, maxScale, exportTilesAllowed, and maxExportTilesCount parameters.

Parameters

ParameterDetails
f

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

Values: html | json | pjson

serviceDefinition

Description: The service definition.

{

"exportTilesAllowed": false,

"maxExportTilesCount": 100000,

"cacheOnDemand": false,

"capabilities": "Map",

"cacheMaxAge": 600,

"abstract": null,

"metadataLink": null,

"keywords": []

}

sourceItemID

Description: The source item ID is the GeoWarehouse item ID of the map service.

(Source Item ID) 087f5b67b1024523ae91f1069f294364

minScale

Description: The minimum scale value of the map service.

(MinScale) 591657527.591555

maxScale

Description: The maximum scale value of the map service.

(MaxScales) 1128.497176

exportTilesAllowed

Description: Enables or disables the exporting of tiles for a hosted map service.

{exportTilesAllowed : true | false}

maxExportTilesCount

Description: Sets the maximum tile count for exporting tiles for a hosted map service.

{maxExportTilesCount : 500000}

Example usage

Note:
This is an example URL only and is not an active link to an existing service.

https://services.myserver.com/arcgis/rest/admin/services/serviceName/MapServer/edit?f=html

Example 1

Note:
This is an example of how to edit the serviceDefinition "maxExportTilesCount" and "exportTilesAllowed".

https://services.myserver.com/arcgis/rest/admin/services/serviceName/MapServer/edit?serviceDefinition={"maxExportTilesCount":5000,"exportTilesAllowed":true}&token=AddYourToken

JSON Response syntax


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

JSON Response example (when edit succeeds)


            {
  "success" : true
}

JSON Response example (when edit fails)


            {
  "error" : 
  {
    "code" : 400, 
    "message" : "", 
    "details" : [
      "Invalid service definition specified.", 
      "Invalid object passed in, ':' or '}' expected. (521): {\"adminServiceInfo\" : {\"name\" : \"WorldService\", \"type\" : \"MapServer\",....
    ]
  }
}

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