Query Logs

URL:
https://<logs-url>/query
Methods:
GET
Required Capability:
Administrator or Create and Edit ArcGIS Notebooks
Version Introduced:
10.7

Description

The query operation provides a way to aggregate, filter, and page through logs across the ArcGIS Notebook Server site.

JSON request parameters

ParameterDetails

level

The minimum log level for which to query. It returns only records with a log level at or more severe than this level. The default level is WARNING .

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

startTime

The most recent time to query. If left blank, the query will include logs up to the present time.

endTime

The oldest time to include in the result set. You can use this to limit the query to the last few minutes or hours as needed. If left blank, the query will include all logs recorded since logging began.

filterType

Specifies whether the filter parameter is formatted as JSON. If this operation is performed in the ArcGIS Notebook Server Admin Directory UI, this parameter will be automatically added to the request when executed.

filter

Filtering provides flexibility and specificity by combining any of the filter properties, each given as a comma-separated list. For more information on individual properties, see the Filter properties section below.

pageSize

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

f

The response format. The default format is html .

Values: html | json | pjson | xml

Filter properties

ParameterDetails

codes

One or a range of log codes assigned to a log message.

users

One or multiple users (separated by commas) whose related log messages to query.

requestIds

Specifies an ID assigned to a specific server request.

machines

Specifies whether to query all machines or a specific machine in your server site. The default value is All .

source

The source of logged events. The default value is All .

HTML request parameters

ParameterDetails

Log Level

The minimum log level for which to query. It returns only records with a log level at or more severe than this level. The default level is WARNING .

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

Source

The source of logged events. The default value is All .

Start Time

The most recent time to query. If left blank, the query will include logs up to the present time.

End Time

The oldest time to include in the result set. You can use this to limit the query to the last few minutes or hours as needed. If left blank, the query will include all logs recorded since logging began.

Log Codes

One or a range of log codes assigned to a log message.

Users

One or multiple users (separated by commas) whose related log messages to query.

Request ID

Specifies an ID assigned to a specific server request.

Machines

Specifies whether to query all machines or a specific machine in your server site. The default value is All .

Message Count

The maximum number of log records to be returned by this query. The limit is 10,000 records. The default value is 1,000.

Format

The response format. The default format is html .

Values: html | json | pjson | xml

Example usage

Below is a sample request for the query operation:

Use dark colors for code blocksCopy
1
https://notebookserver.domain.com:port/arcgis/admin/logs/query?level=WARNING&startTime=&endTime=&filterType=json&filter={"codes":[], "users":[], "requestIds":[], "machines": "*", "source": "*"}&pageSize=1000&f=html

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
  "hasMore": false,
  "startTime": 1549431957539,
  "endTime": 1549417558390,
  "logMessages": [
    {
      "elapsed": "",
      "process": "6880",
      "code": 1065,
      "machine": "NOTEBOOKSERVER.DOMAIN.COM",
      "methodName": "",
      "time": 1549417890408,
      "source": "Admin",
      "thread": "1",
      "type": "WARNING",
      "message": "Failed to log in. Invalid username 'admin' or password specified.",
      "user": ""
    }
  ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.