<portalStatistics_uri>/user/accumulatedcountchanges[.<format>]
accumulatedUserCountChanges 资源是累计用户数随时间变化的信息资源。通过发送 GET 请求,可以获取一段时间内累计用户数随时间变化的信息。
支持的方法:
支持的表述格式:RJSON、JSON、HTML、XML。
对如下 URI 执行 HTTP 请求,以 rjson 输出格式为例加以说明,其中,supermapiportal 是服务器名。
http://supermapiportal:8190/iportal/manager/portalstatistics/user/accumulatedcountchanges.rjson
获取一段时间内累计用户数随时间变化的信息。
参数未设置,默认返回 iPortal 总的累计用户数变化信息,参数设置后,可获取一段时间内 iPortal 累计用户数变化信息, 请求参数必须包含在 URI 中。
名称 | 类型 | 含义 |
startTime | Long | 累计用户数记录的起始时间,如果不为正数则从最早保存的历史记录开始查询。值为自 1970 年 1 月 1 日 00:00:00 GMT 以来此日期表示的毫秒数。 |
endTime | Long | 累计用户数记录的终止时间,如果不为正数或不传此参数,则以服务器当前时间作为终止时间。值为自 1970 年 1 月 1 日 00:00:00 GMT 以来此日期表示的毫秒数。 |
intervalType | IntervalType | 统计的时间间隔,如果不传此参数,系统会计算一个较合理的时间间隔进行统计。 |
对 accumulatedUserCountChanges 资源执行 GET 请求,返回累计用户数变化信息。其中单个时间间隔的累计用户数信息由以下字段组成:
字段 | 类型 | 说明 |
accumulatedCount | Integer | 累计用户数。 |
time | Long | 时间参数未设置时,该参数以首次启用 iPortal 的时间为起始时间,服务器的当前时间为截止时间,单位是毫秒。设置时间参数后,按设置的起始时间和截止时间为准。 |
对 accumulatedUserCountChanges 资源:http://localhost:8190/iportal/manager/portalstatistics/user/accumulatedcountchanges.rjson 执行 GET 请求,返回 rjson 格式的资源表述如下:
[
{
"accumulatedCount": 1,
"time": 1491902545058
},
{
"accumulatedCount": 1,
"time": 1491906145058
},
{
"accumulatedCount": 1,
"time": 1491909745058
},
{
"accumulatedCount": 1,
"time": 1491913345058
},
{
"accumulatedCount": 1,
"time": 1491916945058
},
{
"accumulatedCount": 1,
"time": 1491920545058
},
{
"accumulatedCount": 1,
"time": 1491924145058
},
{
"accumulatedCount": 1,
"time": 1491927745058
},
{
"accumulatedCount": 1,
"time": 1491931345058
},
{
"accumulatedCount": 1,
"time": 1491934945058
},
{
"accumulatedCount": 1,
"time": 1491938545058
},
{
"accumulatedCount": 1,
"time": 1491942145058
},
{
"accumulatedCount": 1,
"time": 1491945745058
},
{
"accumulatedCount": 1,
"time": 1491949345058
},
{
"accumulatedCount": 1,
"time": 1491952945058
},
{
"accumulatedCount": 1,
"time": 1491956545058
},
{
"accumulatedCount": 1,
"time": 1491960145058
},
{
"accumulatedCount": 1,
"time": 1491963745058
},
{
"accumulatedCount": 1,
"time": 1491967345058
},
{
"accumulatedCount": 1,
"time": 1491970945058
},
{
"accumulatedCount": 1,
"time": 1491974545058
},
{
"accumulatedCount": 1,
"time": 1491978145058
},
{
"accumulatedCount": 1,
"time": 1491981745058
},
{
"accumulatedCount": 1,
"time": 1491985345058
},
{
"accumulatedCount": 1,
"time": 1491988945058
},
{
"accumulatedCount": 1,
"time": 1491992545058
},
{
"accumulatedCount": 1,
"time": 1491996145058
},
{
"accumulatedCount": 1,
"time": 1491999745058
},
{
"accumulatedCount": 1,
"time": 1492003345058
},
{
"accumulatedCount": 1,
"time": 1492006945058
},
{
"accumulatedCount": 1,
"time": 1492010545058
},
{
"accumulatedCount": 1,
"time": 1492014145058
},
{
"accumulatedCount": 1,
"time": 1492017745058
},
{
"accumulatedCount": 1,
"time": 1492021345058
},
{
"accumulatedCount": 1,
"time": 1492024945058
},
{
"accumulatedCount": 1,
"time": 1492028545058
},
{
"accumulatedCount": 1,
"time": 1492032145058
},
{
"accumulatedCount": 1,
"time": 1492035745058
},
{
"accumulatedCount": 1,
"time": 1492039345058
},
{
"accumulatedCount": 1,
"time": 1492042945058
},
{
"accumulatedCount": 1,
"time": 1492046545058
},
{
"accumulatedCount": 1,
"time": 1492050145058
},
{
"accumulatedCount": 1,
"time": 1492053745058
},
{
"accumulatedCount": 1,
"time": 1492057345058
},
{
"accumulatedCount": 1,
"time": 1492060945058
},
{
"accumulatedCount": 2,
"time": 1492064545058
},
{
"accumulatedCount": 3,
"time": 1492068145058
},
{
"accumulatedCount": 3,
"time": 1492068839198
}
]
如果希望获取一段时间内,时间间隔为一天的累计用户数变化,则需设置 startTime=1492063745780&endTime=1492063745789&intervalType=DAY。即对 accumulatedUserCountChanges 资源:http://localhost:8190/iportal/manager/portalstatistics/user/accumulatedcountchanges.rjson?startTime=1492063745780&endTime=1492063745789&intervalType=DAY 执行 GET 请求,则返回的 rjson 资源表述如下:
[
{
"accumulatedCount": 2,
"time": 1492063745789
}
]
返回跟 GET 请求一样的 HTTP 响应头,但是没有响应实体。可以在不必传输整个响应内容的情况下,获取包含在响应消息头中的元数据信息。元数据信息包括媒体类型,字符编码,压缩编码,实体内容长度等。
HEAD 请求可以用来判断 accumulatedUserCountChanges 资源是否存在,或者客户端是否有权限访问 accumulatedUserCountChanges 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 accumulatedUserCountChanges 资源是否支持<format>格式的表述。