Skip To Content
ArcGIS Developers
Dashboard

Query

Description

The query operation allows you to aggregate, filter, and page through logs for your deployment.

Request parameters

ParameterDetails
logLevel

(Required)

The base log level for the logs being queried. Only logs at that same log level, or at a log level with higher severity, will be returned. The default level is WARNING.

Values: WARNING | SEVERE | INFO | FINE | VERBOSE | DEBUG

startTime

(Optional)

The oldest time to query logs against, formatted as either a timestamp (yyyy-mm-ddThh:mm:ss) or milliseconds from epoch. The default is the beginning of all recorded logs.

Example

//Timestamp
startTime=2020-08-01T15:14:20

//Milliseconds
startTime=1597072520000
endTime

(Optional)

The most recent time to query against, formatted as either a timestamp (yyyy-mm-ddThh:mm:ss) or milliseconds from epoch. The default is the current date.

Example

//Timestamp
endTime=2020-08-01T15:17:20

//Milliseconds
endTime=1597072460000
logCode

(Optional)

Specifies the log codes assigned to the logs. When specified, query will return logs associated with those codes.

Example

logCode=202010,1251
users

(Optional)

The username of a user within the organization that can be used to further filter log results.

Example

users=user1
requestIDs

(Optional)

An ID assigned to a specific server event.

Example

requestIDs=a1fc28db-4575-4a09-84df-7b313c239e5b,22d8113a-e229-4e48-8fe4-008a5037fcba
serviceTypes

(Optional)

The service type of a service within the organization that can be used to further filter query results.

Note:

Currently, only MapServer, GPServer, and FeatureServer are the only supported service types.

Example

serviceTypes=MapServer
source

(Optional)

The source of logged events.

Examples

//Sharing API as source
source=Sharing

//Service in folder as source
source=Folder/CommercialDamageAssessment.FeatureServer

//Enterprise Admin as source
source=Enterprise Admin

//REST Catalog as source
source=Rest Catalog

//SOAP Catalog as source
source=Soap Catalog
pageSize

(Required)

The maximum number of log records to be returned by this query. The default messages per page is 1000. The limit for this parameter is 10000 records.

Example

pageSize=1000
showStackTraces

(Required)

A binary that specifies whether stack traces of exceptions will be included with the returned logs. The default is false.

Values: true | false

f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

The following is a sample request for the query operation:

https://organization.domain.com/context/admin/logs/queryFilter?logLevel=SEVERE&startTime=2020-08-09T22:45:00&endTime=2020-08-09T22:45:06&className=&users=user1
&requestIDs=&pageSize=1000&showStackTraces=false&f=pjson&token=HRozb6bnTL6gfA-SJO-IxhfLgJrioK1KJdMLWmCE5HjHWz9U3fOiFv3-HkgPZqsLljTkk2WDENGt5fjho5s39e_mZL5At60UvJPoNnC5O2sv2HTlumG7TsYfbtnokpWmS6-lf8XoQpSKusZwmxIkEMP-yE0Wxrj8o9sWKi29J-pxzkoCDhoUfdLt6NnBWxhESpegh8BzNcEruqxuDQD-JRmaTsbRDaBHTQTePMzQePhXl7KcEG9Cfkw2sa7P1W1e

JSON Response example

Below is a collection of logs from a query of INFO logs created between 2020-08-09T22:45:00 and 2020-08-09T22:45:06:

{
  "messages": [
    {
      "msgTimestamp": "2020-08-09T22:45:06,852",
      "logLevel": "INFO",
      "requestId": "",
      "node": "reverseproxy.domain.com",
      "username": "KBadmin",
      "msg": "Item '348254a44fe34c26af8be121ff071134' (id:348254a44fe34c26af8be121ff071134) updated.",
      "source": "Sharing",
      "pod": "gis-portal-sharing-7cf9668cc9-mdsbh",
      "logCode": "202010",
      "processID": "65",
      "threadID": "63",
      "serverID": "",
      "serviceTypes": "",
      "exceptionDetail": ""
    },
    {
      "msgTimestamp": "2020-08-09T22:45:06,731",
      "logLevel": "INFO",
      "requestId": "",
      "node": "reverseproxy.domain.com",
      "username": "KBadmin",
      "msg": "Item 'e1d3f7a0cd784f61b79ed66d317ee485' updated.",
      "source": "Sharing",
      "pod": "gis-portal-sharing-7cf9668cc9-mdsbh",
      "logCode": "202010",
      "processID": "65",
      "threadID": "66",
      "serverID": "",
      "serviceTypes": "",
      "exceptionDetail": ""
    },
    {
      "msgTimestamp": "2020-08-09T22:45:05,728",
      "logLevel": "INFO",
      "requestId": "f8372b7e-23b7-4aff-8974-d59ac5f7b0e3",
      "node": "reverseproxy.domain.com",
      "username": "",
      "msg": "Service 'SampleService.MapServer' was started successfully.",
      "source": "Enterprise Admin",
      "pod": "gis-enterpriseadmin-7b988bddd7-ds67d",
      "logCode": "1251",
      "processID": "1",
      "threadID": "66",
      "serverID": "",
      "serviceTypes": "",
      "exceptionDetail": ""
    },
    {
      "msgTimestamp": "2020-08-09T22:45:05,728",
      "logLevel": "INFO",
      "requestId": "f8372b7e-23b7-4aff-8974-d59ac5f7b0e3",
      "node": "reverseproxy.domain.com",
      "username": "",
      "msg": "Service 'SampleService.MapServer' was created successfully.",
      "source": "Enterprise Admin",
      "pod": "gis-enterpriseadmin-7b988bddd7-ds67d",
      "logCode": "1249",
      "processID": "1",
      "threadID": "66",
      "serverID": "",
      "serviceTypes": "",
      "exceptionDetail": ""
    },
    {
      "msgTimestamp": "2020-08-09T22:45:05,432",
      "logLevel": "INFO",
      "requestId": "",
      "node": "reverseproxy.domain.com",
      "username": "",
      "msg": "Service 'SampleService.MapServer' started successfully.",
      "source": "",
      "pod": "gis-v8fe9d235-ee20-4779-8770-ff9c493c2f66-mapserver-6d7cd5zrgdh",
      "logCode": "10021",
      "processID": "1",
      "threadID": "1",
      "serverID": "v8fe9d235-ee20-4779-8770-ff9c493c2f66",
      "serviceTypes": "",
      "exceptionDetail": ""
    },
    {
      "msgTimestamp": "2020-08-09T22:45:05,323",
      "logLevel": "INFO",
      "requestId": "",
      "node": "reverseproxy.domain.com",
      "username": "",
      "msg": "Server object instance created successfully - SampleService.",
      "source": "",
      "pod": "gis-v8fe9d235-ee20-4779-8770-ff9c493c2f66-mapserver-6d7cd5zrgdh",
      "logCode": "8000",
      "processID": "171",
      "threadID": "23",
      "serverID": "v8fe9d235-ee20-4779-8770-ff9c493c2f66",
      "serviceTypes": "",
      "exceptionDetail": ""
    },
    {
      "msgTimestamp": "2020-08-09T22:45:05,314",
      "logLevel": "INFO",
      "requestId": "",
      "node": "reverseproxy.domain.com",
      "username": "",
      "msg": "Construct ended.",
      "source": "SampleService.MapServer",
      "pod": "gis-v8fe9d235-ee20-4779-8770-ff9c493c2f66-mapserver-6d7cd5zrgdh",
      "logCode": "12003",
      "processID": "38",
      "threadID": "41",
      "serverID": "",
      "serviceTypes": "",
      "exceptionDetail": ""
    },
    {
      "msgTimestamp": "2020-08-09T22:45:05,299",
      "logLevel": "INFO",
      "requestId": "",
      "node": "reverseproxy.domain.com",
      "username": "",
      "msg": "Construct started.",
      "source": "SampleService.MapServer",
      "pod": "gis-v8fe9d235-ee20-4779-8770-ff9c493c2f66-mapserver-6d7cd5zrgdh",
      "logCode": "12002",
      "processID": "38",
      "threadID": "41",
      "serverID": "",
      "serviceTypes": "",
      "exceptionDetail": ""
    },
    {
      "msgTimestamp": "2020-08-09T22:45:05,283",
      "logLevel": "INFO",
      "requestId": "",
      "node": "reverseproxy.domain.com",
      "username": "",
      "msg": "Construct ended.",
      "source": "SampleSerice.MapServer",
      "pod": "gis-v8fe9d235-ee20-4779-8770-ff9c493c2f66-mapserver-6d7cd5zrgdh",
      "logCode": "16003",
      "processID": "38",
      "threadID": "41",
      "serverID": "",
      "serviceTypes": "",
      "exceptionDetail": ""
    },
    {
      "msgTimestamp": "2020-08-09T22:45:05,271",
      "logLevel": "INFO",
      "requestId": "",
      "node": "reverseproxy.domain.com",
      "username": "",
      "msg": "Construct started.",
      "source": "SampleService.MapServer",
      "pod": "gis-v8fe9d235-ee20-4779-8770-ff9c493c2f66-mapserver-6d7cd5zrgdh",
      "logCode": "16002",
      "processID": "38",
      "threadID": "41",
      "serverID": "",
      "serviceTypes": "",
      "exceptionDetail": ""
    },
    {
      "msgTimestamp": "2020-08-09T22:45:03,147",
      "logLevel": "INFO",
      "requestId": "",
      "node": "reverseproxy.domain.com",
      "username": "KBadmin",
      "msg": "Item 'e09d419948194eefb833c88e0dc6ffce' updated.",
      "source": "Sharing",
      "pod": "gis-portal-sharing-7cf9668cc9-mdsbh",
      "logCode": "202010",
      "processID": "65",
      "threadID": "65",
      "serverID": "",
      "serviceTypes": "",
      "exceptionDetail": ""
    },
    {
      "msgTimestamp": "2020-08-09T22:45:01,122",
      "logLevel": "INFO",
      "requestId": "",
      "node": "reverseproxy.domain.com",
      "username": "KBadmin",
      "msg": "Item '55a29baae49b4962aea6e663e41abc4b' updated.",
      "source": "Sharing",
      "pod": "gis-portal-sharing-7cf9668cc9-mdsbh",
      "logCode": "202010",
      "processID": "65",
      "threadID": "61",
      "serverID": "",
      "serviceTypes": "",
      "exceptionDetail": ""
    }
  ],
  "total": 21,
  "start": 1,
  "num": 1000,
  "nextStart": -1,
  "query": "{\"logLevel\":\"INFO\",\"logCode\":[],\"username\":[],\"requestId\":[],\"serviceTypes\":[],\"exceptionDetail\":false}"
}