URI
<group_uri>/resources[.<format>]
Supported methods
Parent resource
Introduction
The groupResources resource is group resource list information. It supports deleting resources of a group in batch.
Supported Methods:
- GET: Check group resource list information.
- DELETE: Delete resources of a single group in batch.
- HEAD: Check whether the groupResources resource exists. or to access the groupResources resource.
Supported output formats: rjson, json, html, xml.
Resource hierarchy
HTTP request methods
Execute the HTTP request on the following URI, where supermapiportal is the server name, with rjson being the output format.
http://supermapiportal:8090/iportal/web/groups/{id}/resources.rjson
GET request
Check group resource list information.
Request parameter
After specifying parameters, the specified resource list information in the current group will be returned. The request parameters must be contained in URI.
| Name | Type | Description |
| keywords | String[] | Query according to keywords of group resources. |
| tags | String[] | Query according to tabs of group resources. |
| groupResourceType | ResourceType | Query according to group resource types, including MAP, SERVICE, SCENE. |
| currentPage | int | Query according to current page. |
| pageSize | int | Query according to page size. |
| orderBy | ResourceOrderBy | Query according to sort order. |
| orderType | OrderType | Query according to sort ascending order. |
| resourceCreator | String | Query according to resource creator. |
Response structure
When you execute the GET request on the groupResources resource to return resource list information of the current group, the structure of the response is as follows:
| Field | Type | Description |
| content | List<GroupResourceEntity> | The content for the page. |
| currentPage | int | The current page. |
| pageSize | int | The page size. |
| searchParameter | SearchParameter | The search parameters for the current page. |
| total | int | The total number of records. |
| totalPage | int | The total number of pages. |
Response example
Get resource list information of the current group. For example, when you query according to resource type, you need to set ResourceType=MAP, that is executing the GET request on the groupResources resource(http://localhost:8090/iportal/web/groups/3/resources.rjson?resourceType=MAP), the rjson format representation returned is as follows;
{
"content": [
{
"createTime": 1414554169230,
"description": null,
"groupId": 2,
"groupResourceType": null,
"linkPage": null,
"mapInfos": null,
"nickname": "admin",
"permissionType": "READWRITE",
"resourceCreator": "admin",
"resourceId": 24,
"resourceName": "WorldMap_Night",
"serviceRootUrlId": null,
"sourceType": "SUPERMAP_REST",
"tags": [
"System Map"
],
"thumbnail": "http://192.168.120.63:8091/iserver/services/map-World/rest/maps/WorldMap_Night/entireImage.png",
"updateTime": 1414554169237,
"visitCount": 20
}
],
"currentPage": 1,
"pageSize": 9,
"searchParameter": {
"currentPage": 1,
"currentUser": null,
"groupId": 2,
"groupResourceType": "MAP",
"keywords": null,
"orderBy": null,
"orderType": "ASC",
"pageSize": 9,
"resourceCreator": null,
"resourceId": null,
"resourceIds": null,
"resourceName": null,
"tags": null
},
"total": 1,
"totalPage": 1
}
DELETE request
Delete resources in the curent group. Only the group creator or distributor of the resources have permission to delete the resources of the group. Parameters need to be passed in the url includes resourceType and resourceIds.
Response structure
The representation structure of the resource returned is as follows:
| Field | Type | Description |
| succeed | boolean | Whether the resources in the group has been deleted successfully or not. |
| error | Httperror | Error information. The field will not exist if the operation is successful. |
Response example
Execute the DELETE request on the groupResources resource http://localhost:8090/iportal/web/groups/6/resources.rjson?deleteResourceSetting={resourceType:"MAP",resourceIds:[24,25]} to return rjson format representation 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 groupResources resource exists, or if the groupResources resource can be accessed by clients. It can also determine if the groupResources resource supports an output format <format> if performed on a URI with .<format> included.