Test Optimization 서비스 설정 삭제
https://api.datadoghq.com/api/v2/ci/test-optimization/settings/servicehttps://api.us3.datadoghq.com/api/v2/ci/test-optimization/settings/servicehttps://api.us5.datadoghq.com/api/v2/ci/test-optimization/settings/servicehttps://api.datadoghq.eu/api/v2/ci/test-optimization/settings/servicehttps://api.ap1.datadoghq.com/api/v2/ci/test-optimization/settings/servicehttps://api.ap2.datadoghq.com/api/v2/ci/test-optimization/settings/servicehttps://api.uk1.datadoghq.com/api/v2/ci/test-optimization/settings/servicehttps://api.ddog-gov.com/api/v2/ci/test-optimization/settings/servicehttps://api.us2.ddog-gov.com/api/v2/ci/test-optimization/settings/service개요
리포지토리, 서비스 이름 및 환경으로 식별되는 특정 서비스에 대한 Test Optimization 설정을 삭제합니다.
OAuth apps require the test_optimization_settings_write authorization scope to access this endpoint.
요청
Body Data (required)
data [required]Test Optimization 서비스 설정 삭제를 위한 요청 객체입니다.
attributes [required]Attributes for deleting Test Optimization service settings.
envThe environment name. If omitted, defaults to none.
repository_id [required]The repository identifier.
service_name [required]The service name.
type [required]JSON:API type for delete service settings request.
The value must always be test_optimization_delete_service_settings_request.
test_optimization_delete_service_settings_request{
"data": {
"attributes": {
"env": "prod",
"repository_id": "github.com/datadog/test-service",
"service_name": "test-service"
},
"type": "test_optimization_delete_service_settings_request"
}
}응답
No Content
Bad Request
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Not Authorized
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Not Found
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}코드 예시
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X DELETE "https://api.${DD_SITE}/api/v2/ci/test-optimization/settings/service" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"env": "prod",
"repository_id": "github.com/datadog/test-service",
"service_name": "test-service"
},
"type": "test_optimization_delete_service_settings_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X DELETE "https://api.${DD_SITE}/api/v2/ci/test-optimization/settings/service" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"env": "prod",
"repository_id": "github.com/datadog/test-service",
"service_name": "test-service"
},
"type": "test_optimization_delete_service_settings_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X DELETE "https://api.${DD_SITE}/api/v2/ci/test-optimization/settings/service" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"env": "prod",
"repository_id": "github.com/datadog/test-service",
"service_name": "test-service"
},
"type": "test_optimization_delete_service_settings_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X DELETE "https://api.${DD_SITE}/api/v2/ci/test-optimization/settings/service" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"env": "prod",
"repository_id": "github.com/datadog/test-service",
"service_name": "test-service"
},
"type": "test_optimization_delete_service_settings_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X DELETE "https://api.${DD_SITE}/api/v2/ci/test-optimization/settings/service" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"env": "prod",
"repository_id": "github.com/datadog/test-service",
"service_name": "test-service"
},
"type": "test_optimization_delete_service_settings_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X DELETE "https://api.${DD_SITE}/api/v2/ci/test-optimization/settings/service" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"env": "prod",
"repository_id": "github.com/datadog/test-service",
"service_name": "test-service"
},
"type": "test_optimization_delete_service_settings_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X DELETE "https://api.${DD_SITE}/api/v2/ci/test-optimization/settings/service" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"env": "prod",
"repository_id": "github.com/datadog/test-service",
"service_name": "test-service"
},
"type": "test_optimization_delete_service_settings_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X DELETE "https://api.${DD_SITE}/api/v2/ci/test-optimization/settings/service" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"env": "prod",
"repository_id": "github.com/datadog/test-service",
"service_name": "test-service"
},
"type": "test_optimization_delete_service_settings_request"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X DELETE "https://api.${DD_SITE}/api/v2/ci/test-optimization/settings/service" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"env": "prod",
"repository_id": "github.com/datadog/test-service",
"service_name": "test-service"
},
"type": "test_optimization_delete_service_settings_request"
}
}
EOF// Delete Test Optimization service settings returns "No Content" response
package main
import (
"context"
"fmt"
"os"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)
func main() {
body := datadogV2.TestOptimizationDeleteServiceSettingsRequest{
Data: datadogV2.TestOptimizationDeleteServiceSettingsRequestData{
Attributes: datadogV2.TestOptimizationDeleteServiceSettingsRequestAttributes{
Env: datadog.PtrString("prod"),
RepositoryId: "github.com/datadog/shopist",
ServiceName: "shopist",
},
Type: datadogV2.TESTOPTIMIZATIONDELETESERVICESETTINGSREQUESTDATATYPE_TEST_OPTIMIZATION_DELETE_SERVICE_SETTINGS_REQUEST,
},
}
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.NewTestOptimizationApi(apiClient)
r, err := api.DeleteTestOptimizationServiceSettings(ctx, body)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TestOptimizationApi.DeleteTestOptimizationServiceSettings`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Instructions
First install the library and its dependencies and then save the example to main.go and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"// Delete Test Optimization service settings returns "No Content" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.TestOptimizationApi;
import com.datadog.api.client.v2.model.TestOptimizationDeleteServiceSettingsRequest;
import com.datadog.api.client.v2.model.TestOptimizationDeleteServiceSettingsRequestAttributes;
import com.datadog.api.client.v2.model.TestOptimizationDeleteServiceSettingsRequestData;
import com.datadog.api.client.v2.model.TestOptimizationDeleteServiceSettingsRequestDataType;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
TestOptimizationApi apiInstance = new TestOptimizationApi(defaultClient);
TestOptimizationDeleteServiceSettingsRequest body =
new TestOptimizationDeleteServiceSettingsRequest()
.data(
new TestOptimizationDeleteServiceSettingsRequestData()
.attributes(
new TestOptimizationDeleteServiceSettingsRequestAttributes()
.env("prod")
.repositoryId("github.com/datadog/shopist")
.serviceName("shopist"))
.type(
TestOptimizationDeleteServiceSettingsRequestDataType
.TEST_OPTIMIZATION_DELETE_SERVICE_SETTINGS_REQUEST));
try {
apiInstance.deleteTestOptimizationServiceSettings(body);
} catch (ApiException e) {
System.err.println(
"Exception when calling TestOptimizationApi#deleteTestOptimizationServiceSettings");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Instructions
First install the library and its dependencies and then save the example to Example.java and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java""""
Delete Test Optimization service settings returns "No Content" response
"""
from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi
from datadog_api_client.v2.model.test_optimization_delete_service_settings_request import (
TestOptimizationDeleteServiceSettingsRequest,
)
from datadog_api_client.v2.model.test_optimization_delete_service_settings_request_attributes import (
TestOptimizationDeleteServiceSettingsRequestAttributes,
)
from datadog_api_client.v2.model.test_optimization_delete_service_settings_request_data import (
TestOptimizationDeleteServiceSettingsRequestData,
)
from datadog_api_client.v2.model.test_optimization_delete_service_settings_request_data_type import (
TestOptimizationDeleteServiceSettingsRequestDataType,
)
body = TestOptimizationDeleteServiceSettingsRequest(
data=TestOptimizationDeleteServiceSettingsRequestData(
attributes=TestOptimizationDeleteServiceSettingsRequestAttributes(
env="prod",
repository_id="github.com/datadog/shopist",
service_name="shopist",
),
type=TestOptimizationDeleteServiceSettingsRequestDataType.TEST_OPTIMIZATION_DELETE_SERVICE_SETTINGS_REQUEST,
),
)
configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
with ApiClient(configuration) as api_client:
api_instance = TestOptimizationApi(api_client)
api_instance.delete_test_optimization_service_settings(body=body)
Instructions
First install the library and its dependencies and then save the example to example.py and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"# Delete Test Optimization service settings returns "No Content" response
require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
end
api_instance = DatadogAPIClient::V2::TestOptimizationAPI.new
body = DatadogAPIClient::V2::TestOptimizationDeleteServiceSettingsRequest.new({
data: DatadogAPIClient::V2::TestOptimizationDeleteServiceSettingsRequestData.new({
attributes: DatadogAPIClient::V2::TestOptimizationDeleteServiceSettingsRequestAttributes.new({
env: "prod",
repository_id: "github.com/datadog/shopist",
service_name: "shopist",
}),
type: DatadogAPIClient::V2::TestOptimizationDeleteServiceSettingsRequestDataType::TEST_OPTIMIZATION_DELETE_SERVICE_SETTINGS_REQUEST,
}),
})
api_instance.delete_test_optimization_service_settings(body)
Instructions
First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"// Delete Test Optimization service settings returns "No Content" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_test_optimization::TestOptimizationAPI;
use datadog_api_client::datadogV2::model::TestOptimizationDeleteServiceSettingsRequest;
use datadog_api_client::datadogV2::model::TestOptimizationDeleteServiceSettingsRequestAttributes;
use datadog_api_client::datadogV2::model::TestOptimizationDeleteServiceSettingsRequestData;
use datadog_api_client::datadogV2::model::TestOptimizationDeleteServiceSettingsRequestDataType;
#[tokio::main]
async fn main() {
let body =
TestOptimizationDeleteServiceSettingsRequest::new(
TestOptimizationDeleteServiceSettingsRequestData::new(
TestOptimizationDeleteServiceSettingsRequestAttributes::new(
"github.com/datadog/shopist".to_string(),
"shopist".to_string(),
).env("prod".to_string()),
TestOptimizationDeleteServiceSettingsRequestDataType
::TEST_OPTIMIZATION_DELETE_SERVICE_SETTINGS_REQUEST,
),
);
let configuration = datadog::Configuration::new();
let api = TestOptimizationAPI::with_config(configuration);
let resp = api.delete_test_optimization_service_settings(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Instructions
First install the library and its dependencies and then save the example to src/main.rs and run following commands:
DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us3.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us5.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="datadoghq.eu" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ap1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ap2.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="uk1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run/**
* Delete Test Optimization service settings returns "No Content" response
*/
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration({
authMethods: {
AuthZ: {
accessToken: process.env.DD_BEARER_TOKEN as string,
},
},
});
const apiInstance = new v2.TestOptimizationApi(configuration);
const params: v2.TestOptimizationApiDeleteTestOptimizationServiceSettingsRequest =
{
body: {
data: {
attributes: {
env: "prod",
repositoryId: "github.com/datadog/shopist",
serviceName: "shopist",
},
type: "test_optimization_delete_service_settings_request",
},
},
};
apiInstance
.deleteTestOptimizationServiceSettings(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Instructions
First install the library and its dependencies and then save the example to example.ts and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"