- URL:
- https://<root>/System/PublishingTools/GPServer/GetServiceDatastoreInfo/submitJob
- Methods:
GET
POST
- Version Introduced:
- 11.4
Description
The Get
operation lists the data stores a service uses, and how specifically the service uses the data stores. This operation only supports checking the data stores of a map service. The Get
operation should be performed as the first step in moving a map service from one organization to another. For more information on this workflow, and supported service types, see the Export Service documentation.
Request parameters
Parameter | Details |
---|---|
(Required) | The service's name.
|
(Required) | The service type. The only supported value is |
(Optional) | The name of the folder the service is located in.
|
(Optional) | 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 Get
operation:
https://machine.domain.com/webadaptor/rest/services/System/PublishingTools/GPServer/GetServiceDatastoreInfo/submitJob?serviceName=MapServiceByreference_Egdb&serviceType=MapServer&serviceFolder=&options=&returnZ=false&returnM=false&returnTrueCurves=false&simplifyFeatures=true&context=&f=pjson
POST /webadaptor/rest/services/System/PublishingTools/GPServer/GetServiceDatastoreInfo/submitJob HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
serviceName=MapServiceByreference_Egdb&serviceType=MapServer&serviceFolder=&options=&returnZ=false&returnM=false&returnTrueCurves=false&simplifyFeatures=true&context=&f=pjson
JSON Response example
The tabbed sections below outline the workflow to obtain data store information for a service.
When the Get
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/GetServiceDatastoreInfo/jobs/j5f3aa768e0a24dcfbdff45f379870553?f=pjson
The job
resource can be polled to check the status of the Get
job. When the job is completed successfully, the following JSON response is returned:
{
"jobId": "j5f3aa768e0a24dcfbdff45f379870553",
"jobStatus": "esriJobSucceeded",
"results": {
"exportedData": {
"paramUrl": "results/datastoreInfo"
}
},
"inputs": {
"serviceName": {
"paramUrl": "inputs/serviceName"
},
"serviceType": {
"paramUrl": "inputs/serviceType"
}
},
"messages": [
{
"type": "esriJobMessageTypeInformative",
"description": "Start Time: Friday, September 20, 2024 5:24:24 PM"
},
{
"type": "esriJobMessageTypeInformative",
"description": "Succeeded at Friday, September 20, 2024 5:24:27 PM (Elapsed Time: 2.84 seconds)"
}
]
}
The value for the datastore
property's param
can be appended to the job resource URL to access the datastore
resource:
https://machine.domain.com/webadaptor/rest/services/System/PublishingTools/GPServer/GetServiceDatastoreInfo/jobs/j0754c83d71884311a53b9d3018d40500/results/datastoreInfo
The datastore
resource returns the following JSON response:
{
"paramName": "datastoreInfo",
"dataType": "GPString",
"value": {
"serviceName": "MapServiceByreference_Egdb",
"serviceType": "MapServer",
"serviceFolder": "",
"datastores": [
{
"id": "9cd5cdbbb62342b38a881186c29ff744",
"path": "/enterpriseDatabases/EGDB_shared_db",
"type": "egdb"
}
],
"datasets": [
{
"id": "7",
"datasetName": "USER1.States",
"datasetType": "esriDTFeatureClass",
"datastoreID": "9cd5cdbbb62342b38a881186c29ff744"
},
{
"id": "33",
"datasetName": "USER1.Signposts_Streets",
"datasetType": "esriDTTable",
"datastoreID": "9cd5cdbbb62342b38a881186c29ff744"
}
],
"layers": [
{
"id": 2,
"datasetID": "7",
"name": "States",
"type": "Feature Layer",
"byRef": true
},
{
"id": 5,
"datasetID":"33",
"name": "Streets_table",
"type": "esriDTTable",
"byRef": true
}
]
}
}