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.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"python3"example.py"
# Create a case view returns "Created" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]endapi_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)
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"rb"example.rb"
// 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())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()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_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"go run"main.go"
// Create a case view returns "Created" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.CaseManagementApi;importcom.datadog.api.client.v2.model.CaseViewCreate;importcom.datadog.api.client.v2.model.CaseViewCreateAttributes;importcom.datadog.api.client.v2.model.CaseViewCreateRequest;importcom.datadog.api.client.v2.model.CaseViewResourceType;importcom.datadog.api.client.v2.model.CaseViewResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));CaseManagementApiapiInstance=newCaseManagementApi(defaultClient);CaseViewCreateRequestbody=newCaseViewCreateRequest().data(newCaseViewCreate().attributes(newCaseViewCreateAttributes().name("Open bugs").projectId("e555e290-ed65-49bd-ae18-8acbfcf18db7").query("status:open type:bug")).type(CaseViewResourceType.VIEW));try{CaseViewResponseresult=apiInstance.createCaseView(body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling CaseManagementApi#createCaseView");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"java"Example.java"
// Create a case view returns "Created" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_case_management::CaseManagementAPI;usedatadog_api_client::datadogV2::model::CaseViewCreate;usedatadog_api_client::datadogV2::model::CaseViewCreateAttributes;usedatadog_api_client::datadogV2::model::CaseViewCreateRequest;usedatadog_api_client::datadogV2::model::CaseViewResourceType;#[tokio::main]asyncfnmain(){letbody=CaseViewCreateRequest::new(CaseViewCreate::new(CaseViewCreateAttributes::new("Open bugs".to_string(),"e555e290-ed65-49bd-ae18-8acbfcf18db7".to_string(),"status:open type:bug".to_string(),),CaseViewResourceType::VIEW,));letconfiguration=datadog::Configuration::new();letapi=CaseManagementAPI::with_config(configuration);letresp=api.create_case_view(body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
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({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});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));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
Request a personalized demo
Get Started with Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.