Skip to main content

case_views

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

Overview

Namecase_views
TypeResource
Iddatadog.service_management.case_views

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe view's identifier. (example: a1b2c3d4-e5f6-7890-abcd-ef1234567890)
attributesobjectAttributes of a case view, including the filter query and optional notification rule.
relationshipsobjectRelated resources for the case view, including the creator, last modifier, and associated project.
typestringJSON:API resource type for case views. (view) (default: view, example: view)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_case_viewselectview_idReturns a single saved case view identified by its UUID, including its query, associated project, and timestamps.
list_case_viewsselectproject_idReturns all saved case views for a given project. Views are saved search queries that allow quick access to filtered lists of cases.
create_case_viewinsertdataCreates a new saved case view with a name, filter query, and associated project. Optionally, a notification rule can be linked to the view.
update_case_viewreplaceview_id, dataUpdates the name, query, or notification rule of an existing case view.
delete_case_viewdeleteview_idPermanently deletes a saved case view.

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
project_idstringFilter views by project identifier. (example: e555e290-ed65-49bd-ae18-8acbfcf18db7)
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.
view_idstringThe UUID of the case view. (example: a1b2c3d4-e5f6-7890-abcd-ef1234567890)

SELECT examples

Returns a single saved case view identified by its UUID, including its query, associated project, and timestamps.

SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.case_views
WHERE view_id = '{{ view_id }}' -- required
;

INSERT examples

Creates a new saved case view with a name, filter query, and associated project. Optionally, a notification rule can be linked to the view.

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

REPLACE examples

Updates the name, query, or notification rule of an existing case view.

REPLACE datadog.service_management.case_views
SET
data = '{{ data }}'
WHERE
view_id = '{{ view_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

DELETE examples

Permanently deletes a saved case view.

DELETE FROM datadog.service_management.case_views
WHERE view_id = '{{ view_id }}' --required
;