---
title: "Take graph snapshots"
method: GET
path: "/api/v1/graph/snapshot"
tags: ["Snapshots"]
---

# Take graph snapshots

`GET /api/v1/graph/snapshot`

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.

## Query parameters

- `metric_query` string
- `start` integer, required
- `end` integer, required
- `event_query` string
- `graph_def` string
- `title` string
- `height` integer
- `width` integer

## Response `200`

OK

- GraphSnapshot — Object representing a graph snapshot.
  - `graph_def` 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.
  - `metric_query` string — The metric query. One of `metric_query` or `graph_def` is required.
  - `snapshot_url` string — URL of your [graph snapshot](https://docs.datadoghq.com/metrics/explorer/#snapshot).

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v1.md) · [All operations](https://skmtc.net/datadog/apis/api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v1/revisions/ca5871004d26/schema)
