user


URI

<users_uri>/{userName}[.<format>]

Supported methods

GET, PUT, DELETE, HEAD

Parent resource

users

Introduction

user resource is the detailed user resource. Through the user resource, you can get and change the configuration of the user . You can also delete this user.

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://supermapiserver:8090/iserver/manager/security/users/{userName}.rjson

GET request

Gets the configuration information of the user.

Response structure

Implement the GET request on user. Return the configuration of the specified user. Made up by the following fields:

Field Type Description
description String User description info.
email String The email address of user.
name String Username.
ownRoles String[] The user roles, not including the role in the user group.
password String The user password.
roles String[] User related roles.
userGroups String[] The user group.

Response example

The returned rjson format representation after implementing the GET request on the user resource http://localhost:8090/iserver/manager/security/users/guest1.rjson is as follows:

{

    "description": "",

    "email": null,

    "name": "guest1",

    "ownRoles": ["PUBLISHER"],

    "password": "$shiro1$SHA-256$500000$3FK4ExWiZ35PFfr/NqfMGg==$R5Gwtq4bIgXywfnGKCHYGzOO59CnMSZme69D8H18GvI=",

    "roles": ["PUBLISHER"],

    "userGroups": []

}

PUT request

Modifies the configuration information of the user.

Request parameter

When sending a request, it needs to contain the following parameters. The user name can not be changes. Other parameters are the optional parameters.

Name Type Description
name String Username.
password String The user password.
description String User description info.
roles String[] User related roles.
userGroups String[] The user group.

Response structure

The resource representation structure is as follows after implementing the PUT request.

Field Type Description

succeed

boolean Whether to change the configuration of specified user.

Response example

Implement the PUT request on the user resource http://localhost:8090/iserver/manager/security/users/guest1.rjson. You can change the related configuration with this user. When changing user password and description, the request body is as follows:

{

    "name": "guest1",

    "password": "111111",

    "description": "Have permission to access all the service instances",

    "roles": [

        "PUBLISHER"

    ],

    "userGroups": []

}

The returned rjson format is as follows:

{

    "succeed": true

}

DELETE request

Deletes the user.

Response structure

The resource representation structure is as follows after implementing the DELETE request.

Field Type Description

succeed

boolean Whether to delete the user successfully.

Response example

Implement the DELETE request on the user resource http://localhost:8090/iserver/manager/security/users/guest1.rjson. You can delete the user specified by user name. The returned rjson format response result 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 user resource exists, or if the user resource can be accessed by clients. It can also determine if the user resource supports an output format <format> if performed on a URI with .<format> included.

See