Skip to main content

cases

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

Overview

Namecases
TypeResource
Iddatadog.service_management.cases

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringCase's identifier (example: aeadc05e-98a8-11ec-ac2c-da7ad0900001)
attributesobjectCase resource attributes
relationshipsobjectResources related to a case
typestringJSON:API resource type for cases. (case) (default: case, example: case)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_caseselectcase_idGet the details of case by case_id
create_caseinsertdataCreate a Case
delete_case_linkdeletelink_idDeletes an existing link between cases by link ID.
search_casesexecpage[size], page[number], sort[field], filter, sort[asc]Search cases.
aggregate_casesexecdataPerforms an aggregation query over cases, grouping results by specified fields and returning counts per group along with a total. Useful for dashboards and analytics.
bulk_update_casesexecdataApplies a single action (such as changing priority, status, assignment, or archiving) to multiple cases at once. The list of case IDs and the action type with its payload are specified in the request body.
create_case_linkexecdataCreates a directional link between two cases (for example, case A blocks case B). The parent and child cases and their relationship type must be specified.
archive_caseexeccase_id, dataArchive case
assign_caseexeccase_id, dataAssign case to a user
update_attributesexeccase_id, dataUpdate case attributes
update_case_descriptionexeccase_id, dataUpdate case description
update_case_due_dateexeccase_id, dataSets or updates the due date for a case. The due date is a calendar date (without a time component) indicating when the case should be resolved.
update_priorityexeccase_id, dataUpdate case priority
update_case_resolved_reasonexeccase_id, dataSets the resolved reason for a security case (for example, FALSE_POSITIVE, TRUE_POSITIVE). Applicable to security-type cases.
update_statusexeccase_id, dataUpdate case status
update_case_titleexeccase_id, dataUpdate case title
unarchive_caseexeccase_id, dataUnarchive case
unassign_caseexeccase_id, dataUnassign 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.
filterstringSearch query
page[number]integer (int64)Specific page number to return.
page[size]integer (int64)Number of items to return per page. The maximum allowed value is 100.
sort[asc]booleanSpecify if order is ascending or not
sort[field]stringSpecify which field to sort

SELECT examples

Get the details of case by case_id

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

INSERT examples

Create a Case

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

DELETE examples

Deletes an existing link between cases by link ID.

DELETE FROM datadog.service_management.cases
WHERE link_id = '{{ link_id }}' --required
;

Lifecycle Methods

EXEC variables use wire (API) names.

Search cases.

EXEC datadog.service_management.cases.search_cases
@page[size]='{{ page[size] }}',
@page[number]='{{ page[number] }}',
@sort[field]='{{ sort[field] }}',
@filter='{{ filter }}',
@sort[asc]={{ sort[asc] }}
;