<department_uri>/admins[.<format>]
The departmentAdmins resource is the administrators list information of a single department. By sending GET request, you can get administrators list information of a single department; By sending POST request, you can add a administrator to a department, with batches-add supported. By sending PUT request, you can simulating DELETE request to remove administrator from department, batches-operation supported. The removed one will not be the administrator of this department, but it's still in portal.
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/manager/iportalconfig/departments/{departmentId}/admins.rjson
Gets the administrators list information of a single department.
Execute GET request on departmentAdmins resource to return the administrators list information of a single department.The information representation structure is as follows:
Field | Type | Description |
id | Integer | Identification field. |
departmentId | Integer | Belonging department ID. |
userName | String | Name of department administrator. |
nickname | String | Nick name of department administrator. |
Perform the GET request on the departmentAdmins resource: http://localhost:8090/iportal/manager/iportalconfig/departments/4/admins.rjson to get the list info of a single department. The returned rjson resource representation is as follows:
[
{
"departmentId": 2,
"id": 1,
"nickname": "admin_re",
"userName": "admin_re"
},
{
"departmentId": 2,
"id": 2,
”nickname": "admin_1",
“userName": "admin_1"
}
]
Adds a administrator to a department.Batches-add is supported. When sending request, array of administrators need to be passed.
The structure of the response resource representation is as follows:
Field | Type | Description |
postResultType | PostResultType | Adds an administrator into a department. |
succeed | boolean | Whether it's successful to add an administrator. |
Implement POST request on the departmentAdmins resource: http://localhost:8090/iportal/manager/iportalconfig/departments/4/admins.rjson to to add an administrator into a department. Request body is as follows:
[
"admin_re",
"admin_1"
]
The returned resource representation in rjson format is as follows:
{
"postResultType": "CreateChild",
"succeed": true
}
Removes administrator from department, batches-operation supported. The removed one will not be the administrator of this department, but it's still in portal. When sending request, array of administrators need to be passed.
The structure of the response resource representation is as follows:
Field | Type | Description |
succeed | boolean | Whether it is successful to remove department administrator. |
error | Httperror | Error information. This field will not be displayed if the administrator is successfully removed. |
Implement PUT request on the departmentAdmins resource: http://localhost:8090/iportal/manager/iportalconfig/departments/4/admins.rjson. Request body is as follows:
[
"admin_re",
"admin_1"
]
The returned resource representation in rjson format is as follows:
{"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 whether the departmentAdmins resource exists, or whether the the client has the permission to access it. It can also determine if the departmentAdmins resource supports an output format <format> if performed on a URI with .<format> included.