URI
<map_uri>/dayvisits[.<format>]
Supported methods
Parent resource
Introduction
mapDayVisits reaource is the map view count.
Supported Methods:
- GET: Gets the map view count every day.
- HEAD: Check whether the mapDayVisits resource exists. or to access the mapDayVisits resource.
Supported output formats: rjson, json, html, xml.
Resource hierarchy
HTTP request methods
Implement the HTTP request on the following URI, where supermapiportal is the server name, with rjson being the output format.
http://supermapiportal:8090/iportal/web/maps/{id}/dayvisits.rjson
GET request
Gets the map view count every day.
Request parameter
Implement the GET request for the mapDayVisits resource. Get the map view count every day. You can transmit the following parameters in url:
| Name | Type | Description |
| startTime | long | The start time of map access record. If it is not positive number, it will be queried from the earliest record. The value is the milliseconds from 00:00:00 GMT January 1, 1970. |
| endTime | long | The end time of map access record. If it is not positive number, the server time will be the end time. The value is the milliseconds from 00:00:00 GMT January 1, 1970. |
Response structure
Description
| Field | Type | Description |
| dayTime | long | The start time of every day. The unit is the millisecond. |
| visitCount | int | The view count of every day. |
Response example
The returned rjson format representation after implementing the GET request on the mapDayVisits resource http://localhost:8090/iportal/web/maps/73/dayvisits.rjson?startTime=1407069938704&endTime=1408091538704 is as follows:
[
{
"dayTime": 1406995200704,
"visitCount": 0
},
{
"dayTime": 1407081600704,
"visitCount": 10
},
{
"dayTime": 1407168000704,
"visitCount": 21
},
{
"dayTime": 1407254400704,
"visitCount": 14
},
{
"dayTime": 1407340800704,
"visitCount": 13
},
{
"dayTime": 1407427200704,
"visitCount": 16
},
{
"dayTime": 1407513600704,
"visitCount": 24
},
{
"dayTime": 1407600000704,
"visitCount": 13
},
{
"dayTime": 1407686400704,
"visitCount": 16
},
{
"dayTime": 1407772800704,
"visitCount": 18
},
{
"dayTime": 1407859200704,
"visitCount": 21
},
{
"dayTime": 1407945600704,
"visitCount": 25
},
{
"dayTime": 1408032000704,
"visitCount": 30
}
]
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 mapDayVisits resource exists, or if the mapDayVisits resource can be accessed by clients. It can also determine if the mapDayVisits resource supports an output format <format> if performed on a URI with .<format> included.