<spatialanalystJobs_uri>/summaryAttributes[.<format>]
The root directory of the summary attributes analysis job resource. By sending a GET request to summaryAttributes, you can get the list of the summary attributes analysis jobs of the current system. By sending a POST request, you can create a analysis task.
Supported Methods:
Supported output formats: RJSON, JSON, HTML, XML.
Execute HTTP request on the following URI, here we take rjosn as the output format as an example. Where, supermapiserver is the server name.
http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/summaryattributes.rjson
Gets the list of summary attributes analysis jobs.
After executing a GET request on the resource, the response entity is a set of summaryAttributes resource descriptions, and the response fields of single resource are as follows:
Field | Type | Description |
id | String | Application ID. |
state | Jobstate | The status of the task. Including execution status, start time, time consuming, and so on. |
setting | SparkJobSetting | Lists the detailed information of task configuration. |
By executing a GET request on this resource, the returned response result in rjosn format is as follows:
{
"id": "b999e6ba_61c7_4c29_9009_5d876469db33",
"setting": {
"DEFAULT_MASTER_ADRESS": "local[*] ",
"analyst": {
"attributeField": "",
"groupField": "",
"resultField": null,
"statisticModes": ""
},
"appName": "SummaryAttributes",
"args": [
"--input",
"{\"sliceNum\":20,\"type\":\"udb\",\"info\":[{\"server\":\"F:\\\\1.package\\\\20171014\\\\supermap_iserver_901_15413_4668_win64_zip\\\\samples\\\\data\\\\ProcessingData\\\\processing.udb\",\"datasetNames\":[\"newyorkZone_R\"]}]}",
"--output",
"{\"server\":\"192.168.120.21\",\"password\":\"supermap\",\"database\":\"supermap2\",\"datasetName\":\"analystResult_1698682527\",\"blockingWrite\":null,\"type\":\"pg\",\"user\":\"postgres\"}"
],
"contextSetting": null,
"input": {
"datasetInfo": {
"available": true,
"bounds": "Left=-74.25551784310493,Bottom=40.496084221255856,Right=-73.70014827248451,Top=40.91538866049913",
"datasetName": "newyorkZone_R",
"datasetType": "REGION",
"epsgCode": 4326,
"name": "samples_processing_newyorkZone_R",
"readOnly": false,
"type": "UDB",
"url": "../../samples/data/ProcessingData/processing.udb"
},
"datasetName": "samples_processing_newyorkZone_R",
"numSlices": 0
},
"mainClass": "com.supermap.bdt.main.SummaryAttributesMain",
"output": {
"datasetName": "analystResult_1698682527",
"datasourceInfo": {
"alias": "supermap2_pg",
"connect": true,
"dataBase": "supermap2",
"driver": "PostgreSQL ANSI",
"engineType": "POSTGRESQL",
"exclusive": false,
"openLinkTable": false,
"password": "supermap",
"readOnly": false,
"server": "192.168.120.21",
"user": "postgres"
},
"outputPath": "F:\\1.package\\20171014\\supermap_iserver_901_15413_4668_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\b999e6ba_61c7_4c29_9009_5d876469db33\\summaryAttributes.smwu",
"type": "pg"
},
"serviceInfo": {
"targetDataPath": "F:\\1.package\\20171014\\supermap_iserver_901_15413_4668_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\b999e6ba_61c7_4c29_9009_5d876469db33\\summaryAttributes.smwu",
"targetServiceInfos": [{
"serviceAddress": "http://192.168.120.21:8090/iserver/services/data-summaryAttributes/rest",
"serviceType": "RESTDATA"
}]
},
"serviceRoot": "http://supermapiserver:8090/iserver/services/",
"sparkLogFile": null
},
"state": {
"elapsedTime": 6177,
"endState": true,
"endTime": 1508224183579,
"errorMsg": null,
"errorStackTrace": null,
"publisherelapsedTime": 1823,
"runState": "FINISHED",
"startTime": 1508224172840
}
}
Creates a summary attributes analysis job.
Parameters passed in the request body should contain:
Name | Type | Description |
input | FileCSVInputDataSetting DatasetInputDataSetting |
[The following parameters are required if not specified] Supports two input ways: 1. datasetName: datasetName: dataset name. Used when the data to be analyzed is the dataset provided by the Data Catalog Service, including data imported through Data Catalog Service, registered data in iServer and datasets stored in DataStore.2. Input file path and the related information. When the data to be analyzed does not belong to Data Catalog Service, you need use this method. Supported file formats: csv file, udb file, pg database. For detailed parameters' description, see: Big data analysis input parameter settings. |
analyst | SummaryAttributesAnalystSetting | [Optional] Analysis settings. You need to specify:
|
output | FileSystemOutputSetting DatabaseOutputSetting |
[Optional] The output of analysis result. Supported output formats: local udb file, database (pg, mongodb). For detailed parameter settings, see: Big data analysis input parameter settings. |
Execute a POST request on summaryAttributes resource to create a summary attributes analysis job: http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/summaryattributes.rjson with the following request body which contains a registered dataset name as the input parameter:
{
"input": {
"datasetName": "samples_processing_newyorkZone_R"
},
"analyst": {
"groupField": "borough",
"attributeField": "LocationID",
"statisticModes": "max"
}
}
then the returned resource in rjson format is as follows:
{
"newResourceID": "740e3864_4698_4cf2_aa2a_3e25282bcac7",
"newResourceLocation":"http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/summaryattributes/740e3864_4698_4cf2_aa2a_3e25282bcac7",
"postResultType": "CreateChild",
"succeed": true
}
Execute a POST request on summaryAttributes resource to create a summary attribute analysis job: http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/summaryattributes.rjson with the following request body which contains a piece of data stored in PostgreSQL database as the input parameter:
{
"input": {
"datasetInfo": {
"type": "REGION",
"name": "newyorkZone_R_657101200",
"datasourceConnectionInfo": {
"engineType": "POSTGRESQL",
"dataBase": "supermap",
"password": "supermap",
"user": "postgres",
"server": "192.168.120.21"
}
}
},
"analyst": {
"groupField": "borough",
"attributeField": "LocationID",
"statisticModes": "min"
}
}
then the returned resource in rjson format is as follows:
{
"newResourceID": "6bb40d00_e89b_493d_b787_e0e82fd4fc57",
"newResourceLocation": "http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/summaryattributes/6bb40d00_e89b_493d_b787_e0e82fd4fc57",
"postResultType": "CreateChild",
"succeed": true
}
Returns the same HTTP response header as the GET request, but no response entity, which can be used to retrieve the meta data contained in response message header without having to transmit the entire response content. Meta data information includes media type, character coding, compression coding, entity content length, etc.
HEAD request is used to determine whether the summaryAttributes resource exists, or if the user has the authority to access it. By executing an HEAD request with a .<format> URI, you can quickly determine whether the summaryAttributes resource supports the <format> representation.