"""
Delete a notebook returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.notebooks_apiimportNotebooksApi# there is a valid "notebook" in the systemNOTEBOOK_DATA_ID=environ["NOTEBOOK_DATA_ID"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=NotebooksApi(api_client)api_instance.delete_notebook(notebook_id=int(NOTEBOOK_DATA_ID),)
# Delete a notebook returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::NotebooksAPI.new# there is a valid "notebook" in the systemNOTEBOOK_DATA_ID=ENV["NOTEBOOK_DATA_ID"]api_instance.delete_notebook(NOTEBOOK_DATA_ID.to_i)
// Delete a notebook returns "OK" responsepackagemainimport("context""fmt""os""strconv""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV1")funcmain(){// there is a valid "notebook" in the systemNotebookDataID,_:=strconv.ParseInt(os.Getenv("NOTEBOOK_DATA_ID"),10,64)ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewNotebooksApi(apiClient)r,err:=api.DeleteNotebook(ctx,NotebookDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `NotebooksApi.DeleteNotebook`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}}
// Delete a notebook returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.NotebooksApi;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();NotebooksApiapiInstance=newNotebooksApi(defaultClient);// there is a valid "notebook" in the systemLongNOTEBOOK_DATA_ID=Long.parseLong(System.getenv("NOTEBOOK_DATA_ID"));try{apiInstance.deleteNotebook(NOTEBOOK_DATA_ID);}catch(ApiExceptione){System.err.println("Exception when calling NotebooksApi#deleteNotebook");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Delete a notebook returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_notebooks::NotebooksAPI;#[tokio::main]asyncfnmain(){// there is a valid "notebook" in the system
letnotebook_data_id: i64=std::env::var("NOTEBOOK_DATA_ID").unwrap().parse().unwrap();letconfiguration=datadog::Configuration::new();letapi=NotebooksAPI::with_config(configuration);letresp=api.delete_notebook(notebook_data_id.clone()).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="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete a notebook returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.NotebooksApi(configuration);// there is a valid "notebook" in the system
constNOTEBOOK_DATA_ID=parseInt(process.env.NOTEBOOK_DATA_IDasstring);constparams: v1.NotebooksApiDeleteNotebookRequest={notebookId: NOTEBOOK_DATA_ID,};apiInstance.deleteNotebook(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));