What does the Log Analytics API provide?

The Log Analytics API isn't available with the free tier of OneAgent log analysis. The API is only available for Dynatrace environments that have a paid Log Analytics license.

Dynatrace Log Analytics extends the capabilities of the free tier of OneAgent log analysis to additionally provide central log storage, flexible retention times, and no limits on the number of retained events, analyzed logs, or log sizes.

To use the Log Analytics API, you have to generate an API token. To do this, see How do I set up authentication to use the Dynatrace API?

Using the Log Analytics API you can:

  • Get log lists based on host ID or process group.

  • Start a log retrieval job based on host ID or process group.
    Optionally, you can indicate a start and end timestamp or query to filter log content.

  • Get the status of a log retrieval job based on host ID or process group.

  • Get the content of a log based on host ID or process group.

  • Delete or cancel a log retrieval job based on host ID or process group.

The following example is a typical sequence of API calls that uses the host ID as a main parameter and all API actions are limited to logs on this host. The same API calls can be made using a process group ID, in which case the logs could be dispersed across multiple hosts.

Fetch the list of logs. For details on this API call, see How do I fetch the list of logs?

Start a log retrieval job. For details on this API call, see How do I start a log retrieval job?

Get the status of a log retrieval job. For details on this API call, see How do I get the status of a log retrieval job?

Get the content of a log. For details on this API call, see How do I get the content of a log?

Delete or cancel log retrieval job. For details on this API call, see How do I delete or cancel log retrieval job?