moveDepartment


URI

<department_uri>/parentid[.<format>]

Supported methods

PUTHEAD

Parent resource

department

Introduction

moveDepartment resource is the resource for moving position of department by updating the ID of the upper department.

Supported Methods:

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:8090/iportal/manager/iportalconfig/departments/{departmentId}/parentid.rjson

PUT request

Removing position of department by updating the ID of the upper department. When sending the request body, the ID the department where the department will be moved to should be passed.

Response structure

The structure of the response resource representation is as follows:

Field Type Description
succeed boolean Whether moving department is successful.
error Httperror Error message. This field will not be created if the department name is updated successfully.

Response example

Sending PUT request to moveDepartment resource: http://localhost:8090/iportal/manager/iportalconfig/departments/4/parentid.rjson to remove the department with ID=4 to the department whose ID is 3, The request body is as follows:

3

The returned resource representation in rjson format 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 moveDepartment resource exists, or if the moveDepartment resource can be accessed by clients. It can also determine if the moveDepartment resource supports an output format <format> if performed on a URI with <format> included.

See