<directories_uri>/move[.<format>]
moveDirectory is used to move one directory and the resources in the directory to another specified directory. Only the adminstrator is allowed to do this operation.
Supported Methods:
Supported output formats: rjson, json, html, xml.
Implement the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.
http://supermapiportal:8090/iportal/web/directories/move.rjson
Move one directory and the resources in the directory to another specified directory.
The following arguments need to be included in the request sent.
Name | Type | Description |
subDirIds | List<Integer> | 【Mandatory Parameter】 The source directory id group to be moved to the specified target directory. |
parentDirId | Integer | 【Mandatory Parameter】 The target directory id. |
resourceIds | List<Integer> | 【Optional Parameter】 The id group of the resources to be moved to the specified target directory. If you want to move all the resources in the directory, the parameter can be null; otherwise, the parameter can not be null. |
type | DirectoryResourceType | 【Optional Parameter】 The type of resource to be moved to the specified directory, including: MAP, SERVICE, SCENE. |
The structure for the resource representation returned should be:
Field | Type | Description |
succeed | boolean | Whether the directory is moved successfully. |
error | Httperror | Error message. This field will not be created if the directory is moved successfully. |
Move the directory with the id value being 1 and its resources to the directory with id value being 3. Execute a PUT request on the moveDirectory resource: http://localhost/iportal/web/directories/move.rjson. The request sent is like this:
{
"parentDirId": 3,
"subDirIds": [
1
],
"resourceIds": [],
"type": "MAP"
}
The response result in rjson format returned is as follows:
{
"succeed": true
}