moveDirectory


URI

<directories_uri>/move[.<format>]

Supported methods

PUT

Parent resource

directories

Introduction

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.

Resource hierarchy

HTTP request methods

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

PUT request

Move one directory and the resources in the directory to another specified directory.

Request parameter

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.

Response structure

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.

Response example

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

}

See