scenes


URI

<portal_uri>/scenes[.<format>]

Supported methods

GET, DELETE, HEAD

Parent resource

portal

Child resources

scene, scenesShareSetting

Introduction

The scene resource refers to the scene list information that current user is allowed to check. By sending DELETE request, you can delete scenes in batch.

Supported Methods:

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.rjson

GET request

Get scene list which can be visited by current users.

Request parameter

Return the scene list of the first page which can be visited by users if the parameter isn't set; Return the scene list specified by users if the parameter is set. The request parameter must be included in URI.

Field Type Description
tags String[] Filtered by scene tag.
userNames String[] Filtered by user names who added scenes.
orderBy SceneOrderBy Filtered by field sort.
orderType OrderType Filtered by ascending or descending.
keywords String[] Filtered by keywords.
currentPage int Filtered by page number.
pageSize int Filtered by page size.
dirIds Integer[] Filtered by category ID.
isNotInDir Boolean Filtered by group or not. Default is false. Return scene list where scenes are not grouped, if it is true; Return all scene list if it is false.
Ungroup means a scene isn't added into the scene list.
filterFields FilterFields[] Field filtering for keyword queries. Field names need to be capitalized. For example, to filter based on the keyword of the scene, you need to set keywords=["osgb"]&filterFields=["NAME"].
createStart Long Query scenes created at this time value or after this time value. If the value is null or less than 0, the start time for scene queries is not limited.
createEnd Long Query scenes created earlier than or at this time value. If the value is null or less than 0, the end time for scene queries is not limited.

Response structure

Implement Get request for the scene resource, and return the scene list which can be visited by current users. It is composed by following fields:

Field Type Description
content List<SceneInfo> Contents of the page.
currentPage int Current page number.
pageSize int Page size.
searchParameter SearchParameter Search parameter on current page.
total int Total records
totalPage int Total pages.

Response example

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

{

    "content": [

        {

            "authorizeSetting": null,

            "createTime": 1461672464399,

            "description": null,

            "id": 11,

            "name": "Theme3d",

            "nickname": "admin",

            "tags": [

                "System scene"

            ],

            "thumbnail": null,

            "updateTime": 1461672464399,

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

            "userName": "admin",

            "visitCount": 0

        },

        {

            "authorizeSetting": null,

            "createTime": 1461672562050,

            "description": null,

            "id": 12,

            "name": "ChinaProvinces",

            "nickname": "admin",

            "tags": [

                "System scene"

            ],

            "thumbnail": null,

            "updateTime": 1461672562050,

            "url": "http://192.168.120.40:8090/iserver/services/3D-ChinaProvinces/rest/realspace/scenes/ChinaProvinces",

            "userName": "admin",

            "visitCount": 0

        }

    ],

    "currentPage": 1,

    "pageSize": 9,

    "searchParameter": {

        "currentPage": 1,

        "currentUser": null,

        "dirIds": null,

        "filterFields": null,

        "groupIds": [],

        "isNotInDir": false,

        "keywords": null,

        "orderBy": null,

        "orderType": "ASC",

        "pageSize": 9,

        "resourceIds": null,

        "tags": null,

        "userNames": null

    },

    "total": 2,

    "totalPage": 1

}

You need to set keywords=["osgb"]&filterFields=["NAME"] if you want to get scenes list and filtered by keywords of the scene name. In other words, the returned rjson format representation after implementing the GET request on the scenes resource http://localhost:8090/iportal/web/scenes.rjson?keywords=["osgb"]&filterFields=["NAME"] is as follows:

{

    "content": [

        {

            "authorizeSetting": null,

            "createTime": 1461719177139,

            "description": null,

            "id": 13,

            "name": "osgb",

            "nickname": "admin",

            "tags": [

                "System scene"

            ],

            "thumbnail": null,

            "updateTime": 1461719177139,

            "url": "http://192.168.120.40:8090/iserver/services/3D-osgb/rest/realspace/scenes/osgb",

            "userName": "admin",

            "visitCount": 0

        }

    ],

    "currentPage": 1,

    "pageSize": 9,

    "searchParameter": {

        "currentPage": 1,

        "currentUser": null,

        "dirIds": null,

        "filterFields": [

            "NAME"

        ],

        "groupIds": [],

        "isNotInDir": null,

        "keywords": [

            "osgb"

        ],

        "orderBy": null,

        "orderType": "ASC",

        "pageSize": 9,

        "resourceIds": null,

        "tags": null,

        "userNames": null

    },

    "total": 1,

    "totalPage": 1

}

DELETE request

Delete scenes. It supports deleting scenes in batch. The ID array of scenes needs to delete during the passing in URI.

Response structure

The structure of the response resource representation is as follows:

Field Type Description
succeed boolean Whether scenes are deleted successfully or not.
error Httperror Error information. This field will not be displayed if scenes are deleted successfully.

Response example

Implement the DELETE request on the scenes resource http://localhost:8090/iportal/web/scenes.rjson?ids=[1,2], delete scenes with ID 1 and 2. Return rjson results:

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

See