totalAccumulatedResourceCountChanges


URI

<portalStatistics_uri>/resource/totalaccumulatedcountchanges[.<format>]

支持的方法

GETHEAD

父资源

portalStatistics

介绍

totalAccumulatedResourceCountChanges 资源是所有资源总数随时间变化的信息资源。通过发送 GET 请求,可以获取一段时间内所有资源总数随时间变化的信息。

支持的方法:

支持的表述格式:RJSON、JSON、HTML、XML。

资源层次

HTTP 请求方法

对如下 URI 执行 HTTP 请求,以 rjson 输出格式为例加以说明,其中,supermapiportal 是服务器名。

http://supermapiportal:8190/iportal/manager/portalstatistics/resource/totalaccumulatedcountchanges.rjson

GET 请求

获取一段时间内所有资源总数随时间变化的信息。

请求参数

参数未设置,默认返回 iPortal 所有资源总数变化信息,参数设置后,可获取一段时间内 iPortal 所有资源总数变化信息, 请求参数必须包含在 URI 中。

名称 类型 含义
startTime Long 所有资源总数记录的起始时间,如果不为正数则从最早保存的历史记录开始查询。值为自 1970 年 1 月 1 日 00:00:00 GMT 以来此日期表示的毫秒数。
endTime Long 所有资源总数记录的终止时间,如果不为正数或不传此参数,则以服务器当前时间作为终止时间。值为自 1970 年 1 月 1 日 00:00:00 GMT 以来此日期表示的毫秒数。
intervalType IntervalType 统计的时间间隔,如果不传此参数,系统会计算一个较合理的时间间隔进行统计。

响应结构

对 totalAccumulatedResourceCountChanges 资源执行 GET 请求,返回所有资源总数变化信息。其中单个时间间隔的所有资源总数信息由以下字段组成:

字段 类型 说明
accumulatedCount Integer 累计资源总数。
time Long 时间参数未设置时,该参数以首次启用 iPortal 的时间为起始时间,服务器的当前时间为截止时间,单位是毫秒。设置时间参数后,按设置的起始时间和截止时间为准。

响应示例

对 totalAccumulatedResourceCountChanges 资源:http://localhost:8190/iportal/manager/portalstatistics/resource/totalaccumulatedcountchanges.rjson 执行 GET 请求,返回 rjson 格式的资源表述如下:

[

    {

        "accumulatedCount": 1,

        "time": 1492074997088

    },

    {

        "accumulatedCount": 3,

        "time": 1492078597088

    },

    {

        "accumulatedCount": 3,

        "time": 1492082197088

    },

    {

        "accumulatedCount": 3,

        "time": 1492085797088

    },

    {

        "accumulatedCount": 3,

        "time": 1492089397088

    },

    {

        "accumulatedCount": 3,

        "time": 1492092997088

    },

    {

        "accumulatedCount": 3,

        "time": 1492096597088

    },

    {

        "accumulatedCount": 3,

        "time": 1492100197088

    },

    {

        "accumulatedCount": 3,

        "time": 1492103797088

    },

    {

        "accumulatedCount": 3,

        "time": 1492107397088

    },

    {

        "accumulatedCount": 3,

        "time": 1492110997088

    },

    {

        "accumulatedCount": 3,

        "time": 1492114597088

    },

    {

        "accumulatedCount": 3,

        "time": 1492118197088

    },

    {

        "accumulatedCount": 3,

        "time": 1492121797088

    },

    {

        "accumulatedCount": 3,

        "time": 1492125397088

    },

    {

        "accumulatedCount": 3,

        "time": 1492128997088

    },

    {

        "accumulatedCount": 3,

        "time": 1492132597088

    },

    {

        "accumulatedCount": 3,

        "time": 1492136197088

    },

    {

        "accumulatedCount": 3,

        "time": 1492139797088

    },

    {

        "accumulatedCount": 3,

        "time": 1492139957451

    }

]

如果希望获取一段时间内,时间间隔为一天的所有资源数变化,则需设置startTime=2492063745780&endTime=2492063745789&intervalType=DAY。即对 totalAccumulatedResourceCountChanges 资源:http://localhost:8190/iportal/manager/portalstatistics/resource/totalaccumulatedcountchanges.rjson?startTime=2492063745780&endTime=2492063745789&intervalType=DAY 执行 GET 请求,则返回的 rjson 资源表述如下:

[

    {

        "accumulatedCount": 3,

        "time": 2492063745780

    },

    {

        "accumulatedCount": 3,

        "time": 2492063745789

    }

]

HEAD 请求

返回跟 GET 请求一样的 HTTP 响应头,但是没有响应实体。可以在不必传输整个响应内容的情况下,获取包含在响应消息头中的元数据信息。元数据信息包括媒体类型,字符编码,压缩编码,实体内容长度等。

HEAD 请求可以用来判断 totalAccumulatedResourceCountChanges 资源是否存在,或者客户端是否有权限访问 totalAccumulatedResourceCountChanges 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 totalAccumulatedResourceCountChanges 资源是否支持<format>格式的表述。

请参见