Sha256: 02181a5b813e08ac83860838b722852a8f59bf652d188ce8ae022df23b6c3822

Contents?: true

Size: 629 Bytes

Versions: 29

Compression:

Stored size: 629 Bytes

Contents

# Search logs returns "OK" response with pagination

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

body = DatadogAPIClient::V2::LogsListRequest.new({
  filter: DatadogAPIClient::V2::LogsQueryFilter.new({
    from: "now-15m",
    indexes: [
      "main",
    ],
    to: "now",
  }),
  options: DatadogAPIClient::V2::LogsQueryOptions.new({
    timezone: "GMT",
  }),
  page: DatadogAPIClient::V2::LogsListRequestPage.new({
    limit: 2,
  }),
  sort: DatadogAPIClient::V2::LogsSort::TIMESTAMP_ASCENDING,
})
opts = {
  body: body,
}
api_instance.list_logs_with_pagination(opts) { |item| puts item }

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
datadog_api_client-2.8.0 examples/v2/logs/ListLogs_3138392594.rb
datadog_api_client-2.7.0 examples/v2/logs/ListLogs_3138392594.rb
datadog_api_client-2.6.0 examples/v2/logs/ListLogs_3138392594.rb
datadog_api_client-2.5.0 examples/v2/logs/ListLogs_3138392594.rb
datadog_api_client-2.4.0 examples/v2/logs/ListLogs_3138392594.rb
datadog_api_client-2.3.0 examples/v2/logs/ListLogs_3138392594.rb
datadog_api_client-2.2.0 examples/v2/logs/ListLogs_3138392594.rb
datadog_api_client-2.1.0 examples/v2/logs/ListLogs_3138392594.rb
datadog_api_client-2.0.2 examples/v2/logs/ListLogs_3138392594.rb