- URL:
- https://<root>/System/PublishingTools/GPServer/Refresh Service
- Methods:
GET
POST
- Version Introduced:
- 10.3
Description
The Refresh Service
operation refreshes image services, or the snapshots of map image layers and feature layers, to reflect backend data changes.
When new rasters are added to the backend mosaic dataset of an image service, the image service information may become outdated and need to be refreshed to reflect those changes. While this can be done by restarting the service, many applications require the service to run without downtime.
The Refresh Service
operation refreshes a service to reflect data changes without restarting the service, and once the refresh is complete the new rasters in the mosaic dataset are immediately accessible to clients. Optionally, the service publisher can advertise the changes to in-use clients through other mechanisms, such as WebSocket.
A typical live image service involves the following configuration:
- For the initial configuration, the service publisher prepares a mosaic dataset in SDE and publishes as an image service.
- The image service is configured with the
has
property set asLive Data true
.
For routine updates, a monitoring program can be used to recognize when new data is available. The program can either monitor the incoming data folder, or be notified by other data processing scripts when new data is added to the backend mosaic dataset.
Request parameters
Parameter | Details |
---|---|
(Required) | The name of the service. Example
|
(Required) | The type of the service. Values: |
| The folder that contains the service. Example
|
| A set of additional options for the request. At this time, no options are available or supported. |
(Optional) | A Boolean that determines if z-values are included as part of the result. If Values: |
(Optional) | A Boolean that specifies whether true curves will be returned in the output geometries ( Values: |
(Optional) | A Boolean that specifies whether geometries should be simplified ( Values: |
(Optional) | Additional settings that affect the result of the operation:
|
| The response format. The default format is Values: |
Example usage
The following are sample requests (GET and POST) for the Refresh Service
operation:
https://machine.domain.com/webadaptor/rest/services/System/PublishingTools/GPServer/Refresh%20Service/submitJob?serviceName=My_Service_Name&serviceType=ImageServer&serviceFolder=MY_Service_Folder&refreshOptions=&returnZ=false&returnM=false&returnTrueCurves=false&simplifyFeatures=true&context=&f=pjson
JSON Response example
When the Refresh Service
job request is submitted, the following JSON response is returned:
{
"jobId": "j5f3aa768e0a24dcfbdff45f379870553",
"jobStatus": "esriJobSubmitted"
}
The value for job
can be appended to a modified version of the request URL (shown below) to access the job
resource:
https://machine.domain.com/webadaptor/rest/services/System/PublishingTools/GPServer/Refresh%20Service/jobs/j5f3aa768e0a24dcfbdff45f379870553?f=pjson
The job
resource can be polled to check the status of the Refresh Service
job.