instance


URI

<instances_uri>/{serviceName}[.<format>]

Supported methods

GET, PUT, HEAD

Parent resource

instances

Introduction

 The service instance resource. Service instance configuration information, such as service components, component sets, service interfaces corresponding to the instance can be acquired through the instance resource.

Supported Methods:

Supported output formats: rjson, json, html, xml.

Resource hierarchy

HTTP request methods

Implement the HTTP request on the following URI, where supermapiserver is the server name, {scname} is the service component name, {siname} is the service interface name, and the service instance name {serviceName} is composed of {scname} and {siname}. The result will be presented in rjson format.

http://supermapiserver:8090/iserver/manager/instances/{scname}/{siname}.rjson

GET request

Gets the configuration information of the service instance.

Response structure

The returned resource representation structure is as follows after implementing the GET request on the instance resource (resource representation is in the entity body of the response message):

Field Type Description
authorizeSetting AuthorizeSetting The authorization setting.
componentName String Name of the consumed service component.
componentSetName String Name of the consumed service component set.
componentType String Name of the consumed service component.
enabled boolean Whether the current service instance is usable. The default is true, indicating usable.
id String ID of the service instance.
interfaceName String Name of the consumed service interface.
interfaceType String Type of the consumed service interface.
name String Name of the current service instance.
Status String The service status information, the value can be INITIALIZING, OK or FAILED, indicating service is being initialized, service has been started successfully, or service failed to start respectively. While the value of enabled is false, the value of state is DISABLED.

Response example

Suppose we implement the GET request on the service instance http://localhost:8090/iserver/manager/instances/map-china400/rest.rjson, the returned representation in rjson format for the map-china400/rest service instance is as follows:

{

    "authorizeSetting": {

        "deniedRoles": [],

        "permittedRoles": [],

        "type": "PUBLIC"

    },

    "componentName": "map-china400",

    "componentSetName": null,

    "componentType": "com.supermap.services.components.impl.MapImpl",

    "enabled": true,

    "id": null,

    "interfaceName": "rest",

    "interfaceType": null,

    "name": "map-china400/rest",

    "status": "OK"

}

 

HEAD request

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.

HEAD request can be used to check if the instance resource exists, or if the instance resource can be accessed by clients. It can also determine if the instance resource supports an output format <format> if performed on a URI with .<format> included.

See