Sha256: 3891e23e03c8386e55593bbe8dda83a79a985b39c644cdf4d7f3f6ccf3508c7f

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SnapshotsAPI.new
start = 789 # Integer | The POSIX timestamp of the start of the query.
_end = 789 # Integer | The POSIX timestamp of the end of the query.
opts = {
  metric_query: "metric_query_example", # String | The metric query.
  event_query: "event_query_example", # String | A query that adds event bands to the graph.
  graph_def: "graph_def_example", # String | A JSON document defining the graph. `graph_def` can be used instead of `metric_query`. The JSON document uses the [grammar defined here](https://docs.datadoghq.com/graphing/graphing_json/#grammar) and should be formatted to a single line then URL encoded.
  title: "title_example", # String | A title for the graph. If no title is specified, the graph does not have a title.
}

begin
  # Take graph snapshots
  result = api_instance.get_graph_snapshot(start, _end, opts)
  p result
rescue DatadogAPIClient::V1::APIError => e
  puts "Error when calling SnapshotsAPI->get_graph_snapshot: #{e}"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datadog_api_client-1.7.0 examples/generated/v1/snapshots/GetGraphSnapshot.rb