Custom device Log Monitoring API - POST filtered log content
Gets the top content of the specified log.
The log content can be retrieved using this call only when logAnalysisStatus equals READY
in the job status call.
The request consumes and produces an application/json
payload.
POST |
|
Authentication
To execute this request, you need the Read log content (LogExport
) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
customDeviceId | string |
The Dynatrace entity ID of the required custom device. |
path | required |
jobId | string |
The ID of the required log analysis job. You can retrieve it from the response of the POST analysis job request. |
path | required |
body | FilterTopLogRecords |
Filter the log content by the specified criteria. See the Search patterns in log data and parse results help page for the syntax definition and examples. |
body | optional |
Body format
The FilterTopLogRecords object
A query to filter top log records.
Element | Type | Description | Required |
---|---|---|---|
filterQuery | string |
The query for filtering. See the Search patterns in log data and parse results help page for syntax description. |
optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request. See the Example expandable section for working sample request.
{
"filterQuery": "`testCustomField` = 4624"
}
Response
When scrolling through the result records using a scroll token, the last result page contains an empty records array and no scrollToken field.
Response codes
Code | Description |
---|---|
200 | Success |
400 | Failed. See the response body for details |
Response body
The LogJobRecordsTopValuesRestResult object
The top values results of the log analysis job.
Element | Type | Description |
---|---|---|
parsingFieldTopValues | ParsingFieldTopValue[] | Log analysis parsing result top values |
valuesCount | integer | Log analysis parsing result top values count |
The ParsingFieldTopValue object
Element | Type | Description |
---|---|---|
fieldName | string | Top value parsing field name |
occurrences | Occurrence[] | Top value parsing field occurrences |
The Occurrence object
Element | Type | Description |
---|---|---|
value | string | Value of top parsing field occurrence |
count | integer | Count of top parsing field occurrences |
{
"parsingFieldTopValues": [
{
"fieldName": ".Level",
"occurrences": [
{
"value": "INFO",
"count": "100"
}
]
}
],
"valuesCount": 0
}