Datadog Logs

Search logs

List endpoint returns logs that match a log search query.

Inputs

Field

Type

Description

query

string

The search query - following the log search syntax.

time [required]

Timeframe to retrieve the log from.

startAt

string

Hash identifier of the first log to return in the list, available in a log id attribute.

sort

enum

Time-ascending asc or time-descending descresults. Allowed enum values: asc,desc

limit

number

Number of logs to return in the response. Default value of 50, maximum value of 1,000.

default: 50

index

string

The log index on which the request is performed.

Outputs

Expand All

Field

Type

Description

nextLogId

string

Hash identifier of the next log to return in the list.

status

string

Status of the response.

logs

[object]

Array of logs matching the request and the nextLogId if sent.

id

string

Unique ID of the Log.

content

object

JSON object containing all log attributes and their associated values.

timestamp

date-time

Timestamp of your log.

tags

object

Array of tags associated with your log.

attributes

object

JSON object of attributes from your log.

host

string

Name of the machine from where the logs are being sent.

service

string

The name of the application or service generating the log events.

message

string

The message reserved attribute of your log.

url

string

The URL of the log.