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 webhooks integration returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.WebhooksIntegrationApi(configuration);constparams: v1.WebhooksIntegrationApiCreateWebhooksIntegrationRequest={body:{name:"Example-Webhooks-Integration",url:"https://example.com/webhook",},};apiInstance.createWebhooksIntegration(params).then((data: v1.WebhooksIntegration)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Get a webhook integration returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.webhooks_integration_apiimportWebhooksIntegrationApi# there is a valid "webhook" in the systemWEBHOOK_NAME=environ["WEBHOOK_NAME"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=WebhooksIntegrationApi(api_client)response=api_instance.get_webhooks_integration(webhook_name=WEBHOOK_NAME,)print(response)
# Get a webhook integration returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::WebhooksIntegrationAPI.new# there is a valid "webhook" in the systemWEBHOOK_NAME=ENV["WEBHOOK_NAME"]papi_instance.get_webhooks_integration(WEBHOOK_NAME)
// Get a webhook integration 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(){// there is a valid "webhook" in the system
WebhookName:=os.Getenv("WEBHOOK_NAME")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewWebhooksIntegrationApi(apiClient)resp,r,err:=api.GetWebhooksIntegration(ctx,WebhookName)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `WebhooksIntegrationApi.GetWebhooksIntegration`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `WebhooksIntegrationApi.GetWebhooksIntegration`:\n%s\n",responseContent)}
// Get a webhook integration returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.WebhooksIntegrationApi;importcom.datadog.api.client.v1.model.WebhooksIntegration;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();WebhooksIntegrationApiapiInstance=newWebhooksIntegrationApi(defaultClient);// there is a valid "webhook" in the systemStringWEBHOOK_NAME=System.getenv("WEBHOOK_NAME");try{WebhooksIntegrationresult=apiInstance.getWebhooksIntegration(WEBHOOK_NAME);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling WebhooksIntegrationApi#getWebhooksIntegration");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get a webhook integration returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_webhooks_integration::WebhooksIntegrationAPI;#[tokio::main]asyncfnmain(){// there is a valid "webhook" in the system
letwebhook_name=std::env::var("WEBHOOK_NAME").unwrap();letconfiguration=datadog::Configuration::new();letapi=WebhooksIntegrationAPI::with_config(configuration);letresp=api.get_webhooks_integration(webhook_name.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="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Get a webhook integration returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.WebhooksIntegrationApi(configuration);// there is a valid "webhook" in the system
constWEBHOOK_NAME=process.env.WEBHOOK_NAMEasstring;constparams: v1.WebhooksIntegrationApiGetWebhooksIntegrationRequest={webhookName: WEBHOOK_NAME,};apiInstance.getWebhooksIntegration(params).then((data: v1.WebhooksIntegration)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Update a webhook 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(){// there is a valid "webhook" in the system
WebhookName:=os.Getenv("WEBHOOK_NAME")body:=datadogV1.WebhooksIntegrationUpdateRequest{Url:datadog.PtrString("https://example.com/webhook-updated"),}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewWebhooksIntegrationApi(apiClient)resp,r,err:=api.UpdateWebhooksIntegration(ctx,WebhookName,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `WebhooksIntegrationApi.UpdateWebhooksIntegration`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `WebhooksIntegrationApi.UpdateWebhooksIntegration`:\n%s\n",responseContent)}
// Update a webhook returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.WebhooksIntegrationApi;importcom.datadog.api.client.v1.model.WebhooksIntegration;importcom.datadog.api.client.v1.model.WebhooksIntegrationUpdateRequest;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();WebhooksIntegrationApiapiInstance=newWebhooksIntegrationApi(defaultClient);// there is a valid "webhook" in the systemStringWEBHOOK_NAME=System.getenv("WEBHOOK_NAME");WebhooksIntegrationUpdateRequestbody=newWebhooksIntegrationUpdateRequest().url("https://example.com/webhook-updated");try{WebhooksIntegrationresult=apiInstance.updateWebhooksIntegration(WEBHOOK_NAME,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling WebhooksIntegrationApi#updateWebhooksIntegration");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Update a webhook returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.webhooks_integration_apiimportWebhooksIntegrationApifromdatadog_api_client.v1.model.webhooks_integration_update_requestimportWebhooksIntegrationUpdateRequest# there is a valid "webhook" in the systemWEBHOOK_NAME=environ["WEBHOOK_NAME"]body=WebhooksIntegrationUpdateRequest(url="https://example.com/webhook-updated",)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=WebhooksIntegrationApi(api_client)response=api_instance.update_webhooks_integration(webhook_name=WEBHOOK_NAME,body=body)print(response)
# Update a webhook returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::WebhooksIntegrationAPI.new# there is a valid "webhook" in the systemWEBHOOK_NAME=ENV["WEBHOOK_NAME"]body=DatadogAPIClient::V1::WebhooksIntegrationUpdateRequest.new({url:"https://example.com/webhook-updated",})papi_instance.update_webhooks_integration(WEBHOOK_NAME,body)
// Update a webhook returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_webhooks_integration::WebhooksIntegrationAPI;usedatadog_api_client::datadogV1::model::WebhooksIntegrationUpdateRequest;#[tokio::main]asyncfnmain(){// there is a valid "webhook" in the system
letwebhook_name=std::env::var("WEBHOOK_NAME").unwrap();letbody=WebhooksIntegrationUpdateRequest::new().url("https://example.com/webhook-updated".to_string());letconfiguration=datadog::Configuration::new();letapi=WebhooksIntegrationAPI::with_config(configuration);letresp=api.update_webhooks_integration(webhook_name.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 a webhook returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.WebhooksIntegrationApi(configuration);// there is a valid "webhook" in the system
constWEBHOOK_NAME=process.env.WEBHOOK_NAMEasstring;constparams: v1.WebhooksIntegrationApiUpdateWebhooksIntegrationRequest={body:{url:"https://example.com/webhook-updated",},webhookName: WEBHOOK_NAME,};apiInstance.updateWebhooksIntegration(params).then((data: v1.WebhooksIntegration)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Delete a webhook returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.webhooks_integration_apiimportWebhooksIntegrationApi# there is a valid "webhook" in the systemWEBHOOK_NAME=environ["WEBHOOK_NAME"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=WebhooksIntegrationApi(api_client)api_instance.delete_webhooks_integration(webhook_name=WEBHOOK_NAME,)
# Delete a webhook returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::WebhooksIntegrationAPI.new# there is a valid "webhook" in the systemWEBHOOK_NAME=ENV["WEBHOOK_NAME"]papi_instance.delete_webhooks_integration(WEBHOOK_NAME)
// Delete a webhook returns "OK" response
packagemainimport("context""fmt""os""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 "webhook" in the system
WebhookName:=os.Getenv("WEBHOOK_NAME")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewWebhooksIntegrationApi(apiClient)r,err:=api.DeleteWebhooksIntegration(ctx,WebhookName)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `WebhooksIntegrationApi.DeleteWebhooksIntegration`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}}
// Delete a webhook returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.WebhooksIntegrationApi;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();WebhooksIntegrationApiapiInstance=newWebhooksIntegrationApi(defaultClient);// there is a valid "webhook" in the systemStringWEBHOOK_NAME=System.getenv("WEBHOOK_NAME");try{apiInstance.deleteWebhooksIntegration(WEBHOOK_NAME);}catch(ApiExceptione){System.err.println("Exception when calling WebhooksIntegrationApi#deleteWebhooksIntegration");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Delete a webhook returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_webhooks_integration::WebhooksIntegrationAPI;#[tokio::main]asyncfnmain(){// there is a valid "webhook" in the system
letwebhook_name=std::env::var("WEBHOOK_NAME").unwrap();letconfiguration=datadog::Configuration::new();letapi=WebhooksIntegrationAPI::with_config(configuration);letresp=api.delete_webhooks_integration(webhook_name.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="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete a webhook returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.WebhooksIntegrationApi(configuration);// there is a valid "webhook" in the system
constWEBHOOK_NAME=process.env.WEBHOOK_NAMEasstring;constparams: v1.WebhooksIntegrationApiDeleteWebhooksIntegrationRequest={webhookName: WEBHOOK_NAME,};apiInstance.deleteWebhooksIntegration(params).then((data: any)=>{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.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Create a custom variable returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.WebhooksIntegrationApi(configuration);constparams: v1.WebhooksIntegrationApiCreateWebhooksIntegrationCustomVariableRequest={body:{isSecret: true,name:"EXAMPLEWEBHOOKSINTEGRATION",value:"CUSTOM_VARIABLE_VALUE",},};apiInstance.createWebhooksIntegrationCustomVariable(params).then((data: v1.WebhooksIntegrationCustomVariableResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
Affiche le contenu de la variable personnalisée <NOM_VARIABLE_PERSONNALISÉE>. Si la variable personnalisée est secrète, renvoie null pour <NOM_VARIABLE_PERSONNALISÉE> dans la charge utile de la réponse.
"""
Get a custom variable returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.webhooks_integration_apiimportWebhooksIntegrationApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=WebhooksIntegrationApi(api_client)response=api_instance.get_webhooks_integration_custom_variable(custom_variable_name="custom_variable_name",)print(response)
# Get a custom variable returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::WebhooksIntegrationAPI.newpapi_instance.get_webhooks_integration_custom_variable("custom_variable_name")
// Get a custom variable 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.NewWebhooksIntegrationApi(apiClient)resp,r,err:=api.GetWebhooksIntegrationCustomVariable(ctx,"custom_variable_name")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `WebhooksIntegrationApi.GetWebhooksIntegrationCustomVariable`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `WebhooksIntegrationApi.GetWebhooksIntegrationCustomVariable`:\n%s\n",responseContent)}
// Get a custom variable returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_webhooks_integration::WebhooksIntegrationAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=WebhooksIntegrationAPI::with_config(configuration);letresp=api.get_webhooks_integration_custom_variable("custom_variable_name".to_string()).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
/**
* Get a custom variable returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.WebhooksIntegrationApi(configuration);constparams: v1.WebhooksIntegrationApiGetWebhooksIntegrationCustomVariableRequest={customVariableName:"custom_variable_name",};apiInstance.getWebhooksIntegrationCustomVariable(params).then((data: v1.WebhooksIntegrationCustomVariableResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Update a custom variable 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(){// there is a valid "webhook_custom_variable" in the system
WebhookCustomVariableName:=os.Getenv("WEBHOOK_CUSTOM_VARIABLE_NAME")body:=datadogV1.WebhooksIntegrationCustomVariableUpdateRequest{Value:datadog.PtrString("variable-updated"),}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewWebhooksIntegrationApi(apiClient)resp,r,err:=api.UpdateWebhooksIntegrationCustomVariable(ctx,WebhookCustomVariableName,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `WebhooksIntegrationApi.UpdateWebhooksIntegrationCustomVariable`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `WebhooksIntegrationApi.UpdateWebhooksIntegrationCustomVariable`:\n%s\n",responseContent)}
// Update a custom variable returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.WebhooksIntegrationApi;importcom.datadog.api.client.v1.model.WebhooksIntegrationCustomVariableResponse;importcom.datadog.api.client.v1.model.WebhooksIntegrationCustomVariableUpdateRequest;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();WebhooksIntegrationApiapiInstance=newWebhooksIntegrationApi(defaultClient);// there is a valid "webhook_custom_variable" in the systemStringWEBHOOK_CUSTOM_VARIABLE_NAME=System.getenv("WEBHOOK_CUSTOM_VARIABLE_NAME");WebhooksIntegrationCustomVariableUpdateRequestbody=newWebhooksIntegrationCustomVariableUpdateRequest().value("variable-updated");try{WebhooksIntegrationCustomVariableResponseresult=apiInstance.updateWebhooksIntegrationCustomVariable(WEBHOOK_CUSTOM_VARIABLE_NAME,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling WebhooksIntegrationApi#updateWebhooksIntegrationCustomVariable");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Update a custom variable returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.webhooks_integration_apiimportWebhooksIntegrationApifromdatadog_api_client.v1.model.webhooks_integration_custom_variable_update_requestimport(WebhooksIntegrationCustomVariableUpdateRequest,)# there is a valid "webhook_custom_variable" in the systemWEBHOOK_CUSTOM_VARIABLE_NAME=environ["WEBHOOK_CUSTOM_VARIABLE_NAME"]body=WebhooksIntegrationCustomVariableUpdateRequest(value="variable-updated",)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=WebhooksIntegrationApi(api_client)response=api_instance.update_webhooks_integration_custom_variable(custom_variable_name=WEBHOOK_CUSTOM_VARIABLE_NAME,body=body)print(response)
# Update a custom variable returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::WebhooksIntegrationAPI.new# there is a valid "webhook_custom_variable" in the systemWEBHOOK_CUSTOM_VARIABLE_NAME=ENV["WEBHOOK_CUSTOM_VARIABLE_NAME"]body=DatadogAPIClient::V1::WebhooksIntegrationCustomVariableUpdateRequest.new({value:"variable-updated",})papi_instance.update_webhooks_integration_custom_variable(WEBHOOK_CUSTOM_VARIABLE_NAME,body)
// Update a custom variable returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_webhooks_integration::WebhooksIntegrationAPI;usedatadog_api_client::datadogV1::model::WebhooksIntegrationCustomVariableUpdateRequest;#[tokio::main]asyncfnmain(){// there is a valid "webhook_custom_variable" in the system
letwebhook_custom_variable_name=std::env::var("WEBHOOK_CUSTOM_VARIABLE_NAME").unwrap();letbody=WebhooksIntegrationCustomVariableUpdateRequest::new().value("variable-updated".to_string());letconfiguration=datadog::Configuration::new();letapi=WebhooksIntegrationAPI::with_config(configuration);letresp=api.update_webhooks_integration_custom_variable(webhook_custom_variable_name.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 a custom variable returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.WebhooksIntegrationApi(configuration);// there is a valid "webhook_custom_variable" in the system
constWEBHOOK_CUSTOM_VARIABLE_NAME=process.env.WEBHOOK_CUSTOM_VARIABLE_NAMEasstring;constparams: v1.WebhooksIntegrationApiUpdateWebhooksIntegrationCustomVariableRequest={body:{value:"variable-updated",},customVariableName: WEBHOOK_CUSTOM_VARIABLE_NAME,};apiInstance.updateWebhooksIntegrationCustomVariable(params).then((data: v1.WebhooksIntegrationCustomVariableResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Delete a custom variable returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.webhooks_integration_apiimportWebhooksIntegrationApi# there is a valid "webhook_custom_variable" in the systemWEBHOOK_CUSTOM_VARIABLE_NAME=environ["WEBHOOK_CUSTOM_VARIABLE_NAME"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=WebhooksIntegrationApi(api_client)api_instance.delete_webhooks_integration_custom_variable(custom_variable_name=WEBHOOK_CUSTOM_VARIABLE_NAME,)
# Delete a custom variable returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::WebhooksIntegrationAPI.new# there is a valid "webhook_custom_variable" in the systemWEBHOOK_CUSTOM_VARIABLE_NAME=ENV["WEBHOOK_CUSTOM_VARIABLE_NAME"]papi_instance.delete_webhooks_integration_custom_variable(WEBHOOK_CUSTOM_VARIABLE_NAME)
// Delete a custom variable returns "OK" response
packagemainimport("context""fmt""os""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 "webhook_custom_variable" in the system
WebhookCustomVariableName:=os.Getenv("WEBHOOK_CUSTOM_VARIABLE_NAME")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewWebhooksIntegrationApi(apiClient)r,err:=api.DeleteWebhooksIntegrationCustomVariable(ctx,WebhookCustomVariableName)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `WebhooksIntegrationApi.DeleteWebhooksIntegrationCustomVariable`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}}
// Delete a custom variable returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.WebhooksIntegrationApi;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();WebhooksIntegrationApiapiInstance=newWebhooksIntegrationApi(defaultClient);// there is a valid "webhook_custom_variable" in the systemStringWEBHOOK_CUSTOM_VARIABLE_NAME=System.getenv("WEBHOOK_CUSTOM_VARIABLE_NAME");try{apiInstance.deleteWebhooksIntegrationCustomVariable(WEBHOOK_CUSTOM_VARIABLE_NAME);}catch(ApiExceptione){System.err.println("Exception when calling WebhooksIntegrationApi#deleteWebhooksIntegrationCustomVariable");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Delete a custom variable returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_webhooks_integration::WebhooksIntegrationAPI;#[tokio::main]asyncfnmain(){// there is a valid "webhook_custom_variable" in the system
letwebhook_custom_variable_name=std::env::var("WEBHOOK_CUSTOM_VARIABLE_NAME").unwrap();letconfiguration=datadog::Configuration::new();letapi=WebhooksIntegrationAPI::with_config(configuration);letresp=api.delete_webhooks_integration_custom_variable(webhook_custom_variable_name.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="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete a custom variable returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.WebhooksIntegrationApi(configuration);// there is a valid "webhook_custom_variable" in the system
constWEBHOOK_CUSTOM_VARIABLE_NAME=process.env.WEBHOOK_CUSTOM_VARIABLE_NAMEasstring;constparams: v1.WebhooksIntegrationApiDeleteWebhooksIntegrationCustomVariableRequest={customVariableName: WEBHOOK_CUSTOM_VARIABLE_NAME,};apiInstance.deleteWebhooksIntegrationCustomVariable(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));