Skip to content

Latest commit

 

History

History
178 lines (133 loc) · 8.77 KB

DnsTraceInstantTestsApi.md

File metadata and controls

178 lines (133 loc) · 8.77 KB

DnsTraceInstantTestsApi

All URIs are relative to https://api.thousandeyes.com/v7

Method HTTP request Description
createDnsTraceInstantTest POST /tests/dns-trace/instant Create DNS trace instant test
createDnsTraceInstantTestWithHttpInfo POST /tests/dns-trace/instant Create DNS trace instant test

createDnsTraceInstantTest

DnsTraceInstantTestResponse createDnsTraceInstantTest(dnsTraceInstantTestRequest, aid, expand)

Create DNS trace instant test

Creates and runs a new DNS trace instant test.

Example

// Import classes:
import com.thousandeyes.sdk.client.ApiClient;
import com.thousandeyes.sdk.common.ApiException;
import com.thousandeyes.sdk.tests.Configuration;
import com.thousandeyes.sdk.tests.authentication.*;
import com.thousandeyes.sdk.tests.models.*;
import com.thousandeyes.sdk.tests.instant.DnsTraceInstantTestsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.thousandeyes.com/v7");
        
        // Configure HTTP bearer authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        DnsTraceInstantTestsApi apiInstance = new DnsTraceInstantTestsApi(defaultClient);
        DnsTraceInstantTestRequest dnsTraceInstantTestRequest = new DnsTraceInstantTestRequest(); // DnsTraceInstantTestRequest | 
        String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
        List<ExpandInstantTestOptions> expand = Arrays.asList(); // List<ExpandInstantTestOptions> | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`.
        try {
            DnsTraceInstantTestResponse result = apiInstance.createDnsTraceInstantTest(dnsTraceInstantTestRequest, aid, expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DnsTraceInstantTestsApi#createDnsTraceInstantTest");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
dnsTraceInstantTestRequest DnsTraceInstantTestRequest
aid String A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. [optional]
expand List<ExpandInstantTestOptions> (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. [optional]

Return type

DnsTraceInstantTestResponse

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/hal+json, application/json, application/problem+json

HTTP response details

Status code Description Response headers
201 Created * Location -
400 Bad Request -
401 Unauthorized -
403 Insufficient permissions to query endpoint -
404 Not found -
429 Exhausted rate limit for the organization -
500 Internal server error -
502 Bad Gateway -
0 An error occurred -

createDnsTraceInstantTestWithHttpInfo

ApiResponse createDnsTraceInstantTest createDnsTraceInstantTestWithHttpInfo(dnsTraceInstantTestRequest, aid, expand)

Create DNS trace instant test

Creates and runs a new DNS trace instant test.

Example

// Import classes:
import com.thousandeyes.sdk.client.ApiClient;
import com.thousandeyes.sdk.common.ApiException;
import com.thousandeyes.sdk.common.ApiResponse;
import com.thousandeyes.sdk.tests.Configuration;
import com.thousandeyes.sdk.tests.authentication.*;
import com.thousandeyes.sdk.tests.models.*;
import com.thousandeyes.sdk.tests.instant.DnsTraceInstantTestsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.thousandeyes.com/v7");
        
        // Configure HTTP bearer authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        DnsTraceInstantTestsApi apiInstance = new DnsTraceInstantTestsApi(defaultClient);
        DnsTraceInstantTestRequest dnsTraceInstantTestRequest = new DnsTraceInstantTestRequest(); // DnsTraceInstantTestRequest | 
        String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
        List<ExpandInstantTestOptions> expand = Arrays.asList(); // List<ExpandInstantTestOptions> | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`.
        try {
            ApiResponse<DnsTraceInstantTestResponse> response = apiInstance.createDnsTraceInstantTestWithHttpInfo(dnsTraceInstantTestRequest, aid, expand);
            System.out.println("Status code: " + response.getStatusCode());
            System.out.println("Response headers: " + response.getHeaders());
            System.out.println("Response body: " + response.getData());
        } catch (ApiException e) {
            System.err.println("Exception when calling DnsTraceInstantTestsApi#createDnsTraceInstantTest");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Response headers: " + e.getResponseHeaders());
            System.err.println("Reason: " + e.getResponseBody());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
dnsTraceInstantTestRequest DnsTraceInstantTestRequest
aid String A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. [optional]
expand List<ExpandInstantTestOptions> (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. [optional]

Return type

ApiResponse<DnsTraceInstantTestResponse>

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/hal+json, application/json, application/problem+json

HTTP response details

Status code Description Response headers
201 Created * Location -
400 Bad Request -
401 Unauthorized -
403 Insufficient permissions to query endpoint -
404 Not found -
429 Exhausted rate limit for the organization -
500 Internal server error -
502 Bad Gateway -
0 An error occurred -