Skip to main content

notebooks

Creates, updates, deletes, gets or lists a notebooks resource.

Overview

Namenotebooks
TypeResource
Iddatadog.dashboards.notebooks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idinteger (int64)Unique notebook ID, assigned when you create the notebook.
attributesobjectThe attributes of a notebook.
typestringType of the Notebook resource. (notebooks) (default: notebooks, example: notebooks)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_notebookselectnotebook_idGet a notebook using the specified notebook ID.
list_notebooksselectauthor_handle, exclude_author_handle, start, count, sort_field, sort_dir, query, include_cells, is_template, typeGet all notebooks. This can also be used to search for notebooks with a particular query in the notebook<br />name or author handle.
create_notebookinsertdataCreate a notebook using the specified options.
update_notebookreplacenotebook_id, dataUpdate a notebook using the specified ID.
delete_notebookdeletenotebook_idDelete a notebook using the specified ID.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
notebook_idinteger (int64)Unique ID, assigned when you create the notebook.
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.
author_handlestringReturn notebooks created by the given author_handle.
countinteger (int64)The number of notebooks to be returned.
exclude_author_handlestringReturn notebooks not created by the given author_handle.
include_cellsbooleanValue of false excludes the cells and global time for each notebook.
is_templatebooleanTrue value returns only template notebooks. Default is false (returns only non-template notebooks).
querystringReturn only notebooks with query string in notebook name or author handle.
sort_dirstringSort by direction asc or desc.
sort_fieldstringSort by field modified, name, or created.
startinteger (int64)The index of the first notebook you want returned.
typestringIf type is provided, returns only notebooks with that metadata type. Default does not have type filtering.

SELECT examples

Get a notebook using the specified notebook ID.

SELECT
id,
attributes,
type
FROM datadog.dashboards.notebooks
WHERE notebook_id = '{{ notebook_id }}' -- required
;

INSERT examples

Create a notebook using the specified options.

INSERT INTO datadog.dashboards.notebooks (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;

REPLACE examples

Update a notebook using the specified ID.

REPLACE datadog.dashboards.notebooks
SET
data = '{{ data }}'
WHERE
notebook_id = '{{ notebook_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

DELETE examples

Delete a notebook using the specified ID.

DELETE FROM datadog.dashboards.notebooks
WHERE notebook_id = '{{ notebook_id }}' --required
;