- URL:
- ArcGIS Online:https://packaging.arcgis.com/arcgis/rest/services/OfflinePackaging/GPServer/RefreshMapAreaPackage/submitJobArcGIS Enterprise:https://<catalog-url>/Utilities/OfflinePackaging/GPServer/RefreshMapAreaPackage/submitJob
- Methods:
POST
- Version Introduced:
- 10.6.1
Description
The Refresh Map Area Package task refreshes existing map area packages to update them with changes made on the source data since the last time those packages were created or refreshed.
Request parameters
Parameter | Details |
---|---|
| The supported output format is JSON. Example: |
| An access token that identifies the authenticated user and controls access to restricted resources and operations. |
| A JSON array consisting of packages that need to be refreshed, specified with the ID of each package item. Packages can belong to different map areas. A package item should only be listed if you are the owner of the package item or organization administrators. Example:
|
Response properties
When a job request is submitted, the service assigns a unique job identifier for the transaction. A JSON response with the job ID and job status are returned as below:
{
"jobId": "<jobID>",
"jobStatus": | | | | | | |
}
Check job status
After the initial request is submitted, you can use the job ID to check its status and messages periodically by calling as below:
https://packaging.arcgis.com/arcgis/rest/services/OfflinePackaging/GPServer/RefreshMapAreaPackage/jobs/<jobID>?token=<token>&returnMessages=true&f=json
JSON response syntax during job execution
{
"jobId": "<jobId>",
"jobStatus": "<jobStatus>",
"messages": [
{
"type": "<type1>",
"description": "<description1>"
},
{
"type": "<type2>",
"description": "<description2>"
}
]
}
Retrieve results
When the status of the job is esri
upon its successful completeness, you can retrieve the output results in below form:
https://packaging.arcgis.com/arcgis/rest/services/OfflinePackaging/GPServer/RefreshMapAreaPackage/jobs/<jobID>/results/<outputParameter>?token=<token>&f=json
You can also retrieve the value of any input parameter by calling:
https://packaging.arcgis.com/arcgis/rest/services/OfflinePackaging/GPServer/RefreshMapAreaPackage/jobs/<jobID>/inputs/<inputParameter>?token=<token>&f=json
Upon successful execution, the service returns the list of packages along with their states using the following output parameter:
Parameter | Details |
---|---|
| A JSON object that contains properties for the output parameter name, data type and value. The Supported values for Example:
|
Example usage
Request URL to submit the job
https://packaging.arcgis.com/arcgis/rest/services/OfflinePackaging/GPServer/RefreshMapAreaPackage/submitJob
JSON Response Example
{
"jobId": "j89daf187f78b4ecbae8f10fbeb83a22e",
"jobStatus": "esriJobSubmitted"
}
Check job status
Request URL to query job status
https://packaging.arcgis.com/arcgis/rest/services/OfflinePackaging/GPServer/RefreshMapAreaPackage/jobs/j89daf187f78b4ecbae8f10fbeb83a22e
JSON Response
{
"jobId": "j89daf187f78b4ecbae8f10fbeb83a22e",
"jobStatus": "esriJobExecuting",
"messages": []
}
Retrieve results
Request URL to return output map area item
https://packaging.arcgis.com/arcgis/rest/services/OfflinePackaging/GPServer/RefreshMapAreaPackage/jobs/jdadca3e7f8e84b7c974cc1f47b615761/results/result
JSON Response
{
"paramName": "result",
"dataType": "GPString",
"value": [
{
"itemId": "0de0b83abe014901b2df42cac9e31d2s",
"error": "Error accessing item 0de0b83abe014901b2df42cac9e31d2s",
"state": "unchanged"
},
{
"source": "https://services.arcgis.com/J423vH8fR9HV444k/arcgis/rest/services/myFeatureServiceName/FeatureServer",
"itemId": "96e08c56db8145dab4de2328b058fe97",
"state": "unchanged"
}
]
}