Interagissez avec vos listes de dashboards via l’API pour
faciliter l’organisation, la recherche et le partage de tous vos dashboards
avec votre équipe et votre organisation.
"""
Get all dashboard lists returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.dashboard_lists_apiimportDashboardListsApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=DashboardListsApi(api_client)response=api_instance.list_dashboard_lists()print(response)
# Get all dashboard lists returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::DashboardListsAPI.newpapi_instance.list_dashboard_lists()
// Get all dashboard lists returns "OK" response
packagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV1")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewDashboardListsApi(apiClient)resp,r,err:=api.ListDashboardLists(ctx)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DashboardListsApi.ListDashboardLists`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `DashboardListsApi.ListDashboardLists`:\n%s\n",responseContent)}
// Get all dashboard lists returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_dashboard_lists::DashboardListsAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=DashboardListsAPI::with_config(configuration);letresp=api.list_dashboard_lists().await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get all dashboard lists returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.DashboardListsApi(configuration);apiInstance.listDashboardLists().then((data: v1.DashboardListListResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Get items of a Dashboard List returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.dashboard_lists_apiimportDashboardListsApi# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=environ["DASHBOARD_LIST_ID"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=DashboardListsApi(api_client)response=api_instance.get_dashboard_list_items(dashboard_list_id=int(DASHBOARD_LIST_ID),)print(response)
# Get items of a Dashboard List returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::DashboardListsAPI.new# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=ENV["DASHBOARD_LIST_ID"]papi_instance.get_dashboard_list_items(DASHBOARD_LIST_ID.to_i)
// Get items of a Dashboard List returns "OK" response
packagemainimport("context""encoding/json""fmt""os""strconv""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){// there is a valid "dashboard_list" in the system
DashboardListID,_:=strconv.ParseInt(os.Getenv("DASHBOARD_LIST_ID"),10,64)ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewDashboardListsApi(apiClient)resp,r,err:=api.GetDashboardListItems(ctx,DashboardListID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DashboardListsApi.GetDashboardListItems`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `DashboardListsApi.GetDashboardListItems`:\n%s\n",responseContent)}
// Get items of a Dashboard List returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.DashboardListsApi;importcom.datadog.api.client.v2.model.DashboardListItems;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();DashboardListsApiapiInstance=newDashboardListsApi(defaultClient);// there is a valid "dashboard_list" in the systemLongDASHBOARD_LIST_ID=Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));try{DashboardListItemsresult=apiInstance.getDashboardListItems(DASHBOARD_LIST_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling DashboardListsApi#getDashboardListItems");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get items of a Dashboard List returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_dashboard_lists::DashboardListsAPI;#[tokio::main]asyncfnmain(){// there is a valid "dashboard_list" in the system
letdashboard_list_id: i64=std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();letconfiguration=datadog::Configuration::new();letapi=DashboardListsAPI::with_config(configuration);letresp=api.get_dashboard_list_items(dashboard_list_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get items of a Dashboard List returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.DashboardListsApi(configuration);// there is a valid "dashboard_list" in the system
constDASHBOARD_LIST_ID=parseInt(process.env.DASHBOARD_LIST_IDasstring);constparams: v2.DashboardListsApiGetDashboardListItemsRequest={dashboardListId: DASHBOARD_LIST_ID,};apiInstance.getDashboardListItems(params).then((data: v2.DashboardListItems)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Add custom screenboard dashboard to an existing dashboard list returns "OK" response
packagemainimport("context""encoding/json""fmt""os""strconv""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){// there is a valid "dashboard_list" in the system
DashboardListID,_:=strconv.ParseInt(os.Getenv("DASHBOARD_LIST_ID"),10,64)// there is a valid "screenboard_dashboard" in the system
ScreenboardDashboardID:=os.Getenv("SCREENBOARD_DASHBOARD_ID")body:=datadogV2.DashboardListAddItemsRequest{Dashboards:[]datadogV2.DashboardListItemRequest{{Id:ScreenboardDashboardID,Type:datadogV2.DASHBOARDTYPE_CUSTOM_SCREENBOARD,},},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewDashboardListsApi(apiClient)resp,r,err:=api.CreateDashboardListItems(ctx,DashboardListID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DashboardListsApi.CreateDashboardListItems`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `DashboardListsApi.CreateDashboardListItems`:\n%s\n",responseContent)}
// Add custom timeboard dashboard to an existing dashboard list returns "OK" response
packagemainimport("context""encoding/json""fmt""os""strconv""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){// there is a valid "dashboard_list" in the system
DashboardListID,_:=strconv.ParseInt(os.Getenv("DASHBOARD_LIST_ID"),10,64)// there is a valid "dashboard" in the system
DashboardID:=os.Getenv("DASHBOARD_ID")body:=datadogV2.DashboardListAddItemsRequest{Dashboards:[]datadogV2.DashboardListItemRequest{{Id:DashboardID,Type:datadogV2.DASHBOARDTYPE_CUSTOM_TIMEBOARD,},},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewDashboardListsApi(apiClient)resp,r,err:=api.CreateDashboardListItems(ctx,DashboardListID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DashboardListsApi.CreateDashboardListItems`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `DashboardListsApi.CreateDashboardListItems`:\n%s\n",responseContent)}
// Add custom screenboard dashboard to an existing dashboard list returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.DashboardListsApi;importcom.datadog.api.client.v2.model.DashboardListAddItemsRequest;importcom.datadog.api.client.v2.model.DashboardListAddItemsResponse;importcom.datadog.api.client.v2.model.DashboardListItemRequest;importcom.datadog.api.client.v2.model.DashboardType;importjava.util.Collections;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();DashboardListsApiapiInstance=newDashboardListsApi(defaultClient);// there is a valid "dashboard_list" in the systemLongDASHBOARD_LIST_ID=Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));// there is a valid "screenboard_dashboard" in the systemStringSCREENBOARD_DASHBOARD_ID=System.getenv("SCREENBOARD_DASHBOARD_ID");DashboardListAddItemsRequestbody=newDashboardListAddItemsRequest().dashboards(Collections.singletonList(newDashboardListItemRequest().id(SCREENBOARD_DASHBOARD_ID).type(DashboardType.CUSTOM_SCREENBOARD)));try{DashboardListAddItemsResponseresult=apiInstance.createDashboardListItems(DASHBOARD_LIST_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling DashboardListsApi#createDashboardListItems");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Add custom timeboard dashboard to an existing dashboard list returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.DashboardListsApi;importcom.datadog.api.client.v2.model.DashboardListAddItemsRequest;importcom.datadog.api.client.v2.model.DashboardListAddItemsResponse;importcom.datadog.api.client.v2.model.DashboardListItemRequest;importcom.datadog.api.client.v2.model.DashboardType;importjava.util.Collections;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();DashboardListsApiapiInstance=newDashboardListsApi(defaultClient);// there is a valid "dashboard_list" in the systemLongDASHBOARD_LIST_ID=Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));// there is a valid "dashboard" in the systemStringDASHBOARD_ID=System.getenv("DASHBOARD_ID");DashboardListAddItemsRequestbody=newDashboardListAddItemsRequest().dashboards(Collections.singletonList(newDashboardListItemRequest().id(DASHBOARD_ID).type(DashboardType.CUSTOM_TIMEBOARD)));try{DashboardListAddItemsResponseresult=apiInstance.createDashboardListItems(DASHBOARD_LIST_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling DashboardListsApi#createDashboardListItems");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Add custom screenboard dashboard to an existing dashboard list returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.dashboard_lists_apiimportDashboardListsApifromdatadog_api_client.v2.model.dashboard_list_add_items_requestimportDashboardListAddItemsRequestfromdatadog_api_client.v2.model.dashboard_list_item_requestimportDashboardListItemRequestfromdatadog_api_client.v2.model.dashboard_typeimportDashboardType# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=environ["DASHBOARD_LIST_ID"]# there is a valid "screenboard_dashboard" in the systemSCREENBOARD_DASHBOARD_ID=environ["SCREENBOARD_DASHBOARD_ID"]body=DashboardListAddItemsRequest(dashboards=[DashboardListItemRequest(id=SCREENBOARD_DASHBOARD_ID,type=DashboardType.CUSTOM_SCREENBOARD,),],)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=DashboardListsApi(api_client)response=api_instance.create_dashboard_list_items(dashboard_list_id=int(DASHBOARD_LIST_ID),body=body)print(response)
"""
Add custom timeboard dashboard to an existing dashboard list returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.dashboard_lists_apiimportDashboardListsApifromdatadog_api_client.v2.model.dashboard_list_add_items_requestimportDashboardListAddItemsRequestfromdatadog_api_client.v2.model.dashboard_list_item_requestimportDashboardListItemRequestfromdatadog_api_client.v2.model.dashboard_typeimportDashboardType# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=environ["DASHBOARD_LIST_ID"]# there is a valid "dashboard" in the systemDASHBOARD_ID=environ["DASHBOARD_ID"]body=DashboardListAddItemsRequest(dashboards=[DashboardListItemRequest(id=DASHBOARD_ID,type=DashboardType.CUSTOM_TIMEBOARD,),],)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=DashboardListsApi(api_client)response=api_instance.create_dashboard_list_items(dashboard_list_id=int(DASHBOARD_LIST_ID),body=body)print(response)
# Add custom screenboard dashboard to an existing dashboard list returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::DashboardListsAPI.new# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=ENV["DASHBOARD_LIST_ID"]# there is a valid "screenboard_dashboard" in the systemSCREENBOARD_DASHBOARD_ID=ENV["SCREENBOARD_DASHBOARD_ID"]body=DatadogAPIClient::V2::DashboardListAddItemsRequest.new({dashboards:[DatadogAPIClient::V2::DashboardListItemRequest.new({id:SCREENBOARD_DASHBOARD_ID,type:DatadogAPIClient::V2::DashboardType::CUSTOM_SCREENBOARD,}),],})papi_instance.create_dashboard_list_items(DASHBOARD_LIST_ID.to_i,body)
# Add custom timeboard dashboard to an existing dashboard list returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::DashboardListsAPI.new# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=ENV["DASHBOARD_LIST_ID"]# there is a valid "dashboard" in the systemDASHBOARD_ID=ENV["DASHBOARD_ID"]body=DatadogAPIClient::V2::DashboardListAddItemsRequest.new({dashboards:[DatadogAPIClient::V2::DashboardListItemRequest.new({id:DASHBOARD_ID,type:DatadogAPIClient::V2::DashboardType::CUSTOM_TIMEBOARD,}),],})papi_instance.create_dashboard_list_items(DASHBOARD_LIST_ID.to_i,body)
// Add custom screenboard dashboard to an existing dashboard list returns "OK"
// response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_dashboard_lists::DashboardListsAPI;usedatadog_api_client::datadogV2::model::DashboardListAddItemsRequest;usedatadog_api_client::datadogV2::model::DashboardListItemRequest;usedatadog_api_client::datadogV2::model::DashboardType;#[tokio::main]asyncfnmain(){// there is a valid "dashboard_list" in the system
letdashboard_list_id: i64=std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();// there is a valid "screenboard_dashboard" in the system
letscreenboard_dashboard_id=std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap();letbody=DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(screenboard_dashboard_id.clone(),DashboardType::CUSTOM_SCREENBOARD,)]);letconfiguration=datadog::Configuration::new();letapi=DashboardListsAPI::with_config(configuration);letresp=api.create_dashboard_list_items(dashboard_list_id.clone(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
// Add custom timeboard dashboard to an existing dashboard list returns "OK"
// response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_dashboard_lists::DashboardListsAPI;usedatadog_api_client::datadogV2::model::DashboardListAddItemsRequest;usedatadog_api_client::datadogV2::model::DashboardListItemRequest;usedatadog_api_client::datadogV2::model::DashboardType;#[tokio::main]asyncfnmain(){// there is a valid "dashboard_list" in the system
letdashboard_list_id: i64=std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();// there is a valid "dashboard" in the system
letdashboard_id=std::env::var("DASHBOARD_ID").unwrap();letbody=DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(dashboard_id.clone(),DashboardType::CUSTOM_TIMEBOARD,)]);letconfiguration=datadog::Configuration::new();letapi=DashboardListsAPI::with_config(configuration);letresp=api.create_dashboard_list_items(dashboard_list_id.clone(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Add custom screenboard dashboard to an existing dashboard list returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.DashboardListsApi(configuration);// there is a valid "dashboard_list" in the system
constDASHBOARD_LIST_ID=parseInt(process.env.DASHBOARD_LIST_IDasstring);// there is a valid "screenboard_dashboard" in the system
constSCREENBOARD_DASHBOARD_ID=process.env.SCREENBOARD_DASHBOARD_IDasstring;constparams: v2.DashboardListsApiCreateDashboardListItemsRequest={body:{dashboards:[{id: SCREENBOARD_DASHBOARD_ID,type:"custom_screenboard",},],},dashboardListId: DASHBOARD_LIST_ID,};apiInstance.createDashboardListItems(params).then((data: v2.DashboardListAddItemsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
/**
* Add custom timeboard dashboard to an existing dashboard list returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.DashboardListsApi(configuration);// there is a valid "dashboard_list" in the system
constDASHBOARD_LIST_ID=parseInt(process.env.DASHBOARD_LIST_IDasstring);// there is a valid "dashboard" in the system
constDASHBOARD_ID=process.env.DASHBOARD_IDasstring;constparams: v2.DashboardListsApiCreateDashboardListItemsRequest={body:{dashboards:[{id: DASHBOARD_ID,type:"custom_timeboard",},],},dashboardListId: DASHBOARD_LIST_ID,};apiInstance.createDashboardListItems(params).then((data: v2.DashboardListAddItemsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Create a dashboard list returns "OK" response
packagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV1")funcmain(){body:=datadogV1.DashboardList{Name:"Example-Dashboard-List",}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewDashboardListsApi(apiClient)resp,r,err:=api.CreateDashboardList(ctx,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DashboardListsApi.CreateDashboardList`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `DashboardListsApi.CreateDashboardList`:\n%s\n",responseContent)}
"""
Create a dashboard list returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.dashboard_lists_apiimportDashboardListsApifromdatadog_api_client.v1.model.dashboard_listimportDashboardListbody=DashboardList(name="Example-Dashboard-List",)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=DashboardListsApi(api_client)response=api_instance.create_dashboard_list(body=body)print(response)
# Create a dashboard list returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::DashboardListsAPI.newbody=DatadogAPIClient::V1::DashboardList.new({name:"Example-Dashboard-List",})papi_instance.create_dashboard_list(body)
// Create a dashboard list returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_dashboard_lists::DashboardListsAPI;usedatadog_api_client::datadogV1::model::DashboardList;#[tokio::main]asyncfnmain(){letbody=DashboardList::new("Example-Dashboard-List".to_string());letconfiguration=datadog::Configuration::new();letapi=DashboardListsAPI::with_config(configuration);letresp=api.create_dashboard_list(body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Create a dashboard list returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.DashboardListsApi(configuration);constparams: v1.DashboardListsApiCreateDashboardListRequest={body:{name:"Example-Dashboard-List",},};apiInstance.createDashboardList(params).then((data: v1.DashboardList)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Get a dashboard list returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.dashboard_lists_apiimportDashboardListsApi# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=environ["DASHBOARD_LIST_ID"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=DashboardListsApi(api_client)response=api_instance.get_dashboard_list(list_id=int(DASHBOARD_LIST_ID),)print(response)
# Get a dashboard list returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::DashboardListsAPI.new# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=ENV["DASHBOARD_LIST_ID"]papi_instance.get_dashboard_list(DASHBOARD_LIST_ID.to_i)
// Get a dashboard list returns "OK" response
packagemainimport("context""encoding/json""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 "dashboard_list" in the system
DashboardListID,_:=strconv.ParseInt(os.Getenv("DASHBOARD_LIST_ID"),10,64)ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewDashboardListsApi(apiClient)resp,r,err:=api.GetDashboardList(ctx,DashboardListID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DashboardListsApi.GetDashboardList`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `DashboardListsApi.GetDashboardList`:\n%s\n",responseContent)}
// Get a dashboard list returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.DashboardListsApi;importcom.datadog.api.client.v1.model.DashboardList;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();DashboardListsApiapiInstance=newDashboardListsApi(defaultClient);// there is a valid "dashboard_list" in the systemLongDASHBOARD_LIST_ID=Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));try{DashboardListresult=apiInstance.getDashboardList(DASHBOARD_LIST_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling DashboardListsApi#getDashboardList");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get a dashboard list returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_dashboard_lists::DashboardListsAPI;#[tokio::main]asyncfnmain(){// there is a valid "dashboard_list" in the system
letdashboard_list_id: i64=std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();letconfiguration=datadog::Configuration::new();letapi=DashboardListsAPI::with_config(configuration);letresp=api.get_dashboard_list(dashboard_list_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get a dashboard list returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.DashboardListsApi(configuration);// there is a valid "dashboard_list" in the system
constDASHBOARD_LIST_ID=parseInt(process.env.DASHBOARD_LIST_IDasstring);constparams: v1.DashboardListsApiGetDashboardListRequest={listId: DASHBOARD_LIST_ID,};apiInstance.getDashboardList(params).then((data: v1.DashboardList)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Update items of a dashboard list returns "OK" response
packagemainimport("context""encoding/json""fmt""os""strconv""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){// there is a valid "dashboard_list" in the system
DashboardListID,_:=strconv.ParseInt(os.Getenv("DASHBOARD_LIST_ID"),10,64)// there is a valid "screenboard_dashboard" in the system
ScreenboardDashboardID:=os.Getenv("SCREENBOARD_DASHBOARD_ID")body:=datadogV2.DashboardListUpdateItemsRequest{Dashboards:[]datadogV2.DashboardListItemRequest{{Id:ScreenboardDashboardID,Type:datadogV2.DASHBOARDTYPE_CUSTOM_SCREENBOARD,},},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewDashboardListsApi(apiClient)resp,r,err:=api.UpdateDashboardListItems(ctx,DashboardListID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DashboardListsApi.UpdateDashboardListItems`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `DashboardListsApi.UpdateDashboardListItems`:\n%s\n",responseContent)}
// Update items of a dashboard list returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.DashboardListsApi;importcom.datadog.api.client.v2.model.DashboardListItemRequest;importcom.datadog.api.client.v2.model.DashboardListUpdateItemsRequest;importcom.datadog.api.client.v2.model.DashboardListUpdateItemsResponse;importcom.datadog.api.client.v2.model.DashboardType;importjava.util.Collections;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();DashboardListsApiapiInstance=newDashboardListsApi(defaultClient);// there is a valid "dashboard_list" in the systemLongDASHBOARD_LIST_ID=Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));// there is a valid "screenboard_dashboard" in the systemStringSCREENBOARD_DASHBOARD_ID=System.getenv("SCREENBOARD_DASHBOARD_ID");DashboardListUpdateItemsRequestbody=newDashboardListUpdateItemsRequest().dashboards(Collections.singletonList(newDashboardListItemRequest().id(SCREENBOARD_DASHBOARD_ID).type(DashboardType.CUSTOM_SCREENBOARD)));try{DashboardListUpdateItemsResponseresult=apiInstance.updateDashboardListItems(DASHBOARD_LIST_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling DashboardListsApi#updateDashboardListItems");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Update items of a dashboard list returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.dashboard_lists_apiimportDashboardListsApifromdatadog_api_client.v2.model.dashboard_list_item_requestimportDashboardListItemRequestfromdatadog_api_client.v2.model.dashboard_list_update_items_requestimportDashboardListUpdateItemsRequestfromdatadog_api_client.v2.model.dashboard_typeimportDashboardType# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=environ["DASHBOARD_LIST_ID"]# there is a valid "screenboard_dashboard" in the systemSCREENBOARD_DASHBOARD_ID=environ["SCREENBOARD_DASHBOARD_ID"]body=DashboardListUpdateItemsRequest(dashboards=[DashboardListItemRequest(id=SCREENBOARD_DASHBOARD_ID,type=DashboardType.CUSTOM_SCREENBOARD,),],)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=DashboardListsApi(api_client)response=api_instance.update_dashboard_list_items(dashboard_list_id=int(DASHBOARD_LIST_ID),body=body)print(response)
# Update items of a dashboard list returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::DashboardListsAPI.new# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=ENV["DASHBOARD_LIST_ID"]# there is a valid "screenboard_dashboard" in the systemSCREENBOARD_DASHBOARD_ID=ENV["SCREENBOARD_DASHBOARD_ID"]body=DatadogAPIClient::V2::DashboardListUpdateItemsRequest.new({dashboards:[DatadogAPIClient::V2::DashboardListItemRequest.new({id:SCREENBOARD_DASHBOARD_ID,type:DatadogAPIClient::V2::DashboardType::CUSTOM_SCREENBOARD,}),],})papi_instance.update_dashboard_list_items(DASHBOARD_LIST_ID.to_i,body)
// Update items of a dashboard list returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_dashboard_lists::DashboardListsAPI;usedatadog_api_client::datadogV2::model::DashboardListItemRequest;usedatadog_api_client::datadogV2::model::DashboardListUpdateItemsRequest;usedatadog_api_client::datadogV2::model::DashboardType;#[tokio::main]asyncfnmain(){// there is a valid "dashboard_list" in the system
letdashboard_list_id: i64=std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();// there is a valid "screenboard_dashboard" in the system
letscreenboard_dashboard_id=std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap();letbody=DashboardListUpdateItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(screenboard_dashboard_id.clone(),DashboardType::CUSTOM_SCREENBOARD,)]);letconfiguration=datadog::Configuration::new();letapi=DashboardListsAPI::with_config(configuration);letresp=api.update_dashboard_list_items(dashboard_list_id.clone(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Update items of a dashboard list returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.DashboardListsApi(configuration);// there is a valid "dashboard_list" in the system
constDASHBOARD_LIST_ID=parseInt(process.env.DASHBOARD_LIST_IDasstring);// there is a valid "screenboard_dashboard" in the system
constSCREENBOARD_DASHBOARD_ID=process.env.SCREENBOARD_DASHBOARD_IDasstring;constparams: v2.DashboardListsApiUpdateDashboardListItemsRequest={body:{dashboards:[{id: SCREENBOARD_DASHBOARD_ID,type:"custom_screenboard",},],},dashboardListId: DASHBOARD_LIST_ID,};apiInstance.updateDashboardListItems(params).then((data: v2.DashboardListUpdateItemsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Delete custom screenboard dashboard from an existing dashboard list returns "OK" response
packagemainimport("context""encoding/json""fmt""os""strconv""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){// there is a valid "dashboard_list" in the system
DashboardListID,_:=strconv.ParseInt(os.Getenv("DASHBOARD_LIST_ID"),10,64)// there is a valid "screenboard_dashboard" in the system
ScreenboardDashboardID:=os.Getenv("SCREENBOARD_DASHBOARD_ID")body:=datadogV2.DashboardListDeleteItemsRequest{Dashboards:[]datadogV2.DashboardListItemRequest{{Id:ScreenboardDashboardID,Type:datadogV2.DASHBOARDTYPE_CUSTOM_SCREENBOARD,},},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewDashboardListsApi(apiClient)resp,r,err:=api.DeleteDashboardListItems(ctx,DashboardListID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DashboardListsApi.DeleteDashboardListItems`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `DashboardListsApi.DeleteDashboardListItems`:\n%s\n",responseContent)}
// Delete custom timeboard dashboard from an existing dashboard list returns "OK" response
packagemainimport("context""encoding/json""fmt""os""strconv""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){// there is a valid "dashboard_list" in the system
DashboardListID,_:=strconv.ParseInt(os.Getenv("DASHBOARD_LIST_ID"),10,64)// there is a valid "dashboard" in the system
DashboardID:=os.Getenv("DASHBOARD_ID")body:=datadogV2.DashboardListDeleteItemsRequest{Dashboards:[]datadogV2.DashboardListItemRequest{{Id:DashboardID,Type:datadogV2.DASHBOARDTYPE_CUSTOM_TIMEBOARD,},},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewDashboardListsApi(apiClient)resp,r,err:=api.DeleteDashboardListItems(ctx,DashboardListID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DashboardListsApi.DeleteDashboardListItems`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `DashboardListsApi.DeleteDashboardListItems`:\n%s\n",responseContent)}
// Delete custom screenboard dashboard from an existing dashboard list returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.DashboardListsApi;importcom.datadog.api.client.v2.model.DashboardListDeleteItemsRequest;importcom.datadog.api.client.v2.model.DashboardListDeleteItemsResponse;importcom.datadog.api.client.v2.model.DashboardListItemRequest;importcom.datadog.api.client.v2.model.DashboardType;importjava.util.Collections;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();DashboardListsApiapiInstance=newDashboardListsApi(defaultClient);// there is a valid "dashboard_list" in the systemLongDASHBOARD_LIST_ID=Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));// there is a valid "screenboard_dashboard" in the systemStringSCREENBOARD_DASHBOARD_ID=System.getenv("SCREENBOARD_DASHBOARD_ID");DashboardListDeleteItemsRequestbody=newDashboardListDeleteItemsRequest().dashboards(Collections.singletonList(newDashboardListItemRequest().id(SCREENBOARD_DASHBOARD_ID).type(DashboardType.CUSTOM_SCREENBOARD)));try{DashboardListDeleteItemsResponseresult=apiInstance.deleteDashboardListItems(DASHBOARD_LIST_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling DashboardListsApi#deleteDashboardListItems");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Delete custom timeboard dashboard from an existing dashboard list returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.DashboardListsApi;importcom.datadog.api.client.v2.model.DashboardListDeleteItemsRequest;importcom.datadog.api.client.v2.model.DashboardListDeleteItemsResponse;importcom.datadog.api.client.v2.model.DashboardListItemRequest;importcom.datadog.api.client.v2.model.DashboardType;importjava.util.Collections;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();DashboardListsApiapiInstance=newDashboardListsApi(defaultClient);// there is a valid "dashboard_list" in the systemLongDASHBOARD_LIST_ID=Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));// there is a valid "dashboard" in the systemStringDASHBOARD_ID=System.getenv("DASHBOARD_ID");DashboardListDeleteItemsRequestbody=newDashboardListDeleteItemsRequest().dashboards(Collections.singletonList(newDashboardListItemRequest().id(DASHBOARD_ID).type(DashboardType.CUSTOM_TIMEBOARD)));try{DashboardListDeleteItemsResponseresult=apiInstance.deleteDashboardListItems(DASHBOARD_LIST_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling DashboardListsApi#deleteDashboardListItems");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Delete custom screenboard dashboard from an existing dashboard list returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.dashboard_lists_apiimportDashboardListsApifromdatadog_api_client.v2.model.dashboard_list_delete_items_requestimportDashboardListDeleteItemsRequestfromdatadog_api_client.v2.model.dashboard_list_item_requestimportDashboardListItemRequestfromdatadog_api_client.v2.model.dashboard_typeimportDashboardType# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=environ["DASHBOARD_LIST_ID"]# there is a valid "screenboard_dashboard" in the systemSCREENBOARD_DASHBOARD_ID=environ["SCREENBOARD_DASHBOARD_ID"]body=DashboardListDeleteItemsRequest(dashboards=[DashboardListItemRequest(id=SCREENBOARD_DASHBOARD_ID,type=DashboardType.CUSTOM_SCREENBOARD,),],)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=DashboardListsApi(api_client)response=api_instance.delete_dashboard_list_items(dashboard_list_id=int(DASHBOARD_LIST_ID),body=body)print(response)
"""
Delete custom timeboard dashboard from an existing dashboard list returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.dashboard_lists_apiimportDashboardListsApifromdatadog_api_client.v2.model.dashboard_list_delete_items_requestimportDashboardListDeleteItemsRequestfromdatadog_api_client.v2.model.dashboard_list_item_requestimportDashboardListItemRequestfromdatadog_api_client.v2.model.dashboard_typeimportDashboardType# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=environ["DASHBOARD_LIST_ID"]# there is a valid "dashboard" in the systemDASHBOARD_ID=environ["DASHBOARD_ID"]body=DashboardListDeleteItemsRequest(dashboards=[DashboardListItemRequest(id=DASHBOARD_ID,type=DashboardType.CUSTOM_TIMEBOARD,),],)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=DashboardListsApi(api_client)response=api_instance.delete_dashboard_list_items(dashboard_list_id=int(DASHBOARD_LIST_ID),body=body)print(response)
# Delete custom screenboard dashboard from an existing dashboard list returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::DashboardListsAPI.new# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=ENV["DASHBOARD_LIST_ID"]# there is a valid "screenboard_dashboard" in the systemSCREENBOARD_DASHBOARD_ID=ENV["SCREENBOARD_DASHBOARD_ID"]body=DatadogAPIClient::V2::DashboardListDeleteItemsRequest.new({dashboards:[DatadogAPIClient::V2::DashboardListItemRequest.new({id:SCREENBOARD_DASHBOARD_ID,type:DatadogAPIClient::V2::DashboardType::CUSTOM_SCREENBOARD,}),],})papi_instance.delete_dashboard_list_items(DASHBOARD_LIST_ID.to_i,body)
# Delete custom timeboard dashboard from an existing dashboard list returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::DashboardListsAPI.new# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=ENV["DASHBOARD_LIST_ID"]# there is a valid "dashboard" in the systemDASHBOARD_ID=ENV["DASHBOARD_ID"]body=DatadogAPIClient::V2::DashboardListDeleteItemsRequest.new({dashboards:[DatadogAPIClient::V2::DashboardListItemRequest.new({id:DASHBOARD_ID,type:DatadogAPIClient::V2::DashboardType::CUSTOM_TIMEBOARD,}),],})papi_instance.delete_dashboard_list_items(DASHBOARD_LIST_ID.to_i,body)
// Delete custom screenboard dashboard from an existing dashboard list returns
// "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_dashboard_lists::DashboardListsAPI;usedatadog_api_client::datadogV2::model::DashboardListDeleteItemsRequest;usedatadog_api_client::datadogV2::model::DashboardListItemRequest;usedatadog_api_client::datadogV2::model::DashboardType;#[tokio::main]asyncfnmain(){// there is a valid "dashboard_list" in the system
letdashboard_list_id: i64=std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();// there is a valid "screenboard_dashboard" in the system
letscreenboard_dashboard_id=std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap();letbody=DashboardListDeleteItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(screenboard_dashboard_id.clone(),DashboardType::CUSTOM_SCREENBOARD,)]);letconfiguration=datadog::Configuration::new();letapi=DashboardListsAPI::with_config(configuration);letresp=api.delete_dashboard_list_items(dashboard_list_id.clone(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
// Delete custom timeboard dashboard from an existing dashboard list returns "OK"
// response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_dashboard_lists::DashboardListsAPI;usedatadog_api_client::datadogV2::model::DashboardListDeleteItemsRequest;usedatadog_api_client::datadogV2::model::DashboardListItemRequest;usedatadog_api_client::datadogV2::model::DashboardType;#[tokio::main]asyncfnmain(){// there is a valid "dashboard_list" in the system
letdashboard_list_id: i64=std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();// there is a valid "dashboard" in the system
letdashboard_id=std::env::var("DASHBOARD_ID").unwrap();letbody=DashboardListDeleteItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(dashboard_id.clone(),DashboardType::CUSTOM_TIMEBOARD,)]);letconfiguration=datadog::Configuration::new();letapi=DashboardListsAPI::with_config(configuration);letresp=api.delete_dashboard_list_items(dashboard_list_id.clone(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete custom screenboard dashboard from an existing dashboard list returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.DashboardListsApi(configuration);// there is a valid "dashboard_list" in the system
constDASHBOARD_LIST_ID=parseInt(process.env.DASHBOARD_LIST_IDasstring);// there is a valid "screenboard_dashboard" in the system
constSCREENBOARD_DASHBOARD_ID=process.env.SCREENBOARD_DASHBOARD_IDasstring;constparams: v2.DashboardListsApiDeleteDashboardListItemsRequest={body:{dashboards:[{id: SCREENBOARD_DASHBOARD_ID,type:"custom_screenboard",},],},dashboardListId: DASHBOARD_LIST_ID,};apiInstance.deleteDashboardListItems(params).then((data: v2.DashboardListDeleteItemsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
/**
* Delete custom timeboard dashboard from an existing dashboard list returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.DashboardListsApi(configuration);// there is a valid "dashboard_list" in the system
constDASHBOARD_LIST_ID=parseInt(process.env.DASHBOARD_LIST_IDasstring);// there is a valid "dashboard" in the system
constDASHBOARD_ID=process.env.DASHBOARD_IDasstring;constparams: v2.DashboardListsApiDeleteDashboardListItemsRequest={body:{dashboards:[{id: DASHBOARD_ID,type:"custom_timeboard",},],},dashboardListId: DASHBOARD_LIST_ID,};apiInstance.deleteDashboardListItems(params).then((data: v2.DashboardListDeleteItemsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Update a dashboard list returns "OK" response
packagemainimport("context""encoding/json""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 "dashboard_list" in the system
DashboardListID,_:=strconv.ParseInt(os.Getenv("DASHBOARD_LIST_ID"),10,64)body:=datadogV1.DashboardList{Name:"updated Example-Dashboard-List",}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewDashboardListsApi(apiClient)resp,r,err:=api.UpdateDashboardList(ctx,DashboardListID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DashboardListsApi.UpdateDashboardList`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `DashboardListsApi.UpdateDashboardList`:\n%s\n",responseContent)}
// Update a dashboard list returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.DashboardListsApi;importcom.datadog.api.client.v1.model.DashboardList;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();DashboardListsApiapiInstance=newDashboardListsApi(defaultClient);// there is a valid "dashboard_list" in the systemLongDASHBOARD_LIST_ID=Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));DashboardListbody=newDashboardList().name("updated Example-Dashboard-List");try{DashboardListresult=apiInstance.updateDashboardList(DASHBOARD_LIST_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling DashboardListsApi#updateDashboardList");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Update a dashboard list returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.dashboard_lists_apiimportDashboardListsApifromdatadog_api_client.v1.model.dashboard_listimportDashboardList# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=environ["DASHBOARD_LIST_ID"]body=DashboardList(name="updated Example-Dashboard-List",)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=DashboardListsApi(api_client)response=api_instance.update_dashboard_list(list_id=int(DASHBOARD_LIST_ID),body=body)print(response)
# Update a dashboard list returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::DashboardListsAPI.new# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=ENV["DASHBOARD_LIST_ID"]body=DatadogAPIClient::V1::DashboardList.new({name:"updated Example-Dashboard-List",})papi_instance.update_dashboard_list(DASHBOARD_LIST_ID.to_i,body)
// Update a dashboard list returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_dashboard_lists::DashboardListsAPI;usedatadog_api_client::datadogV1::model::DashboardList;#[tokio::main]asyncfnmain(){// there is a valid "dashboard_list" in the system
letdashboard_list_id: i64=std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();letbody=DashboardList::new("updated Example-Dashboard-List".to_string());letconfiguration=datadog::Configuration::new();letapi=DashboardListsAPI::with_config(configuration);letresp=api.update_dashboard_list(dashboard_list_id.clone(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Update a dashboard list returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.DashboardListsApi(configuration);// there is a valid "dashboard_list" in the system
constDASHBOARD_LIST_ID=parseInt(process.env.DASHBOARD_LIST_IDasstring);constparams: v1.DashboardListsApiUpdateDashboardListRequest={body:{name:"updated Example-Dashboard-List",},listId: DASHBOARD_LIST_ID,};apiInstance.updateDashboardList(params).then((data: v1.DashboardList)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Delete a dashboard list returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.dashboard_lists_apiimportDashboardListsApi# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=environ["DASHBOARD_LIST_ID"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=DashboardListsApi(api_client)response=api_instance.delete_dashboard_list(list_id=int(DASHBOARD_LIST_ID),)print(response)
# Delete a dashboard list returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::DashboardListsAPI.new# there is a valid "dashboard_list" in the systemDASHBOARD_LIST_ID=ENV["DASHBOARD_LIST_ID"]papi_instance.delete_dashboard_list(DASHBOARD_LIST_ID.to_i)
// Delete a dashboard list returns "OK" response
packagemainimport("context""encoding/json""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 "dashboard_list" in the system
DashboardListID,_:=strconv.ParseInt(os.Getenv("DASHBOARD_LIST_ID"),10,64)ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewDashboardListsApi(apiClient)resp,r,err:=api.DeleteDashboardList(ctx,DashboardListID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DashboardListsApi.DeleteDashboardList`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `DashboardListsApi.DeleteDashboardList`:\n%s\n",responseContent)}
// Delete a dashboard list returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.DashboardListsApi;importcom.datadog.api.client.v1.model.DashboardListDeleteResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();DashboardListsApiapiInstance=newDashboardListsApi(defaultClient);// there is a valid "dashboard_list" in the systemLongDASHBOARD_LIST_ID=Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));try{DashboardListDeleteResponseresult=apiInstance.deleteDashboardList(DASHBOARD_LIST_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling DashboardListsApi#deleteDashboardList");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Delete a dashboard list returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_dashboard_lists::DashboardListsAPI;#[tokio::main]asyncfnmain(){// there is a valid "dashboard_list" in the system
letdashboard_list_id: i64=std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();letconfiguration=datadog::Configuration::new();letapi=DashboardListsAPI::with_config(configuration);letresp=api.delete_dashboard_list(dashboard_list_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Delete a dashboard list returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.DashboardListsApi(configuration);// there is a valid "dashboard_list" in the system
constDASHBOARD_LIST_ID=parseInt(process.env.DASHBOARD_LIST_IDasstring);constparams: v1.DashboardListsApiDeleteDashboardListRequest={listId: DASHBOARD_LIST_ID,};apiInstance.deleteDashboardList(params).then((data: v1.DashboardListDeleteResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));