Extract Data
The Extract Data task is used to extract data from one or more layers within a given extent. The extracted data format can be a file geodatabase, shapefiles, csv, or kml. File geodatabases and shapefiles are added to a zip file that can be downloaded.
Request URL
http://<analysis url>/ExtractData/submitJob
Request Parameters
Parameter | Description |
---|---|
inputLayers (Required) | A list of input layers to be extracted. Syntax: As described in detail in the Feature Input topic, this parameter can be
Examples:
|
extent | The extent is the area of interest used to extract the input features. If not specified, all features from each input layer are extracted. Syntax: As described in detail in the Feature Input topic, this parameter can be
|
clip | A Boolean value that specifies whether the features within the input layer are clipped within the extent. By default, features are not clipped and all features intersecting the extent are returned. The default is false. Values: true | false |
dataFormat | A keyword defining the output data format for your extracted data. Values: FILEGEODATABASE | SHAPEFILE | KML | CSV The default is CSV. If FILEGEODATABASE is specified, and the input layer has attachments, the attachments will be extracted to the output file geodatabase if clip is false. If clip is true, attachments will not be extracted. |
outputName | Output name is used to name the item in your My contents page. For more information on these item properties, see the Item resource page in the ArcGIS REST API Syntax:
|
context | Context contains additional settings that affect task execution. For Extract Data, there is one setting.
Syntax:
|
f | The response format. The default response format is html. Values: html | json |
Response
When you submit a request, the service assigns a unique job ID for the transaction.
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}
Checking on job status
After the initial request is submitted you can use the jobId to periodically check the status of the job and messages as described in the topic Checking job status. Once the job has successfully completed, you use the jobId to retrive the results. To track the status, you can make a request of the following form:
http://<analysis url>/ExtractData/jobs/<jobId>
Analysis results
When the status of the job request is esriJobSucceded, you can access the results of the analysis by making a request of the following form:
http://<analysis url>/ExtractData/jobs/<jobId>/results/contentID?token=<your token>&f=json
Parameter | Description |
---|---|
contentID | The result has properties for parameter name, data type, and value. The value property contains the item ID and a URL to the item.
About the item contents:
|