---
title: List notebook widgets
description: List the notebook widgets in document order.
breadcrumbs: Docs > API > List notebook widgets
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# List notebook widgets

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                             |
| ----------------- | ------------------------------------------------------------------------ |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/notebooks/{notebook_id}/widgets     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/notebooks/{notebook_id}/widgets |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/notebooks/{notebook_id}/widgets |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/notebooks/{notebook_id}/widgets      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/notebooks/{notebook_id}/widgets |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/notebooks/{notebook_id}/widgets |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/notebooks/{notebook_id}/widgets |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/notebooks/{notebook_id}/widgets      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/notebooks/{notebook_id}/widgets  |

### Overview

List the notebook widgets in document order. Widgets only support JSON responses.

Widgets accept and return JSON only; text/markdown is rejected. Resource requests accept
application/json or application/vnd.api+json; JSON responses and all errors use
application/vnd.api+json.

This endpoint requires the `notebooks_read` permission.

### Arguments

#### Path Parameters

| Field                    | Type    | Description         |
| ------------------------ | ------- | ------------------- |
| notebook_id [*required*] | integer | Unique notebook ID. |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Response containing notebook widgets in document order.

| Parent field      | Field                          | Type      | Description                                                                                                                                                                                                                                                               |
| ----------------- | ------------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                   | data [*required*]              | [object]  | Notebook widgets.                                                                                                                                                                                                                                                         |
| data              | attributes [*required*]        | object    | Widget attributes. The title is in definition.title; split_by is omitted when empty.                                                                                                                                                                                      |
| attributes        | definition [*required*]        | object    | Notebook widget definition. The type selects the widget-specific schema; title is stored here. Supports notebook widgets, including analysis widgets and invalid_widget placeholders. Markdown and rich-text definitions cannot be submitted through the widget endpoint. |
| definition        | original_definition            | object    | Original definition preserved by an invalid_widget placeholder.                                                                                                                                                                                                           |
| definition        | title                          | string    | Optional widget title. Omit it from a replacement definition to clear the title.                                                                                                                                                                                          |
| definition        | type [*required*]              | string    | Notebook widget type.                                                                                                                                                                                                                                                     |
| definition        | validation_errors              | [object]  | Nonempty diagnostics required for an invalid_widget placeholder.                                                                                                                                                                                                          |
| validation_errors | code [*required*]              | string    | Machine-readable diagnostic code.                                                                                                                                                                                                                                         |
| validation_errors | location [*required*]          | object    | Location of a diagnostic in its documented representation.                                                                                                                                                                                                                |
| location          | pointer [*required*]           | string    | JSON Pointer to the affected field.                                                                                                                                                                                                                                       |
| validation_errors | message [*required*]           | string    | Description of the validation failure.                                                                                                                                                                                                                                    |
| attributes        | document_revision [*required*] | uuid      | Opaque document revision UUID. Send the most recently observed value when updating the notebook.                                                                                                                                                                          |
| attributes        | graph_size [*required*]        | enum      | Widget graph size. Null clears the local size. Allowed enum values: `xs`, `s`, `m`, `l`, `xl`, `null`.                                                                                                                                                                    |
| attributes        | position [*required*]          | int64     | Ordering value within the document. Compare positions only within the same document revision; values can have gaps and change after edits.                                                                                                                                |
| attributes        | split_by                       | object    | Widget split configuration. Null clears the configuration.                                                                                                                                                                                                                |
| split_by          | keys [*required*]              | [string]  | Split keys.                                                                                                                                                                                                                                                               |
| split_by          | tags [*required*]              | [string]  | Split tags.                                                                                                                                                                                                                                                               |
| attributes        | time [*required*]              | object    | Widget-local time. Null uses notebook time. Accepts the same relative, absolute, growing, and calendar shapes as notebook time, optionally with hide_incomplete_cost_data, or that preference alone.                                                                      |
| time              | end                            | date-time | End time.                                                                                                                                                                                                                                                                 |
| time              | hide_incomplete_cost_data      | boolean   | Whether to hide incomplete Cloud Cost data.                                                                                                                                                                                                                               |
| time              | live                           | boolean   | Whether the time range should shift to end at the current time.                                                                                                                                                                                                           |
| time              | live_span                      | string    | Relative time span.                                                                                                                                                                                                                                                       |
| time              | offset                         | int64     | Calendar offset.                                                                                                                                                                                                                                                          |
| time              | start                          | date-time | Start time.                                                                                                                                                                                                                                                               |
| time              | type                           | enum      | Growing or calendar time type. Allowed enum values: `growing`, `daily`, `weekly`, `monthly`, `yearly`.                                                                                                                                                                    |
| attributes        | widget_type [*required*]       | string    | Widget type.                                                                                                                                                                                                                                                              |
| data              | id [*required*]                | string    | Stable widget ID.                                                                                                                                                                                                                                                         |
| data              | links [*required*]             | object    | Links for a notebook resource.                                                                                                                                                                                                                                            |
| links             | self [*required*]              | string    | API URL for the notebook.                                                                                                                                                                                                                                                 |
| data              | relationships [*required*]     | object    | Notebook, optional section, and available widget export relationships. Analysis widgets may include a csv link; supported graph widgets without split groups may include a snapshot link.                                                                                 |
| relationships     | csv                            | object    | Link to start a widget CSV export or image snapshot.                                                                                                                                                                                                                      |
| csv               | links [*required*]             | object    | Links to a related resource.                                                                                                                                                                                                                                              |
| links             | related [*required*]           | string    | Related API URL.                                                                                                                                                                                                                                                          |
| relationships     | notebook [*required*]          | object    | Relationship to the containing notebook.                                                                                                                                                                                                                                  |
| notebook          | data [*required*]              | object    | Stable notebook resource identity.                                                                                                                                                                                                                                        |
| data              | id [*required*]                | string    | Notebook ID.                                                                                                                                                                                                                                                              |
| data              | type [*required*]              | enum      | Notebooks resource type. Allowed enum values: `notebooks`. Default: `notebooks`.                                                                                                                                                                                          |
| notebook          | links [*required*]             | object    | Links to a related resource.                                                                                                                                                                                                                                              |
| links             | related [*required*]           | string    | Related API URL.                                                                                                                                                                                                                                                          |
| relationships     | section                        | object    | Relationship to the containing section, when one exists.                                                                                                                                                                                                                  |
| section           | data [*required*]              | object    | Stable section identity.                                                                                                                                                                                                                                                  |
| data              | id [*required*]                | string    | Stable section ID.                                                                                                                                                                                                                                                        |
| data              | type [*required*]              | enum      | Notebook section resource type. Allowed enum values: `notebook_sections`.                                                                                                                                                                                                 |
| section           | links [*required*]             | object    | Links to a related resource.                                                                                                                                                                                                                                              |
| links             | related [*required*]           | string    | Related API URL.                                                                                                                                                                                                                                                          |
| relationships     | snapshot                       | object    | Link to start a widget CSV export or image snapshot.                                                                                                                                                                                                                      |
| snapshot          | links [*required*]             | object    | Links to a related resource.                                                                                                                                                                                                                                              |
| links             | related [*required*]           | string    | Related API URL.                                                                                                                                                                                                                                                          |
| data              | type [*required*]              | enum      | Notebook widget resource type. Allowed enum values: `notebook_widgets`.                                                                                                                                                                                                   |
|                   | meta                           | object    | Response metadata. Warnings can appear on reads as well as writes and are omitted when no invalid widgets are present.                                                                                                                                                    |
| meta              | warnings                       | [object]  | Diagnostics describing persisted widget placeholders.                                                                                                                                                                                                                     |
| warnings          | code [*required*]              | string    | Warning code.                                                                                                                                                                                                                                                             |
| warnings          | location                       | object    | Location of a diagnostic in its documented representation.                                                                                                                                                                                                                |
| location          | pointer [*required*]           | string    | JSON Pointer to the affected field.                                                                                                                                                                                                                                       |
| warnings          | message [*required*]           | string    | Warning description.                                                                                                                                                                                                                                                      |
| warnings          | meta                           | object    | Context for a widget diagnostic inside Markdown.                                                                                                                                                                                                                          |
| meta              | definition                     | object    | Notebook widget definition. The type selects the widget-specific schema; title is stored here. Supports notebook widgets, including analysis widgets and invalid_widget placeholders. Markdown and rich-text definitions cannot be submitted through the widget endpoint. |
| definition        | original_definition            | object    | Original definition preserved by an invalid_widget placeholder.                                                                                                                                                                                                           |
| definition        | title                          | string    | Optional widget title. Omit it from a replacement definition to clear the title.                                                                                                                                                                                          |
| definition        | type [*required*]              | string    | Notebook widget type.                                                                                                                                                                                                                                                     |
| definition        | validation_errors              | [object]  | Nonempty diagnostics required for an invalid_widget placeholder.                                                                                                                                                                                                          |
| validation_errors | code [*required*]              | string    | Machine-readable diagnostic code.                                                                                                                                                                                                                                         |
| validation_errors | location [*required*]          | object    | Location of a diagnostic in its documented representation.                                                                                                                                                                                                                |
| location          | pointer [*required*]           | string    | JSON Pointer to the affected field.                                                                                                                                                                                                                                       |
| validation_errors | message [*required*]           | string    | Description of the validation failure.                                                                                                                                                                                                                                    |
| meta              | validation_errors              | [object]  | Diagnostics relative to the unwrapped widget attributes.                                                                                                                                                                                                                  |
| validation_errors | code [*required*]              | string    | Machine-readable diagnostic code.                                                                                                                                                                                                                                         |
| validation_errors | location [*required*]          | object    | Location of a diagnostic in its documented representation.                                                                                                                                                                                                                |
| location          | pointer [*required*]           | string    | JSON Pointer to the affected field.                                                                                                                                                                                                                                       |
| validation_errors | message [*required*]           | string    | Description of the validation failure.                                                                                                                                                                                                                                    |
| meta              | widget_id                      | string    | ID of the affected widget.                                                                                                                                                                                                                                                |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": [
    {
      "attributes": {
        "definition": {
          "original_definition": {},
          "title": "CPU usage",
          "type": "timeseries",
          "validation_errors": [
            {
              "code": "invalid_widget",
              "location": {
                "pointer": "/data/attributes/definition/requests"
              },
              "message": "The requests field must be an array."
            }
          ]
        },
        "document_revision": "123e4567-e89b-12d3-a456-426614174456",
        "graph_size": "xs",
        "position": 33,
        "split_by": {
          "keys": [
            "service"
          ],
          "tags": [
            "env:prod"
          ]
        },
        "time": {
          "end": "2026-05-20T14:00:00Z",
          "hide_incomplete_cost_data": true,
          "live": false,
          "live_span": "1h",
          "offset": 0,
          "start": "2026-05-20T13:00:00Z",
          "type": "growing"
        },
        "widget_type": "timeseries"
      },
      "id": "w9c4h7b5",
      "links": {
        "self": "/api/v2/notebooks/123"
      },
      "relationships": {
        "csv": {
          "links": {
            "related": "/api/v2/notebooks/123/sections"
          }
        },
        "notebook": {
          "data": {
            "id": "123",
            "type": "notebooks"
          },
          "links": {
            "related": "/api/v2/notebooks/123/sections"
          }
        },
        "section": {
          "data": {
            "id": "k7m2q9x4",
            "type": "notebook_sections"
          },
          "links": {
            "related": "/api/v2/notebooks/123/sections"
          }
        },
        "snapshot": {
          "links": {
            "related": "/api/v2/notebooks/123/sections"
          }
        }
      },
      "type": "notebook_widgets"
    }
  ],
  "meta": {
    "warnings": [
      {
        "code": "invalid_widget",
        "location": {
          "pointer": "/data/attributes/definition/requests"
        },
        "message": "The widget definition is invalid.",
        "meta": {
          "definition": {
            "original_definition": {},
            "title": "CPU usage",
            "type": "timeseries",
            "validation_errors": [
              {
                "code": "invalid_widget",
                "location": {
                  "pointer": "/data/attributes/definition/requests"
                },
                "message": "The requests field must be an array."
              }
            ]
          },
          "validation_errors": [
            {
              "code": "invalid_widget",
              "location": {
                "pointer": "/data/attributes/definition/requests"
              },
              "message": "The requests field must be an array."
            }
          ],
          "widget_id": "w9c4h7b5"
        }
      }
    ]
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Forbidden

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="404" %}
Not Found

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="406" %}
Not Acceptable

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="409" %}
Conflict: an exact match count did not match, a requested scope disappeared, concurrent changes
prevented a guarded write, or the notebook uses unsupported legacy storage.

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="422" %}
Invalid notebook attributes, unsupported or mismatched scope, invalid Markdown, or invalid widget
definition.

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Path parameters
export notebook_id="123"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/notebooks/${notebook_id}/widgets" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}
{% /tabs %}
