ListLogsGet
Search and retrieve logs matching specific criteria using query parameters like timestamp, storage tier, and indexes. Paginate results for efficient log management.
Instructions
List endpoint returns logs that match a log search query. Results are paginated.
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.
Query Parameters:
- filter[query]: Search query following logs syntax.
- filter[indexes]: For customers with multiple indexes, the indexes to search. Defaults to '*' which means all indexes
- filter[from]: Minimum timestamp for requested logs.
- filter[to]: Maximum timestamp for requested logs.
- filter[storage_tier]: Specifies the storage type to be used
- sort: Order of logs in results.
- page[cursor]: List following results with a cursor provided in the previous query.
- page[limit]: Maximum number of logs in the response.
Responses:
- 200 (Success): OK
- Content-Type:
application/json
- Response Properties:
- data: Array of logs matching the request.
- Example:
- Content-Type:
- 400: Bad Request
- Content-Type:
application/json
- Response Properties:
- errors: A list of errors.
- Example:
- Content-Type:
- 403: Not Authorized
- Content-Type:
application/json
- Response Properties:
- errors: A list of errors.
- Example:
- Content-Type:
- 429: Too many requests
- Content-Type:
application/json
- Response Properties:
- errors: A list of errors.
- Example:
- Content-Type:
Input Schema
Name | Required | Description | Default |
---|---|---|---|
filter[from] | No | Minimum timestamp for requested logs. | |
filter[indexes] | No | For customers with multiple indexes, the indexes to search. Defaults to '*' which means all indexes | |
filter[query] | No | Search query following logs syntax. | |
filter[storage_tier] | No | Specifies storage type as indexes, online-archives or flex | indexes |
filter[to] | No | Maximum timestamp for requested logs. | |
page[cursor] | No | List following results with a cursor provided in the previous query. | |
page[limit] | No | Maximum number of logs in the response. | |
sort | No | Sort parameters when querying logs. |