URI
<portal_uri>/scenes[.<format>]
Supported methods
Parent resource
Child resources
scene, scenesShareSetting, batchAddScenes
Introduction
The scenes resource is the scene list information that the current user has permission to view.
Supported Methods:
- GET: Get the scene list information based on query parameters.
- POST: Add a new scene.
- DELETE: Delete scenes. Scenes can be deleted in batch.
- HEAD: Checks whether the scenes resource exists or whether it has permission to access the scenes 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:8190/iportal/web/scenes.rjson
GET request
Get the scene list information that the current user has permission to view.
Request parameter
If the parameter is not set, the scene list information of the current first page that the user has permission to view is returned. If the parameter is set, the scene list information specified by the user is returned. The request parameter must be included in the URI.
| Field | Type | Description |
| tags | String[] | Filtered by scene tags. |
| userNames | String[] | Filtered by the names of scene creators. |
| orderBy | SceneOrderBy | Filtered by sort field. |
| orderType | OrderType | Filtered by ascending or descending order. |
| keywords | String[] | Filtered by keywords. |
| currentPage | int | Filtered by page number. |
| permissionType | String | Filtered by permission type. The permission types include SEARCH (searchable), READ (viewable), READWRITE (editable), DELETE (deletable). |
| returnSubDir | Boolean | Whether to query resources in subdirectories. true means returning resources of the current query directory and its subdirectories, false means returning resources of the current directory only. |
| shareToMe | Boolean | Whether to query resources shared directly to me. This parameter is deprecated. |
| searchScope | SearchScope | Filtered by share scope. |
| pageSize | int | Filtered by page size. |
| dirIds | Integer[] | Filtered by directory IDs. |
| isNotInDir | Boolean | Filtered by whether it is ungrouped. The default value is false. If true, returns all ungrouped scene list information; if false, returns all scene list information. Ungrouped means scenes that have not been added to the directory. |
| filterFields | FilterFields[] | Field filtering for keyword queries. Field names need to be capitalized. For example, to filter based on the keyword of the scene name, 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 scenes resource, and return the scene list information that the current user has permission to view. It is composed of the 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:8190/iportal/web/scenes.rjson is as follows:
{
"total": 2,
"totalPage": 1,
"pageSize": 9,
"searchParameter": {
"permissionType": "DELETE",
"orderType": "ASC",
"keywords": null,
"returnSubDir": null,
"shareToMe": null,
"searchScope": null,
"orderBy": null,
"isNotInDir": null,
"pageSize": 9,
"dirIds": null,
"filterFields": null,
"departmentIds": null,
"createStart": -1,
"tags": null,
"currentUser": null,
"createEnd": -1,
"groupIds": null,
"userNames": null,
"currentPage": 1,
"resourceIds": null
},
"currentPage": 1,
"content": [
{
"thumbnail": "http://rdc.ispeco.com/services/../resources/thumbnail/scene/scene1288394665.png",
"authorizeSetting": null,
"description": "",
"updateTime": 1583202982961,
"userName": "zhangty",
"title": null,
"url": null,
"content": null,
"tags": [
"USERscene"
],
"visitCount": 1,
"createTime": 1583202982961,
"name": "CBD",
"nickname": "zhangty",
"layers": null,
"id": 1288394665
},
{
"thumbnail": "http://rdc.ispeco.com/services/../resources/thumbnail/scene/scene1959841615.png",
"authorizeSetting": null,
"description": "f",
"updateTime": 1583202929050,
"userName": "zhangty",
"title": null,
"url": null,
"content": null,
"tags": [
"USERscene"
],
"visitCount": 1,
"createTime": 1583202929050,
"name": "CBD",
"nickname": "zhangty",
"layers": null,
"id": 1959841615
}
]
}
If you want to get the specified scene list information, such as filtering by the keywords of the scene name, you need to set keywords=["Olympic"]&filterFields=["NAME"].
For example, the returned rjson format representation after implementing the GET request on the scenes resource: http://localhost:8190/iportal/web/scenes.rjson?keywords=["Olympic"]&filterFields=["NAME"] is as follows:
{
"total": 1,
"totalPage": 1,
"pageSize": 9,
"searchParameter": {
"permissionType": "DELETE",
"orderType": "ASC",
"keywords": ["Olympic"],
"returnSubDir": null,
"shareToMe": null,
"searchScope": null,
"orderBy": null,
"isNotInDir": null,
"pageSize": 9,
"dirIds": null,
"filterFields": ["NAME"],
"departmentIds": null,
"createStart": -1,
"tags": null,
"currentUser": null,
"createEnd": -1,
"groupIds": null,
"userNames": null,
"currentPage": 1,
"resourceIds": null
},
"currentPage": 1,
"content": [{
"thumbnail": "http://rdc.ispeco.com/services/../web/static/portal/img/scene/sceneThumbnail.png",
"authorizeSetting": null,
"description": null,
"updateTime": 1539049310706,
"userName": "zhangty",
"title": null,
"url": "http://rdc.ispeco.com:8080/iserver/services/3D-Olympic/rest/realspace/scenes/Olympic",
"content": null,
"tags": ["3d"],
"visitCount": 121,
"createTime": 1539049310706,
"name": "Olympic",
"nickname": "zhangty",
"layers": null,
"id": 608671278
}]
}
POST request
Add a new scene.
Request parameter
When sending the request, the following parameters need to be passed in the request body:
| Name | Type | Description |
|
name |
String | The name of the scene. |
| tags | List<String> | The tags of the scene. |
| userName | String | The username of the scene creator. |
| description | String | The description information of the scene. |
|
content |
SceneInfo | Specific 3D scene information, including layer list, camera, environment, etc. |
Response structure
The structure of the response resource representation is as follows:
| Field | Type | Description |
| succeed | boolean | Whether the scene is added successfully. |
| newResourceID | String | The ID of the newly added scene. |
| newResourceLocation | String | The URL of the newly added scene. |
Response example
Execute POST request on the scenes resource: http://localhost:8190/iportal/web/scenes.rjson to add a new 3D scene in the portal. The request body is as follows:
{
"name": "test",
"tags": "t",
"userName": "user",
"description": "",
"content": "{layers:{url:http://rdc.ispeco.com:8080/iserver/services/3D-Olympic/rest/realspace/datas/Ground_zhud@Olympic/config,name:Ground_zhud@Olympic,type:S3M,realName:,id:null,isVisible:true,thumbnail:null,title:null},{url:http://rdc.ispeco.com:8080/iserver/services/3D-Olympic/rest/realspace/datas/Nest@Olympic/config,name:Nest@Olympic,type:S3M,realName:,id:null,isVisible:true,thumbnail:null,title:null},{url:http://rdc.ispeco.com:8080/iserver/services/3D-Olympic/rest/realspace/datas/Tree@Olympic/config,name:Tree@Olympic,type:S3M,realName:,id:null,isVisible:true,thumbnail:null,title:null},{url:http://rdc.ispeco.com:8080/iserver/services/3D-Olympic/rest/realspace/datas/Ground@Olympic/config,name:Ground@Olympic,type:S3M,realName:,id:null,isVisible:true,thumbnail:null,title:null},{url:http://rdc.ispeco.com:8080/iserver/services/3D-Olympic/rest/realspace/datas/Ground_other@Olympic/config,name:Ground_other@Olympic,type:S3M,realName:,id:null,isVisible:true,thumbnail:null,title:null},{url:http://rdc.ispeco.com:8080/iserver/services/3D-Olympic/rest/realspace/datas/Ground_deng@Olympic/config,name:Ground_deng@Olympic,type:S3M,realName:,id:null,isVisible:true,thumbnail:null,title:null},{url:http://rdc.ispeco.com:8080/iserver/services/3D-Olympic/rest/realspace/datas/NewDataset@water-caijian/config,name:NewDataset@water-caijian,type:S3M,realName:,id:null,isVisible:true,thumbnail:null,title:null},{url:http://rdc.ispeco.com:8080/iserver/services/3D-Olympic/rest/realspace/datas/Building@Olympic/config,name:Building@Olympic,type:S3M,realName:,id:null,isVisible:true,thumbnail:null,title:null},camera:{position:{x:-2171393.232177115,y:4378420.651896914,z:4099458.299207809},heading:6.283161083227248,pitch:-0.7855183118939602,roll:6.283185307179586},environmentState:{enableLighting:true,skyAtmosphereShow:true,enableFog:true},isSTKTerrain:false,analysisObjects:{},terrainObjects:{}}"
}
The returned rjson format response result is as follows:
{
"newResourceID": "1116904540",
"succeed": true,
"newResourceLocation": "http://localhost:8190/iportal/web/scenes/1116904540"
}
DELETE request
Delete scenes. It supports deleting scenes in batch. The ID array of scenes to delete needs to be passed in the URI.
Response structure
The structure of the response resource representation is as follows:
| Field | Type | Description |
| succeed | boolean | Whether scenes are deleted successfully. |
| error | HttpError | Error information. This field will not be displayed if scenes are deleted successfully. |
Response example
Execute the DELETE request on the scenes resource http://localhost:8190/iportal/web/scenes.rjson?ids=[1,2], to delete scenes with ID 1 and 2 in batch. The returned rjson format response result 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 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.