Sha256: 11ad910a51b4caaa60fb7e0cedd348d1c2277d5a3c722a22383fef084c4c30b2

Contents?: true

Size: 563 Bytes

Versions: 36

Compression:

Stored size: 563 Bytes

Contents

# Search logs returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::LogsAPI.new

body = DatadogAPIClient::V2::LogsListRequest.new({
  filter: DatadogAPIClient::V2::LogsQueryFilter.new({
    query: "datadog-agent",
    indexes: [
      "main",
    ],
    from: "2020-09-17T11:48:36+01:00",
    to: "2020-09-17T12:48:36+01:00",
  }),
  sort: DatadogAPIClient::V2::LogsSort::TIMESTAMP_ASCENDING,
  page: DatadogAPIClient::V2::LogsListRequestPage.new({
    limit: 5,
  }),
})
opts = {
  body: body,
}
p api_instance.list_logs(opts)

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
datadog_api_client-2.29.1 examples/v2/logs/ListLogs.rb
datadog_api_client-2.28.1 examples/v2/logs/ListLogs.rb
datadog_api_client-2.27.1 examples/v2/logs/ListLogs.rb
datadog_api_client-2.26.1 examples/v2/logs/ListLogs.rb
datadog_api_client-2.26.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.25.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.24.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.22.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.21.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.20.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.19.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.18.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.17.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.16.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.15.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.14.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.13.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.12.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.11.0 examples/v2/logs/ListLogs.rb
datadog_api_client-2.10.0 examples/v2/logs/ListLogs.rb