Quickly publishing GIS services with REST API

Feedback


REST API in SuperMap iServer can quickly publish GIS services, which can be realized by POST request of workspaces resources, currently only supports UGC workspace data.

The REST access method needs verification information like containing Cookie in the header of the HTTP request. The protected REST resource can also be accessed based on Token, in which Cookie can be gotten when login while SuperMap Token can be get with the token resource.

Sample: With the workspaces resources, you can quickly publish the workspace, and create the REST map service, REST data service and WMS111 service, and carry token=9AUyV9QOpTARW-Zj1yybXZM2718buccAX0i6yPTLbQ6OO5BlhP7QE71Dz0RylqkdH33rU3-ZYxslYR-ay0XnXA.. .

Send the POST request to the workspaces resource:

http://localhost:8090/iserver/manager/workspaces.rjson?returnContent=true&token=9AUyV9QOpTARW-Zj1yybXZM2718buccAX0i6yPTLbQ6OO5BlhP7QE71Dz0RylqkdH33rU3-ZYxslYR-ay0XnXA..

Publish World.sxwu as data service, map service and WMS1.1.1 service and introduce the rjson request body as illustrated below:

{

    "servicesTypes": ["RESTMAP", "RESTDATA", "WMS111"],

    "workspaceConnectionInfo": "../samples/data/World/World.sxwu"

}

Where

"workspaceConnectionInfo":"server=orcl203;username=test;password=test;type=ORACLE;database=;name=testWorkSpace;driver=null"

After sending the above POST request, the server returns a created list of services as follows:

[{

    "serviceAddress": "http://localhost:8090/iserver/services/map-world2/rest",

    "serviceType": "RESTMAP"

},

{

    "serviceAddress": "http://localhost:8090/iserver/services/data-world2/rest",

    "serviceType": "RESTDATA"

},

{

    "serviceAddress": "http://localhost:8090/iserver/services/map-world2/wms111",

    "serviceType": "WMS111"

}]

Namely addresses of the three quickly created service instances, in which if the service component name is repeated, then it will automatically increase the number suffix like map-world2.