Response containing the list of parent suites for a Synthetic test.
Expand All
Field
Type
Description
data
[object]
List of parent suites for the given test.
attributes
object
Object containing details about a parent suite of a Synthetic test.
child_name
string
The name of the child test within the suite.
child_public_id
string
The public ID of the child test within the suite.
monitor_id
int64
The associated monitor ID.
name
string
Name of the parent suite.
overall_state
int64
The overall state of the parent suite.
overall_state_modified
string
Timestamp of when the overall state was last modified.
public_id
string
The public ID of the parent suite.
id
string
The public ID of the parent suite.
type
enum
Type of the parent suite resource.
Allowed enum values: parent_suite
default: parent_suite
{"data":[{"attributes":{"child_name":"My API Test","child_public_id":"xyz-uvw-789","monitor_id":12345678,"name":"My Suite","overall_state":0,"overall_state_modified":"2024-01-01T00:00:00+00:00","public_id":"abc-def-123"},"id":"abc-def-123","type":"parent_suite"}]}
"""
Get parent suites for a test returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.synthetics_apiimportSyntheticsApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=SyntheticsApi(api_client)response=api_instance.get_test_parent_suites(public_id="public_id",)print(response)
# Get parent suites for a test returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::SyntheticsAPI.newpapi_instance.get_test_parent_suites("public_id")
// Get parent suites for a test 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/datadogV2")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewSyntheticsApi(apiClient)resp,r,err:=api.GetTestParentSuites(ctx,"public_id")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `SyntheticsApi.GetTestParentSuites`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `SyntheticsApi.GetTestParentSuites`:\n%s\n",responseContent)}
// Get parent suites for a test returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.SyntheticsApi;importcom.datadog.api.client.v2.model.SyntheticsTestParentSuitesResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();SyntheticsApiapiInstance=newSyntheticsApi(defaultClient);try{SyntheticsTestParentSuitesResponseresult=apiInstance.getTestParentSuites("public_id");System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling SyntheticsApi#getTestParentSuites");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get parent suites for a test returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_synthetics::SyntheticsAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=SyntheticsAPI::with_config(configuration);letresp=api.get_test_parent_suites("public_id".to_string()).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 parent suites for a test returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.SyntheticsApi(configuration);constparams: v2.SyntheticsApiGetTestParentSuitesRequest={publicId:"public_id",};apiInstance.getTestParentSuites(params).then((data: v2.SyntheticsTestParentSuitesResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));