visitDetails


URI

<portalStatistics_uri>/resource/visit/details[.<format>]

Supported methods

GET, HEAD

Parent resource

portalStatistics

Introduction

The visitDetails resource is the access history details resource for some resources. It can get the access history details resource for some resources by sending the GET request. Currently, you can get the access history details resource of the service resources in the portal, and you need to enable the service agent function and the service agent accessing statistics function.

Supported Methods:

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/manager/portalstatistics/resource/visit/details.rjson

GET request

Get the access history details information of the visitors for some resources.

Request parameter

When sending the request, it needs to include the following parameters in the request entity, and the request parameters should be contained in URI.

Name Type Description
userNames List<String> [Optional] Resource visitors.
resourceType ResourceType [Required] Resource type. Currently supports SERVICE (Service resource).
resourceId Integer [Optional] Resource id.
startTime Long [Optional] The start time of the access information records. If it is not positive number, it will be queried from the earliest record. It is the value in millisecond of the time since 00:00:00 GMT January 1, 1970.
endTime Long [Optional] The end time of the access information records. If it is not positive number or not set, it will take the current server time as the end time. It is the value in millisecond of the time since 00:00:00 GMT January 1, 1970.
orderBy ResVisitDetailOrderBy [Optional] Query by the ordering field.
orderType OrderType [Optional] Query according to sort ascending/descending order.
currentPage int [Optional] Paging number.
pageSize int [Optional] Page size.

Response structure

After preforming the GET request for the visitDetails resource,it will return the access details information. Including the following fields:

Field Type Description
content List<ResAccessRecord> Page content.
currentPage int The current page number.
pageSize int The page size.
searchParameter SearchParameter The search parameter for the current page.
total int The total record number.
totalPage int The total number of pages.

Response example

To make statistics for the visitors access details for the service whose id is 3 in a period, it needs to set resourceType=SERVICE&resourceIds=[3]startTime=1492063745780&endTime=1592657395201. The returned rjson format representation after implementing the GET request on the visitDetails resource http://localhost:8090/iportal/manager/portalstatistics/resource/visit/details.rjson?resourceType=SERVICE&resourceIds=[3]&startTime=1492063745780&endTime=1592657395201 is as follows:

{

    "content": [

        {

            "method": "GET",

            "remoteAddress": "192.168.120.40",

            "requestURL": "http://192.168.120.40:8095/iserver/services/map-china400/rest",

            "resourceName": "China",

            "responseCode": 304,

            "time": 1492657399796,

            "userName": "admin"

        },

        {

            "method": "GET",

            "remoteAddress": "192.168.120.40",

            "requestURL": "http://192.168.120.40:8095/iserver/services/map-china400/rest/maps",

            "resourceName": "China",

            "responseCode": 304,

            "time": 1492657401122,

            "userName": "admin"

        },

        {

            "method": "GET",

            "remoteAddress": "192.168.120.40",

            "requestURL": "http://192.168.120.40:8095/iserver/services/map-china400/rest/maps/China.ijs",

            "resourceName": "China",

            "responseCode": 304,

            "time": 1492657402639,

            "userName": "admin"

        },

        {

            "method": "GET",

            "remoteAddress": "192.168.120.40",

            "requestURL": "http://192.168.120.40:8095/iserver/services/map-china400/rest/maps/China/tilesets.json",

            "resourceName": "China",

            "responseCode": 304,

            "time": 1492657403337,

            "userName": "admin"

        },

        {

            "method": "GET",

            "remoteAddress": "192.168.120.40",

            "requestURL": "http://192.168.120.40:8095/iserver/services/map-china400/rest/maps/China.json",

            "resourceName": "China",

            "responseCode": 304,

            "time": 1492657403447,

            "userName": "admin"

        },

        {

            "method": "GET",

            "remoteAddress": "192.168.120.40",

            "requestURL": "http://192.168.120.40:8095/iserver/services/map-china400/rest/maps/China/utfGrid.json",

            "resourceName": "China",

            "responseCode": 304,

            "time": 1492657403572,

            "userName": "admin"

        },

        {

            "method": "GET",

            "remoteAddress": "192.168.120.40",

            "requestURL": "http://192.168.120.40:8095/iserver/services/map-china400/rest/maps/China/utfGrid.json",

            "resourceName": "China",

            "responseCode": 304,

            "time": 1492657403645,

            "userName": "admin"

        },

        {

            "method": "POST",

            "remoteAddress": "192.168.120.40",

            "requestURL": "http://192.168.120.40:8095/iserver/services/map-china400/rest/maps/China/queryResults.json",

            "resourceName": "China",

            "responseCode": 201,

            "time": 1492657403730,

            "userName": "admin"

        },

        {

            "method": "GET",

            "remoteAddress": "192.168.120.40",

            "requestURL": "http://192.168.120.40:8095/iserver/services/map-china400/rest/maps/China/utfGrid.json",

            "resourceName": "China",

            "responseCode": 304,

            "time": 1492657403820,

            "userName": "admin"

        },

        {

            "method": "GET",

            "remoteAddress": "192.168.120.40",

            "requestURL": "http://192.168.120.40:8095/iserver/services/map-china400/rest/maps/China/utfGrid.json",

            "resourceName": "China",

            "responseCode": 304,

            "time": 1492657403904,

            "userName": "admin"

        }

    ],

    "currentPage": 1,

    "pageSize": 10,

    "searchParameter": {

        "currentPage": 1,

        "endTime": 1592657395201,

        "keywords": null,

        "orderBy": null,

        "orderType": "ASC",

        "pageSize": 10,

        "resourceId": 3,

        "resourceType": "SERVICE",

        "startTime": 1492063745780,

        "userNames": null

    },

    "total": 518,

    "totalPage": 52

}

HEAD request

Returns the same HTTP response header as the GET request, but does not have the response entity. It can get the metadata information in the response header without transferring the whole response content. Metadata information includes media type, character encoding, compression encoding, entity content length, and so on.

The HEAD request can be used to determine whether the visitDetails resource exists or whether the client has authority to access the visitDetails resource. It can quickly determine whether the visitDetails resource supports the representation in <format> format by performing HEAD request on URI with <format>.

See