<myDepartment_uri>/resources[.<format>]
myDepartmentResources resource is the resource list information of the single department where the current user locates.
Supported Methods:
Supported output formats: rjson, json, html, xml.
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/mycontent/departments/{id}/resources.rjson
Acquires the list information of resources (that can be added) of the single department. When the parameter is not passed, gets the map resource list information in single department by default.
After specifying parameters, the specified resource list information in the single department will be returned. The request parameters must be contained in URI.
Name | Type | Description |
resourceType | ResourceType | Searching by resource type in department. Including: MAP, SERVICE, SCENE. |
orderBy | orderBy | Searching by resource order type in department. |
orderType | OrderType | Query according to sort ascending order. |
currentPage | int | Query according to current page. |
pageSize | int | Query according to page size. |
When you implement the GET request on the myDepartmentResources resource to return resource list information of the single department, the structure of the response is as follows:
Field | Type | Description |
content | List<DepartmentResourceEntity> | Page content. |
currentPage | int | The current page number. |
pageSize | int | The page size. |
searchParameter | SearchParameter | The search parameter for the current page. |
total | int | The total record number. |
totalPage | int | The total number of pages. |
The returned rjson format representation after implementing the GET request on the myDepartmentResources resource http://localhost:8090/iportal/web/mycontent/departments/3/resources.rjson is as follows:
If you want to get the map resource list, and sorted by descending order of map access, you need to set resourceType=MAP, orderBy=VISITCOUNT, orderType=DESC. eg. Sending GET request to myDepartmentResources resource http://localhost:8090/iportal/web/mycontent/departments/3/resources.rjson?resourceType=MAP&orderBy=VISITCOUNT&orderType=DESC, the returned rjson format representation is as follows:
The resources of current department can be removed only by department manager. Parameters which need to be passed in the url includes: resourceType and resourceIdsre
The structure of the response resource representation is as follows:
Field | Type | Description |
succeed | boolean | Whether it is successful to remove the resource of department. |
error | Httperror | Error information. The field will not exist if the operation is successful. |
Implement the DELETE request on the myDepartmentResources resource http://localhost:8090/iportal/web/mycontent/departments/3/resources.rjson?resourceType=MAP&resourceIds=[5,6]. Return rjson results:
{ "succeed": true}
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 myDepartmentResources resource exists, or if the myDepartmentResources resource can be accessed by clients. It can also determine if the myDepartmentResources resource supports an output format <format> if performed on a URI with <format> included.