<services_uri>/{component}/rest[.<format>]
<services_uri>/{component}/restjsr[.<format>]
For {component}/rest, the {component}can be component name or the component set name. Each module in REST API uses the corresponding component name, which corresponds to the service that is published by SuperMap iServer by default.
<services_uri>/{component}/rest/{version}[.<format>] is used for address matching service and distributed analysis service. Where, the {version} represents version number, the {component} includes:
maps, realspace, data, spatialAnalyst, networkAnalyst, trafficTransferAnalyst, facilityAnalyst3D, plot, processingJobs,datacatalog, address
The root resource is the root node for SuperMap iServer REST services and the entry for accessing REST services. {component} can be the name of a component or component set, indicating the source of the REST service. In the default services published by SuperMap iServer, the URI for the root directory including all REST service entries is:
http://<server>:<port>/iserver/services/components-rest/rest[.<format>]
where components-rest is the name of the component set, which includes components such as map, data and 3D, etc.
Supported Methods:
Supported output formats: rjson, json, html, xml.
Execute the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.
http://supermapiserver:8090/iserver/services/components-rest/rest.rjson
Gets the representation of the root resource, or the entry of the services provided by the server.
If you execute the GET request on the root resource, a descriptive set for the resources will be included in the entity body of the response message. The representation structure for each resource is as follows:
Field | Type | Description |
name | String | The resource name. |
path | String | The path for accessing the resource. |
resourceConfigID | String | The configuration item ID of the resource. |
resourceType | String | The resource type. |
supportedMediaTypes | String[] | The media-type of the supported representation. |
Execute the GET request on the root resource with http://supermapiserver:8090/iserver/services/components-rest/rest.rjson to get the response in rjson format, as shown below:
[
{
"name": "maps",
"path": "http://supermapiserver:8090/iserver/services/components-rest/rest/maps",
"resourceConfigID": "maps",
"resourceType": "CatalogList",
"supportedMediaTypes": [
"application/xml",
"text/xml",
"application/json",
"application/rjson",
"text/html"
]
},
{
"name": "realspace",
"path": "http://supermapiserver:8090/iserver/services/components-rest/rest/realspace",
"resourceConfigID": "realspace",
"resourceType": "CatalogList",
"supportedMediaTypes": [
"application/xml",
"text/xml",
"application/json",
"application/rjson",
"text/html"
]
},
{
"name": "data",
"path": "http://supermapiserver:8090/iserver/services/components-rest/rest/data",
"resourceConfigID": "data",
"resourceType": "CatalogList",
"supportedMediaTypes": [
"application/xml",
"text/xml",
"application/json",
"application/rjson",
"text/html"
]
}
]
Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.
The HEAD request helps check the existence of the root resource and whether it can be accessed by the client. By executing the HEAD request on the URI, with .<format> appended to the end, we can quickly get to know whether the root resource supports the representation in <format> or not.