A saved case view that provides a filtered, reusable list of cases matching a specific query. Views act as persistent dashboards for monitoring case subsets.
attributes [required]
object
Attributes of a case view, including the filter query and optional notification rule.
created_at [required]
date-time
Timestamp when the view was created.
modified_at
date-time
Timestamp when the view was last modified.
name [required]
string
A human-readable name for the view, displayed in the Case Management UI.
np_rule_id
string
The identifier of a notification rule linked to this view. When set, users subscribed to the view receive alerts for matching cases.
query [required]
string
The search query that determines which cases appear in this view. Uses the same syntax as the Case Management search bar (for example, status:open priority:P1).
id [required]
string
The view's identifier.
relationships
object
Related resources for the case view, including the creator, last modifier, and associated project.
# Create a case view returns "Created" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.create_case_view".to_sym]=trueendapi_instance=DatadogAPIClient::V2::CaseManagementAPI.newbody=DatadogAPIClient::V2::CaseViewCreateRequest.new({data:DatadogAPIClient::V2::CaseViewCreate.new({attributes:DatadogAPIClient::V2::CaseViewCreateAttributes.new({name:"Open bugs",project_id:"e555e290-ed65-49bd-ae18-8acbfcf18db7",query:"status:open type:bug",}),type:DatadogAPIClient::V2::CaseViewResourceType::VIEW,}),})papi_instance.create_case_view(body)
// Create a case view returns "Created" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){body:=datadogV2.CaseViewCreateRequest{Data:datadogV2.CaseViewCreate{Attributes:datadogV2.CaseViewCreateAttributes{Name:"Open bugs",ProjectId:"e555e290-ed65-49bd-ae18-8acbfcf18db7",Query:"status:open type:bug",},Type:datadogV2.CASEVIEWRESOURCETYPE_VIEW,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.CreateCaseView",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewCaseManagementApi(apiClient)resp,r,err:=api.CreateCaseView(ctx,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `CaseManagementApi.CreateCaseView`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `CaseManagementApi.CreateCaseView`:\n%s\n",responseContent)}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Create a case view returns "Created" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.createCaseView"]=true;constapiInstance=newv2.CaseManagementApi(configuration);constparams: v2.CaseManagementApiCreateCaseViewRequest={body:{data:{attributes:{name:"Open bugs",projectId:"e555e290-ed65-49bd-ae18-8acbfcf18db7",query:"status:open type:bug",},type:"view",},},};apiInstance.createCaseView(params).then((data: v2.CaseViewResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));