provider Logs GET /api/v2/logs/events
@utdk/datadog /api/v2/logs/events
Search logs (GET)
List endpoint returns logs that match a log search query. [Results are paginated][1]. Use this endpoint to search and filter your logs. **If you are considering archiving logs for your organization, consider use of the Datadog archive capabilities instead of the log list API. See [Datadog Logs Archive documentation][2].** [1]: /logs/guide/collect-multiple-logs-with-pagination [2]: https://docs.datadoghq.com/logs/archives
filter[query] query
Search query following logs syntax.
string
filter[indexes] query
For customers with multiple indexes, the indexes to search. Defaults to '*' which means all indexes
array
filter[from] query
Minimum timestamp for requested logs.
string
filter[to] query
Maximum timestamp for requested logs.
string
filter[storage_tier] query
Specifies the storage type to be used
enum: indexes, online-archives, flex
sort query
Order of logs in results.
enum: timestamp, -timestamp
page[cursor] query
List following results with a cursor provided in the previous query.
string
page[limit] query
Maximum number of logs in the response.
integer

Try it

Authentication
Configure credentials for Datadog API V2 Collection
listlogsget
GET/api/v2/logs/events
List endpoint returns logs that match a log search query. [Results are paginated][1]. Use this endpoint to search and filter your logs. **If you are considering archiving logs for your organization, consider use of the Datadog archive capabilities instead of the log list API. See [Datadog Logs Archive documentation][2].** [1]: /logs/guide/collect-multiple-logs-with-pagination [2]: https://docs.datadoghq.com/logs/archives

Search query following logs syntax.

For customers with multiple indexes, the indexes to search. Defaults to '*' which means all indexes

Minimum timestamp for requested logs.

Maximum timestamp for requested logs.

Specifies the storage type to be used

Order of logs in results.

List following results with a cursor provided in the previous query.

Maximum number of logs in the response.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import datadog from '@utdk/datadog';

await datadog.listlogsget({
  "filter[storage_tier]": "indexes",
  "page[limit]": 10
})