"""
Create investigation notebook for case returns "No Content" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.case_management_apiimportCaseManagementApifromdatadog_api_client.v2.model.notebook_create_dataimportNotebookCreateDatafromdatadog_api_client.v2.model.notebook_create_requestimportNotebookCreateRequestfromdatadog_api_client.v2.model.notebook_resource_typeimportNotebookResourceTypebody=NotebookCreateRequest(data=NotebookCreateData(type=NotebookResourceType.NOTEBOOK,),)configuration=Configuration()configuration.unstable_operations["create_case_notebook"]=TruewithApiClient(configuration)asapi_client:api_instance=CaseManagementApi(api_client)api_instance.create_case_notebook(case_id="case_id",body=body)
# Create investigation notebook for case returns "No Content" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.create_case_notebook".to_sym]=trueendapi_instance=DatadogAPIClient::V2::CaseManagementAPI.newbody=DatadogAPIClient::V2::NotebookCreateRequest.new({data:DatadogAPIClient::V2::NotebookCreateData.new({type:DatadogAPIClient::V2::NotebookResourceType::NOTEBOOK,}),})api_instance.create_case_notebook("case_id",body)
// Create investigation notebook for case returns "No Content" responsepackagemainimport("context""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.NotebookCreateRequest{Data:datadogV2.NotebookCreateData{Type:datadogV2.NOTEBOOKRESOURCETYPE_NOTEBOOK,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.CreateCaseNotebook",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewCaseManagementApi(apiClient)r,err:=api.CreateCaseNotebook(ctx,"case_id",body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `CaseManagementApi.CreateCaseNotebook`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}}
// Create investigation notebook for case returns "No Content" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.CaseManagementApi;importcom.datadog.api.client.v2.model.NotebookCreateData;importcom.datadog.api.client.v2.model.NotebookCreateRequest;importcom.datadog.api.client.v2.model.NotebookResourceType;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.createCaseNotebook",true);CaseManagementApiapiInstance=newCaseManagementApi(defaultClient);NotebookCreateRequestbody=newNotebookCreateRequest().data(newNotebookCreateData().type(NotebookResourceType.NOTEBOOK));try{apiInstance.createCaseNotebook("f98a5a5b-e0ff-45d4-b2f5-afe6e74de504",body);}catch(ApiExceptione){System.err.println("Exception when calling CaseManagementApi#createCaseNotebook");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Create investigation notebook for case returns "No Content" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_case_management::CaseManagementAPI;usedatadog_api_client::datadogV2::model::NotebookCreateData;usedatadog_api_client::datadogV2::model::NotebookCreateRequest;usedatadog_api_client::datadogV2::model::NotebookResourceType;#[tokio::main]asyncfnmain(){letbody=NotebookCreateRequest::new(NotebookCreateData::new(NotebookResourceType::NOTEBOOK));letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.CreateCaseNotebook",true);letapi=CaseManagementAPI::with_config(configuration);letresp=api.create_case_notebook("case_id".to_string(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Create investigation notebook for case returns "No Content" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.createCaseNotebook"]=true;constapiInstance=newv2.CaseManagementApi(configuration);constparams: v2.CaseManagementApiCreateCaseNotebookRequest={body:{data:{type:"notebook",},},caseId:"case_id",};apiInstance.createCaseNotebook(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));