Refresh Service

Description

Refresh Service is a new task in the existing out-of-the-box PublishingTools geoprocessing service used by the service publisher to refresh a GIS service to reflect backend data changes.

At 10.3, only image services are supported by this tool. Valid imput image services must have been configured hasLiveData:true thorugh ArcGIS Server Manager.

Use cases and example workflow

When new rasters are added to the backend mosaic dataset of an image service, the image service info (such as source resolution, spatial extent, multidimensional info and time extent) maybe outdated, and needs to be refreshed to reflect data changes. While this can be done by restarting the service, many applications require the service to run without downtime --- This Refresh Service tool can fullfill this requirement.

A typical "Live Image Service" workflow involves the following:

Initial configuration:

Routine updates (may be automated):

Request Parameters

Parameter

Details

serviceName

required.The name of the service

serviceType

required. The type of the service, e.g. "ImageServer"

serviceFolder

The folder that contains the service.

refreshOptions

Additional options to refresh the service

Request Examples

Arcpy example (requires publisher/admin privileges):

import arcpy
arcpy.ImportToolbox(r'c:\ags\host.ags;System/Publishing Tools')
arcpy.PublishingTools.RefreshService("Portland","ImageServer","#","#")

REST example (requires publisher/admin privileges):

Submit job:
url: http://localhost:6080/arcgis/rest/services/System/PublishingTools/GPServer/Refresh 
Service/submitJob

post content: 
serviceName=MY_Service_Name&serviceType=ImageServer&serviceFolder=MY_Service_Folder&f=json&token=My_ags_token

Pool job status:
url: http://localhost:6080/arcgis/rest/services/System/PublishingTools/GPServer/Refresh 
Service/jobs/My_job_id

post content:
f=json&token=My_ags_token

10/6/2017