distributionByRole


URI

<portalStatistics_uri>/user/distributionbyrole[.<format>]

Supported methods

GET, HEAD

Parent resource

portalStatistics

Introduction

The distributionByRole resource represents how members in iPortal are distributed by roles. By sending GET request without time parameters, you can get all distribution information by roles. With time parameters, you can get distribution information of newly added members in a period of time.

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/manager/portalstatistics/user/distributionbyrole.rjson

GET request

Gets information of members distribution by roles.

Request parameter

If the time parameters have not been set, you can get all distribution information by roles. If the time parameters have been set, you can get distribution information of newly added members in a period of time.

Name Type Description
startTime Long The start time of the distributionByRole record. If the value is less than 0,then search it from the earliest history.The value is the milliseconds from 00:00:00 GMT January 1, 1970.
endTime Long The end time of the distributionByRole record. If the value is less than 0, use the server time as the end time.The value is the milliseconds from 00:00:00 GMT January 1, 1970.

Response example

The returned rjson format representation after implementing the GET request on the distributionByRole resource: http://localhost:8090/iportal/manager/portalstatistics/user/distributionbyrole.rjson is as follows:

{

    "ADMIN": 1,

    "CUSTOM": 0,

    "NORMAL": 2

}

To the distributionByRole information of newly added users during a period of time, set parameters as: startTime=1492063745780&endTime=1492063745789. That means: Execute GET request on distributionByRole resource: http://localhost:8090/iportal/manager/portalstatistics/user/distributionbyrole.rjson?startTime=1492063745780&endTime=1492063745789. The returned resource representation in rjson format is as follows:

{

    "ADMIN": 0,

    "CUSTOM": 0,

    "NORMAL": 1

}

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 contained 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 distributionByRole resource exists, or whether the the client has the permission to access it. It can also determine if the distributionByRole resource supports an output format <format> if performed on a URI with .<format> included.

See