URL:
https://<root>/logs/query
Methods:
GET
Required Capability:
Administrator
Version Introduced:
12.2

Description

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

Request parameters

ParameterDetails

level

Only records with a log level at or more severe than this level are returned. The default value is WARNING.

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

startTime

The most recent time to query. If the hasMore member of the response object is true, pass the endTime member as the startTime parameter for the next request to get the next set of records. Time can be specified in milliseconds since UNIX epoch or as an ArcGIS Data Pipelines Server time stamp.

Example
Use dark colors for code blocksCopy
1
startTime=1566379810000

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.

Example
Use dark colors for code blocksCopy
1
endTime=1566423010000

filterType

(Required)

Specifies that the filter filter format is JSON. If this operation is being performed within the ArcGIS Data Pipelines Server Admin Directory UI, this parameter will automatically be added to the request when executed.

Example
Use dark colors for code blocksCopy
1
filterType=json

filter

(Required)

Filtering provides flexibility and specificity by combining any of the filter properties, each given as a comma-separated list.

Example
Use dark colors for code blocksCopy
1
2
3
4
5
6
filter={
  "codes": [8271, 9003],
  "users": [],
  "machines": ["machine.example.com"],
  "source":"*"
}

pageSize

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

Example
Use dark colors for code blocksCopy
1
pageSize=1000

f

The response format. The default value is html.

Values: html | json | pjson | xml

Filter properties

PropertyDescription

codes

(Optional)

Specifies the log codes assigned to server logs. To query all codes, set the value to [].

Example
Use dark colors for code blocksCopy
1
2
3
4
5
//web example
170018, 1065

//scripting example
"codes": [170018, 1065]

users

(Optional)

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

Example
Use dark colors for code blocksCopy
1
2
3
4
5
//web example
username1, username2

//scripting example
"users": [username1, username2]

machines

(Optional)

Specifies whether to query all or a specific machine in your server site. To query logs from all machines, set the value to *.

Example
Use dark colors for code blocksCopy
1
2
3
4
5
//web example
machine.example.com

//scripting example
"machines": ["machine.example.com"]

source

(Optional)

Specifies the server components delivering the log message. To query logs from all components, set the value to *. To query logs related to data pipeline workflow processing, set the value to WORKER.

Values: * | ADMIN | REST | WORKER | SERVER

Example usage

The following is a sample GET request for the query operation.

Use dark colors for code blocksCopy
1
https://organization.example.com/<context>/admin/logs/query?startTime=1310165288&endTime=1310125087&level=INFO&filterType=json&filter={"codes":[8271,9003],"users":[username1,username2],"machines":["machine.example.com"],"source":"*"}&pageSize=1000&f=pjson

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
21
22
23
24
25
26
27
28
29
30
31
32
33
{
    "hasMore": true,
    "startTime": 1779470175920,
    "endTime": 1779140650929,
    "logMessages": [{
            "elapsed": "",
            "process": "123123",
            "code": 1146,
            "machine": "MACHINE.EXAMPLE.COM",
            "requestID": "b05433ca-16bf-4c3c-a3a0-a575b9e256e5",
            "methodName": "",
            "time": 1779470175920,
            "source": "Admin",
            "thread": "37",
            "type": "INFO",
            "message": "Successfully updated the configuration store.",
            "user": "admin_user"
        }, {
            "elapsed": "",
            "process": "123123",
            "code": 1032,
            "machine": "MACHINE.EXAMPLE.COM",
            "requestID": "b05433ca-16bf-4c3c-a3a0-a575b9e256e5",
            "methodName": "",
            "time": 1779470175920,
            "source": "Admin",
            "thread": "37",
            "type": "INFO",
            "message": "Log settings updated. '[Logs directory = '/data/arcgis/datapipelines/usr/logs/', Log level = DEBUG, Max age in days = 90]'",
            "user": "admin_user"
        }
    ]
}

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