"""
Get an API test's latest results summaries returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.synthetics_apiimportSyntheticsApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=SyntheticsApi(api_client)response=api_instance.get_api_test_latest_results(public_id="hwb-332-3xe",)print(response)
# Get an API test's latest results summaries returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::SyntheticsAPI.newpapi_instance.get_api_test_latest_results("hwb-332-3xe")
// Get an API test's latest results summaries returns "OK" responsepackagemainimport("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.NewSyntheticsApi(apiClient)resp,r,err:=api.GetAPITestLatestResults(ctx,"hwb-332-3xe",*datadogV1.NewGetAPITestLatestResultsOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `SyntheticsApi.GetAPITestLatestResults`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `SyntheticsApi.GetAPITestLatestResults`:\n%s\n",responseContent)}
// Get an API test's latest results summaries returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.SyntheticsApi;importcom.datadog.api.client.v1.model.SyntheticsGetAPITestLatestResultsResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();SyntheticsApiapiInstance=newSyntheticsApi(defaultClient);try{SyntheticsGetAPITestLatestResultsResponseresult=apiInstance.getAPITestLatestResults("hwb-332-3xe");System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling SyntheticsApi#getAPITestLatestResults");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get an API test's latest results summaries returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_synthetics::GetAPITestLatestResultsOptionalParams;usedatadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=SyntheticsAPI::with_config(configuration);letresp=api.get_api_test_latest_results("hwb-332-3xe".to_string(),GetAPITestLatestResultsOptionalParams::default(),).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get an API test's latest results summaries returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.SyntheticsApi(configuration);constparams: v1.SyntheticsApiGetAPITestLatestResultsRequest={publicId:"hwb-332-3xe",};apiInstance.getAPITestLatestResults(params).then((data: v1.SyntheticsGetAPITestLatestResultsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));