cases
Creates, updates, deletes, gets or lists a cases resource.
Overview
| Name | cases |
| Type | Resource |
| Id | datadog.service_management.cases |
Fields
The following fields are returned by SELECT queries:
- get_case
| Name | Datatype | Description |
|---|---|---|
id | string | Case's identifier (example: aeadc05e-98a8-11ec-ac2c-da7ad0900001) |
attributes | object | Case resource attributes |
relationships | object | Resources related to a case |
type | string | JSON:API resource type for cases. (case) (default: case, example: case) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_case | select | case_id | Get the details of case by case_id | |
create_case | insert | data | Create a Case | |
delete_case_link | delete | link_id | Deletes an existing link between cases by link ID. | |
search_cases | exec | page[size], page[number], sort[field], filter, sort[asc] | Search cases. | |
aggregate_cases | exec | data | Performs 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_cases | exec | data | Applies 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_link | exec | data | Creates 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_case | exec | case_id, data | Archive case | |
assign_case | exec | case_id, data | Assign case to a user | |
update_attributes | exec | case_id, data | Update case attributes | |
update_case_description | exec | case_id, data | Update case description | |
update_case_due_date | exec | case_id, data | Sets 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_priority | exec | case_id, data | Update case priority | |
update_case_resolved_reason | exec | case_id, data | Sets the resolved reason for a security case (for example, FALSE_POSITIVE, TRUE_POSITIVE). Applicable to security-type cases. | |
update_status | exec | case_id, data | Update case status | |
update_case_title | exec | case_id, data | Update case title | |
unarchive_case | exec | case_id, data | Unarchive case | |
unassign_case | exec | case_id, data | Unassign 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.
| Name | Datatype | Description |
|---|---|---|
case_id | string | Case's UUID or key (example: f98a5a5b-e0ff-45d4-b2f5-afe6e74de504) |
link_id | string | The UUID of the case link. |
site | string | The 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. |
filter | string | Search 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] | boolean | Specify if order is ascending or not |
sort[field] | string | Specify which field to sort |
SELECT examples
- get_case
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_case
- Manifest
Create a Case
INSERT INTO datadog.service_management.cases (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: cases
props:
- name: data
description: |
Case creation data
value:
attributes:
custom_attributes: "{{ custom_attributes }}"
description: "{{ description }}"
priority: "{{ priority }}"
status_name: "{{ status_name }}"
title: "{{ title }}"
type_id: "{{ type_id }}"
relationships:
assignee:
data:
id: "{{ id }}"
type: "{{ type }}"
project:
data:
id: "{{ id }}"
type: "{{ type }}"
type: "{{ type }}"
DELETE examples
- delete_case_link
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
- aggregate_cases
- bulk_update_cases
- create_case_link
- archive_case
- assign_case
- update_attributes
- update_case_description
- update_case_due_date
- update_priority
- update_case_resolved_reason
- update_status
- update_case_title
- unarchive_case
- unassign_case
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] }}
;
Performs an aggregation query over cases, grouping results by specified fields and returning counts per group along with a total. Useful for dashboards and analytics.
EXEC datadog.service_management.cases.aggregate_cases
@@json=
'{
"data": "{{ data }}"
}'
;
Applies 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.
EXEC datadog.service_management.cases.bulk_update_cases
@@json=
'{
"data": "{{ data }}"
}'
;
Creates 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.
EXEC datadog.service_management.cases.create_case_link
@@json=
'{
"data": "{{ data }}"
}'
;
Archive case
EXEC datadog.service_management.cases.archive_case
@case_id='{{ case_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Assign case to a user
EXEC datadog.service_management.cases.assign_case
@case_id='{{ case_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Update case attributes
EXEC datadog.service_management.cases.update_attributes
@case_id='{{ case_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Update case description
EXEC datadog.service_management.cases.update_case_description
@case_id='{{ case_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Sets 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.
EXEC datadog.service_management.cases.update_case_due_date
@case_id='{{ case_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Update case priority
EXEC datadog.service_management.cases.update_priority
@case_id='{{ case_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Sets the resolved reason for a security case (for example, FALSE_POSITIVE, TRUE_POSITIVE). Applicable to security-type cases.
EXEC datadog.service_management.cases.update_case_resolved_reason
@case_id='{{ case_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Update case status
EXEC datadog.service_management.cases.update_status
@case_id='{{ case_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Update case title
EXEC datadog.service_management.cases.update_case_title
@case_id='{{ case_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Unarchive case
EXEC datadog.service_management.cases.unarchive_case
@case_id='{{ case_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Unassign case
EXEC datadog.service_management.cases.unassign_case
@case_id='{{ case_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;