Custom device Log Monitoring API - GET log content

Gets the 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 produces an application/json payload.

GET
  • Managed https://{your-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/custom-devices/{customDeviceId}/logs/jobs/{jobId}/records
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v1/entity/infrastructure/custom-devices/{customDeviceId}/logs/jobs/{jobId}/records

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
scrollToken string

The scrollToken value from the previous response.

You can use it to get the next page of results. Without it, the first page is always returned.

query optional
pageSize integer

The number of records per result page.

If not set, each page contains 100 results.

Maximum allowed value is 10000.

query optional

Response format

When scrolling through the result records using scroll token, the last result page contains an empty records list node and no scrollToken node.

The LogJobRecordsResult object

The results of the log analysis job.

Element Type Description
records LogRecord[]

The list of log analysis results.

The last page contains empty list.

scrollToken string

The scroll token for the next page of results.

Without it you'll get the first page again.

The LogRecord object

The analysis result for a single log entry.

Element Type Description
timestamp integer

The timestamp of the log entry, in UTC milliseconds.

logLevel string

The severity level of the log entry.

hostId string

The entity ID of the host that produced the log.

Not applicable to OS logs.

text string

The text of the log entry.

customFields object

The map of the log entry custom fields.