service


URI

<services_uri>/{id}[.<format>]

Supported methods

GET, PUT, DELETE, HEAD

Parent resource

services

Child resources

serviceCheckStatus, serviceOffline, serviceShareSetting, serviceStatus

Introduction

The service resource refers to the specified service or service collection. It supports searching, updating and deleting, as well as iso19139 media type.

Supported Methods:

Supported formats: rjson, json, html, xml.

Resource hierarchy

HTTP request methods

Implement the HTTP request on the following URI, where supermapiportal is the server name, with rjson being the output format.

http://supermapiportal:8090/iportal/web/services/{id}.rjson

GET request

Get the specified service or service collection.

Response structure

Execute GET request for the service resource, and get the specified service or service collection information. The fields are composed of:

Field Type Description
addedMapNames Set<String> List of names of the maps under the service (optional fields when registering for service).
addedSceneNames Set<String> List of names of the scenes under the service (optional fields when registering for service).
authorizeSetting List<IportalAuthorizeEntity> Authorized information.
checkStatus CheckStatus The checking status
createTime Long Register time of the service.
description String Service description information.
enable Boolean Service is enabled or not.
id Integer Register ID of the service
isBatch Boolean Whether to register in batch.
isDataItemService Boolean Indicate whether the registered service is from by publishing the uploaded data.
linkPage String Service link URL
mapInfos List<MapInfo> The map list in the service.

metadata

Metadata

The metadata of the service.
nickname String User's nickname
offline Boolean Service is offline or not.
proxiedUrl String Address after enabling service proxy.
resTitle String Service name.
scenes List<ServiceSceneInfo> The list of 3D scenes contained in the service.
serviceRootUrlId Integer The ID of the service root URL for this registered service.
tags List<String> Service tag.
thumbnail String Thumbnail path of the service.
type SourceType Service type.
updateTime Long Update time.
userName String User ID.
verifyReason String The checking comments.
version String Service version, such as WMS 1.3.0.
visitCount Integer The number of service visits, the parameters is available only when the service proxy function is enabled.

Response example

The returned rjson format representation after implementing the GET request on the service resource http://localhost:8090/iportal/web/services/111.rjson is as follows:

{

    "addedMapNames": null,

    "addedSceneNames": null,

    "authorizeSetting": [

        {

            "aliasName": "admin",

            "entityId": null,

            "entityName": "admin",

            "entityType": "USER",

            "permissionType": "DELETE"

        }

    ],

    "checkStatus": "SUCCESSFUL",

    "createTime": 1473737605014,

    "description": "",

    "enable": true,

    "id": 1,

    "isBatch": false,

    "isDataItemService": false,

    "linkPage": "http://192.168.120.40:8091/iserver/services/map-changchun/rest",

    "mapInfos": [

        {

            "id": null,

            "mapThumbnail": "http://192.168.120.40:8091/iserver/services/map-changchun/rest/maps/ChangchunCityMap/entireImage.png",

            "mapTitle": "ChangchunCityMap",

            "mapUrl": "http://192.168.120.40:8091/iserver/services/map-changchun/rest/maps/ChangchunCityMap",

            "serviceId": 1

        },

        {

            "id": null,

            "mapThumbnail": "http://192.168.120.40:8091/iserver/services/map-changchun/rest/maps/ChangchunCityMap_Local/entireImage.png",

            "mapTitle": "ChangchunCityMap_Local",

            "mapUrl": "http://192.168.120.40:8091/iserver/services/map-changchun/rest/maps/ChangchunCityMap_Local",

            "serviceId": 1

        }

    ],

    "metadata": {

        "contInfo": null,

        "createdBy": null,

        "dataIdInfo": {

            "dataIdent": {

                "aggrInfo": null,

                "dataChar": null,

                "dataExt": {

                    "exDesc": "",

                    "geoEle": {

                        "geoBndBox": {

                            "eastBL": 0,

                            "northBL": 0,

                            "southBL": 0,

                            "westBL": 0

                        }

                    }

                },

                "dataLang": null,

                "dataScale": null,

                "dsFormat": null,

                "graphOver": null,

                "idAbs": "",

                "idCitation": {

                    "resEd": null,

                    "resRefDate": null,

                    "resTitle": "changchun"

                },

                "idPoC": null,

                "idPurp": null,

                "idStatus": null,

                "keyword": null,

                "refTheme": null,

                "resConst": null,

                "resSubType": null,

                "resType": null,

                "spatRpType": null,

                "tpCat": null

            },

            "serIdent": null

        },

        "distInfo": {

            "distFormat": null,

            "distributor": null,

            "onLineSrc": {

                "linkage": "http://192.168.120.40:8091/iserver/services/map-changchun/rest",

                "orDesc": null,

                "orFunct": null

            }

        },

        "dqInfo": null,

        "mdChar": null,

        "mdContact": {

            "role": null,

            "rpCntInfo": {

                "cntAddress": {

                    "EMailAdd": "",

                    "adminArea": null,

                    "city": null,

                    "country": null,

                    "delPoint": "",

                    "postCode": null

                },

                "cntOnLineRes": null,

                "faxNum": "",

                "voiceNum": ""

            },

            "rpIndName": "",

            "rpOrgName": "",

            "rpPosName": null

        },

        "mdDateSt": null,

        "mdFileID": null,

        "mdLang": null,

        "mdStanName": null,

        "mdStanVer": null,

        "refSysInfo": {

            "mdCoRefSys": {

                "datum": null,

                "ellipsoid": null,

                "longCntMer": 0,

                "projection": "WGS84",

                "zone": 0,

                "zoneMethod": null

            },

            "refSysID": ""

        },

        "spatRepInfo": null

    },

    "metadataString": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<smmd:Metadata xmlns:smmd=\"http://data.sbsm.gov.cn/smmd/2007\">\n    <smmd:mdContact>\n        <smmd:rpIndName></smmd:rpIndName>\n        <smmd:rpOrgName></smmd:rpOrgName>\n        <smmd:rpCntInfo>\n            <smmd:cntAddress>\n                <smmd:delPoint></smmd:delPoint>\n                <smmd:eMailAdd></smmd:eMailAdd>\n            </smmd:cntAddress>\n            <smmd:voiceNum></smmd:voiceNum>\n            <smmd:faxNum></smmd:faxNum>\n        </smmd:rpCntInfo>\n    </smmd:mdContact>\n    <smmd:dataIdInfo>\n        <smmd:DataIdent>\n            <smmd:idCitation>\n                <smmd:resTitle>changchun</smmd:resTitle>\n            </smmd:idCitation>\n            <smmd:idAbs></smmd:idAbs>\n            <smmd:dataExt>\n                <smmd:geoEle>\n                    <smmd:GeoBndBox>\n                        <smmd:westBL>0.0</smmd:westBL>\n                        <smmd:eastBL>0.0</smmd:eastBL>\n                        <smmd:southBL>0.0</smmd:southBL>\n                        <smmd:northBL>0.0</smmd:northBL>\n                    </smmd:GeoBndBox>\n                </smmd:geoEle>\n                <smmd:exDesc></smmd:exDesc>\n            </smmd:dataExt>\n        </smmd:DataIdent>\n    </smmd:dataIdInfo>\n    <smmd:refSysInfo>\n        <smmd:MdCoRefSys>\n            <smmd:projection>WGS84</smmd:projection>\n            <smmd:longCntMer>0.0</smmd:longCntMer>\n            <smmd:zone>0</smmd:zone>\n        </smmd:MdCoRefSys>\n        <smmd:refSysID></smmd:refSysID>\n    </smmd:refSysInfo>\n    <smmd:distInfo>\n        <smmd:onLineSrc>\n            <smmd:linkage>http://192.168.120.40:8091/iserver/services/map-changchun/rest</smmd:linkage>\n        </smmd:onLineSrc>\n    </smmd:distInfo>\n</smmd:Metadata>\n",

    "nickname": "admin",

    "offline": false,

    "proxiedUrl": null,

    "resTitle": "changchun",

    "scenes": [],

    "serviceRootUrlId": null,

    "tags": [

        "changchun"

    ],

    "thumbnail": null,

    "type": "MAP",

    "updateTime": 1473737637815,

    "userName": "admin",

    "verifyReason": null,

    "version": null,

    "visitCount": 0

}

PUT request

Update specified service or service collection. Only users who register the service and portal administrators have rights to update the services.

Request parameter

Following arguments need to be included in the request sent.

Field Type Description
authorizeSetting List<IportalAuthorizeEntity> Authorized information. The service types include DELETE, READ, READWRITE.
tags List<String> Service tag.

metadata

Metadata

The metadata of the service.
thumbnail String The thumbnail path of the service.

Response structure

The structure of the response resource representation is as follows:

Field Type Description
succeed boolean Whether new service is updated successfully or not.
error Httperror Error information. This field will not be displayed if it is updated successfully.

Response example

Modify the service name, and execute PUT request for the service resource http://localhost:8090/iportal/web/services/111.json. The request body is as follows:

{

    "tags": [

        "changchun"

    ],

    "authorizeSetting": [],

    "metadata": {

        "mdContact": {

            "rpIndName": "",

            "rpOrgName": "",

            "rpCntInfo": {

                "cntAddress": {

                    "delPoint": "",

                    "eMailAdd": ""

                },

                "voiceNum": "",

                "faxNum": ""

            }

        },

        "refSysInfo": {

            "mdCoRefSys": {

                "projection": "WGS84"

            },

            "refSysID": ""

        },

        "dataIdInfo": {

            "dataIdent": {

                "idCitation": {

                    "resTitle": "changchun1"

                },

                "dataExt": {

                    "geoEle": {

                        "geoBndBox": {

                            "westBL": "0",

                            "eastBL": "0",

                            "southBL": "0",

                            "northBL": "0"

                        }

                    },

                    "exDesc": ""

                },

                "idAbs": ""

            }

        },

        "distInfo": {

            "onLineSrc": {

                "linkage": "http://192.168.120.40:8091/iserver/services/map-changchun/rest"

            }

        }

    },

    "thumbnail": null

}

The rjson format returned is as follows:

{ "succeed": true}

DELETE request

Delete the specified service or service collection.

Response example

The returned rjson format representation after implementing the DELETE request on the service resource http://localhost:8090/iportal/web/services/3.rjson is as follows:

{ "succeed": true}

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 service resource exists, or if the service resource can be accessed by clients. It can also determine if the service resource supports an output format <format> if performed on a URI with .<format> included.

See