- Documentation
 - Log
 - Query Menu Access Logs
 
Query Menu Access Logs¶
Query the user events on menu access.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.3/event/log/query
Request Parameters (URI)¶
Name  | 
Location (Path/Query)  | 
Required/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|---|
orgId  | 
Query  | 
Required  | 
String  | 
OU ID. How to get orgId >>  | 
Request Parameters (Body)¶
Name  | 
Required/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|
startTime  | 
Required  | 
Long  | 
The start time to query in milliseconds, in timestamp format.  | 
endTime  | 
Required  | 
Long  | 
The end time to query in milliseconds, in timestamp format.  | 
pagination  | 
Optional  | 
Pagination Request Struct  | 
Lists the paging requirements in a request. If not specified, the default pagination size is 1000 pages, starting from 0. Pagination Request Struct  | 
Response Parameters¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
pagination  | 
Pagination Struct  | 
Pagination information. pagination Struct >>  | 
logs  | 
EventLogDTO Struct  | 
Event list. EventLogDTO Struct >>  | 
Pagination Struct¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
totalElements  | 
Long  | 
The total number of records.  | 
pageNo  | 
Integer  | 
The request pages.  | 
pageSize  | 
Integer  | 
The number of records in each page.  | 
EventLogDTO Struct¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
subjectId  | 
String  | 
Event ID.  | 
subjectType  | 
String  | 
Event type.  | 
subjectName  | 
String  | 
Event name. The value of this parameter is a complex multi-language structure, which will be serialized into a String type when returned. So the quotes in the return value will be escaped. You can deserialize the value into JSON format later.  | 
upstreamId  | 
String  | 
The parent object ID of the event. Returned only if this audit record has a upstream object.  | 
upstreamType  | 
String  | 
The parent object type of the event. Returned only if this audit record has a upstream object.  | 
upstreamName  | 
String  | 
The parent object name of the event. Returned only if this audit record has a upstream object.  | 
organizationId  | 
String  | 
The OU ID to which the event belongs.  | 
userId  | 
String  | 
The user ID that triggers the event.  | 
eventTime  | 
String  | 
The time when the event occurs.  | 
Error Codes¶
Error Code  | 
Description  | 
|---|---|
31400  | 
Application not obtained or invalid time.  | 
31404  | 
OU does not exist.  | 
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.3/event/log/query
method: POST
requestBody:
{
  "pagination":{
    "pageSize":2,
    "pageNo":0
  },
    "startTime": 1660177000000,
    "endTime": 1660177679000
}
Return Sample¶
{
  "code": 0,
  "message": "OK",
  "data": {
    "pagination":{
      "totalElements":15000,
      "pageSize":2,
      "pageNo":0
    },
    "logs": [
      {
        "subjectId": "your_subject_id",
        "subjectName": "{\"default\":\"uic\",\"en_US\":\"uic\",\"zh_CN\":\"uic\"}",
        "subjectType": "app",
        "organizationId": "your_org_id",
        "userId": "your_user_id",
        "eventTime": "2022-08-11 08:25:32.0"
      },
      {
        "subjectId": "your_subject_id",
        "subjectName": "{\"default\":\"5180\",\"en_US\":\"5180\",\"zh_CN\":\"8599\"}",
        "subjectType": "menu",
        "upstreamId": "5244f6e8-522c-43f6-af4e-e85753075c69",
        "upstreamType": "app",
        "upstreamName": "{\"default\":\"uic\",\"en_US\":\"uic\",\"zh_CN\":\"uic\"}",
        "organizationId": "your_org_id",
        "userId": "your_user_id",
        "eventTime": "2022-08-11 08:27:57.0"
      }
    ]
  }
}