Skip to main content

case_watchers

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

Overview

Namecase_watchers
TypeResource
Iddatadog.service_management.case_watchers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe primary identifier of the case watcher. (example: 8146583c-0b5f-11ec-abf8-da7ad0900001)
relationshipsobjectRelationships for a case watcher, linking to the underlying user resource.
typestringJSON:API resource type for case watchers. (watcher) (default: watcher, example: watcher)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_case_watchersselectcase_idReturns the list of users who are watching a case. Watchers receive notifications about updates to the case.
watch_caseinsertcase_id, user_uuidAdds a user (identified by their UUID) as a watcher of a case. The user receives notifications about subsequent updates to the case.
unwatch_casedeletecase_id, user_uuidRemoves a user from the watchers list of a case. The user no longer receives notifications about updates to the case.

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
case_idstringCase's UUID or key (example: f98a5a5b-e0ff-45d4-b2f5-afe6e74de504)
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.
user_uuidstringThe UUID of the user to add or remove as a watcher. (example: 8146583c-0b5f-11ec-abf8-da7ad0900001)

SELECT examples

Returns the list of users who are watching a case. Watchers receive notifications about updates to the case.

SELECT
id,
relationships,
type
FROM datadog.service_management.case_watchers
WHERE case_id = '{{ case_id }}' -- required
;

INSERT examples

Adds a user (identified by their UUID) as a watcher of a case. The user receives notifications about subsequent updates to the case.

INSERT INTO datadog.service_management.case_watchers (
case_id,
user_uuid
)
SELECT
'{{ case_id }}',
'{{ user_uuid }}'
;

DELETE examples

Removes a user from the watchers list of a case. The user no longer receives notifications about updates to the case.

DELETE FROM datadog.service_management.case_watchers
WHERE case_id = '{{ case_id }}' --required
AND user_uuid = '{{ user_uuid }}' --required
;