- URL:
- https://<catalog-url>/System/PublishingTools/GPServer/Refresh Service
- Methods:
GET
- Version Introduced:
- 10.3
Description
Refresh Service is used by the service publisher to refresh a GIS service to reflect back-end data changes.
Only image services are supported by this tool. Valid input image services must have been configured as has
through ArcGIS Server Manager Manager.
Use cases and example workflow
When new rasters are added to the back-end mosaic dataset of an image service, the image service information (such as source resolution, spatial extent, multidimensional information, and time extent) may be 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. The Refresh
task can fulfill this requirement.
A typical live image service workflow involves the following the initial configuration and routine updates, which may be automated. For initial configuration, the service publisher prepares a mosaic dataset in SDE and publishes as an image service. The image service is configured with the property has
set as true
.
Four route updates, a monitoring program recognizes when new data is available. It can monitor an incoming data folder or be notified by other data processing scripts. New data is added to the back-end mosaic dataset; other necessary processing steps are taken and indexes are rebuilt.
If the new rasters alter the mosaic dataset's resolution, extent, time extent, or multidimensional information, the Refresh
task needs to be invoked. The service does not need to be restarted, and the new rasters in the mosaic datasets are accessible to clients immediately. Optionally, the service publisher can advertise the changes to in-use clients through other mechanisms, such as WebSocket.
Request parameters
Parameter | Details |
---|---|
(Required) | The name of the service. Example
|
(Required) | The type of the service. Values: |
| The folder that contains the service.
|
| Additional options to refresh the service. |
| The response format. The default format is Values: |
Example usage
Example one: arcpy example
Below is a sample arcpy request. This operation requires either publisher or administrator privileges.
import arcpy
arcpy.ImportToolbox(r'c:\ags\host.ags;System/PublishingTools')
arcpy.PublishingTools.RefreshService("Portland","ImageServer","#","#")
Example two: REST example
Below is a sample REST request. This operation requires either publisher or administrator privileges.
Submit job:
url: https://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: https://localhost:6080/arcgis/rest/services/System/PublishingTools/GPServer/Refresh
Service/jobs/My_job_id
post content:
f=json&token=My_ags_token