<security_uri>/users[.<format>]
users manage the resource for users. Through this resource, you can get the user list and the related information in GIS system. You can also add the new users and batch delete the created users.
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://supermapiserver:8090/iserver/manager/security/users.rjson
Gets the user list and the related information in the current GIS system.
Implement the GET request for users resource (http://localhost:8090/iserver/manager/security/users.rjson).Returned result is the user info 2D array with Sting type. Every user information contains username, user description, and user related roles. The corresponding rjson result is:
[
[
"admin",
"",
"ADMIN"
],
[
"guest1",
"",
"ADMIN"
]
]
Adds a new user.
Following arguments need to be included in the request sent.
Name | Type | Description |
name | String | [Required] Username. |
password | String | [Required] The user password. |
description | String | User description info. |
roles | String[] | User related roles. |
userGroups | String[] | The user group. |
The resource representation structure is as follows after implementing the POST request.
Field | Type | Description |
newResourceID | String | The name of new user. |
newResourceLocation | String | The resource address of new user. |
postResultType | String | Value is CreateChild. |
succeed | boolean | Whether to add a new user successfully. |
Implementing POST request for users resource http://localhost:8090/iserver/manager/security/users.rjson. You can add the new user. The request is as follows:
{
"name": "guest1",
"password": "123456",
"description": "",
"roles": [
"PUBLISHER"
],
"userGroups": []
}
The response result in rjson format returned is as follows:
{
"newResourceID": "guest1",
"newResourceLocation": "http://localhost:8090/iserver/manager/security/users/guest1.rjson",
"postResultType": "CreateChild",
"succeed": true
}
Batch delete the existing users.
When sending the request, request body is the String array combined by username.
The resource representation structure is as follows after implementing the PUT request.
Field | Type | Description |
succeed |
boolean | Whether to delete the user successfully. |
Implementing PUT request for users resource http://localhost:8090/iserver/manager/security/users.rjson. You can batch delete the existing users. The request is as follows:
[
"guest1"
]
The response result in rjson format returned 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 if the users resource exists, or if the users resource can be accessed by clients. It can also determine if the users resource supports an output format <format> if performed on a URI with .<format> included.