URI

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

Supported methods

GET, PUT, DELETE, HEAD

Parent resource

scenes

Child resources

sceneShareSetting

Introduction

The scene resource is a detailed information resource for the specified scene. Scene can be searched, updated and deleted.

Supported Methods:

  • GET: Gets detailed information of the specified scene.
  • PUT: Updates information of the specified scene.
  • DELETE: Deletes the specified scene.
  • HEAD: Checks whether the scene resource exists or whether it has permission to access the resource.

Supported output 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/scenes/{id}.rjson

GET request

Get detailed information of the specified scene.

Response structure

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

Field Type Description
authorizeSetting List<IportalAuthorizeEntity> Authorized information of the 3D scene.
createTime Long Time of 3D scene created.
description String Description of 3D scene.
id Integer ID of 3D scene.
name String the name of the 3D data corresponding to the scene layer name in the SuperMap scene.
nickname String Nickname of 3D scene.
tags List<String> Tag of 3D scene.
thumbnail String The thumbnail path of the scene.
updateTime Long The updating time of 3D scene.
url String The 3D scene URL. e.g.,: http://ip:port/iportal/services/realspace-sample/rest/realspace/scenes/scene
userName String User name of 3D scene.
visitCount Integer Visit count of 3D scene.

Response example

The returned rjson format representation after implementing the GET request on the scene resource http://localhost:8090/iportal/web/scenes/6.rjson is as follows:

{

    "authorizeSetting": [

        {

            "aliasName": "GUEST",

            "entityId": null,

            "entityName": "GUEST",

            "entityType": "USER",

            "permissionType": "READ"

        },

        {

            "aliasName": "admin",

            "entityId": null,

            "entityName": "admin",

            "entityType": "USER",

            "permissionType": "DELETE"

        }

    ],

    "createTime": 1439171597118,

    "description": null,

    "id": 6,

    "name": "scene_olympicnight",

    "nickname": "admin",

    "tags": [

        "Systematic scene"

    ],

    "thumbnail": null,

    "updateTime": 1439171597118,

    "url": "http://192.168.120.40:8090/iportal/services/3D-sample/rest/realspace/scenes/scene_olympicnight",

    "userName": "admin",

    "visitCount": 2

}

PUT request

Update the specified scene. Only users who create this scene and administrators can have rights to update.

Request parameter

Following arguments need to be included in the request sent.

Field Type Description
tags List<String> Tag of the scene.
name String Name of the scene.
description String Description of the scene.
thumbnail String The thumbnail path of the scene.
authorizeSetting List<IportalAuthorizeEntity> Authorization information of the scene.

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 scene name as scene_1, and execute PUT request for the scene resource http://localhost:8090/iportal/web/scenes/13.json. The request body is as follows:

{

    "name": "scene_1"

}

The rjson format returned is as follows:

{ "succeed": true}

DELETE request

Deletes the specified map.

Response example

The returned rjson format representation after implementing the DELETE request on the scene resource http://localhost:8090/iportal/web/scenes/13.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 scene resource exists, or if the scene resource can be accessed by clients. It can also determine if the scene resource supports an output format <format> if performed on a URI with .<format> included.

See