v1

latestOpenAPI 3.0.02026-07-142351,1971.3 MB
Snapshots

Take graph snapshots

Take graph snapshots. Snapshots are PNG images generated by rendering a specified widget in a web page and capturing it once the data is available. The image is then uploaded to cloud storage.

Note: When a snapshot is created, there is some delay before it is available.

get/api/v1/graph/snapshot

Query parameters

metric_querystring

The metric query.

startinteger required

The POSIX timestamp of the start of the query in seconds.

endinteger required

The POSIX timestamp of the end of the query in seconds.

event_querystring

A query that adds event bands to the graph.

graph_defstring

A JSON document defining the graph. graph_def can be used instead of metric_query. The JSON document uses the grammar defined here and should be formatted to a single line then URL encoded.

titlestring

A title for the graph. If no title is specified, the graph does not have a title.

heightinteger

The height of the graph. If no height is specified, the graph's original height is used.

widthinteger

The width of the graph. If no width is specified, the graph's original width is used.

Response

OK

graph_defstring

A JSON document defining the graph. graph_def can be used instead of metric_query. The JSON document uses the grammar defined here and should be formatted to a single line then URL encoded.

metric_querystring

The metric query. One of metric_query or graph_def is required.

snapshot_urlstring

URL of your graph snapshot.

Example response

{
  "snapshot_url": "https://app.datadoghq.com/s/f12345678/aaa-bbb-ccc"
}