- URL:
- https://<logs-url>/query
- Methods:
- GET
Description
The query  operation on the logs resource provides a way to aggregate, filter, and page through logs across the entire  ArcGIS Mission Server site.
Request parameters
| Parameter | Details | 
|---|---|
| 
 | The most recent time to query. If the  Example  | 
| 
 | 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  | 
| 
 | Only records with a log level at or more severe than this level are returned. The default value is  Values:  | 
| 
 (Required) | Specifies that the filter  Example  | 
| 
 (Required) | Filtering provides flexibility and specificity by combining any of the filter properties (L), each given as a comma-separated list. Example  | 
| 
 | The maximum number of log records to be returned by this query. The default messages per page is 1000. The limit is 10000 records. Example  | 
| 
 (Required) | The response format. The default value is html. Values:  | 
Filter properties
| Property | Description | 
|---|---|
| 
 (Optional) | Specifies the log codes assigned to server logs . To query all codes, set the value to  Examples  | 
| 
 (Optional) | Specifies the machine process IDs to query. To query logs from all process IDs, set the value to  Examples  | 
| 
 (Optional) | Introduced at 10.7. Specifies an ID assigned to a specific server request. Examples  | 
| 
 (Optional) | Specifies the server components delivering the log message. To query logs from all components, set the value to  Values:  | 
| 
 (Optional) | Specifies whether to query all, none, or a specific service in your site. To query logs from all services, set the value to  Example  | 
| 
 (Optional) | Specifies whether to query all or a specific machine in your server sit. To query logs from all machines, set the value to  Examples  | 
Example usage
Below is a sample request URL for query .
https://machine.domain.com/webadaptor/admin/logs/query?startTime=1310165288&endTime=1310125087&level=INFO&filterType=json&filter={"codes": [8271, 9003], "processIds": [4392, 9816], "requestIds": ["a1fc28db-4575-4a09-84df-7b313c239e5b", "22d8113a-e229-4e48-8fe4-008a5037fcba"], "services": ["Pro_mapimage.MapServer"], "machines": ["machine.domain.com"]}&pageSize=1000&f=jsonJSON Response example
{
  "hasMore": true,
  "startTime": 1310165288,
  "endTime": 1310125087,
  "logMessages": [
    {
      "type": "INFO",
      "message": "Service has been successfully created in the server context.",
      "time": 1311101673947,
      "source": "Server",
      "machine": "MACHINE.DOMAIN.COM",
      "user": "",
      "code": 8271,
      "elapsed": "",
      "process": "4392",
      "thread": "1",
      "methodName": "",
      "requestID": "a1fc28db-4575-4a09-84df-7b313c239e5b"
    },
    {
     	"type": "INFO",
      "message": "Unable to process request. Service ByRef2/MapServer not found ",
      "time": 1540338505127,
      "source": "Rest",
      "machine": "MACHINE.DOMAIN.COM",
      "user": "",
      "code": 9003,
      "elapsed": "",
      "process": "9816",
      "thread": "1",
      "methodName": "",
      "requestID": "22d8113a-e229-4e48-8fe4-008a5037fcba"
    }
  ]
}