Skip to content

Latest commit

 

History

History
842 lines (633 loc) · 37.4 KB

VoiceApi.md

File metadata and controls

842 lines (633 loc) · 37.4 KB

VoiceApi

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

Method HTTP request Description
createVoiceTest POST /tests/voice Create Voice test
createVoiceTestWithHttpInfo POST /tests/voice Create Voice test
deleteVoiceTest DELETE /tests/voice/{testId} Delete Voice test
deleteVoiceTestWithHttpInfo DELETE /tests/voice/{testId} Delete Voice test
getVoiceTest GET /tests/voice/{testId} Get Voice test
getVoiceTestWithHttpInfo GET /tests/voice/{testId} Get Voice test
getVoiceTests GET /tests/voice List Voice tests
getVoiceTestsWithHttpInfo GET /tests/voice List Voice tests
updateVoiceTest PUT /tests/voice/{testId} Update Voice test
updateVoiceTestWithHttpInfo PUT /tests/voice/{testId} Update Voice test

createVoiceTest

VoiceTest createVoiceTest(updateVoiceTest, aid, expand)

Create Voice test

Creates a new Voice test. This method requires Account Admin permissions.

Example

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

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");

        VoiceApi apiInstance = new VoiceApi(defaultClient);
        UpdateVoiceTest updateVoiceTest = new UpdateVoiceTest(); // UpdateVoiceTest | 
        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<Expand> expand = Arrays.asList(); // List<Expand> | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query.
        try {
            VoiceTest result = apiInstance.createVoiceTest(updateVoiceTest, aid, expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VoiceApi#createVoiceTest");
            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
updateVoiceTest UpdateVoiceTest
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<Expand> Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. [optional]

Return type

VoiceTest

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 -

createVoiceTestWithHttpInfo

ApiResponse createVoiceTest createVoiceTestWithHttpInfo(updateVoiceTest, aid, expand)

Create Voice test

Creates a new Voice test. This method requires Account Admin permissions.

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.Configuration;
import com.thousandeyes.sdk.authentication.*;
import com.thousandeyes.sdk.models.*;
import com.thousandeyes.sdk.tests.VoiceApi;

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");

        VoiceApi apiInstance = new VoiceApi(defaultClient);
        UpdateVoiceTest updateVoiceTest = new UpdateVoiceTest(); // UpdateVoiceTest | 
        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<Expand> expand = Arrays.asList(); // List<Expand> | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query.
        try {
            ApiResponse<VoiceTest> response = apiInstance.createVoiceTestWithHttpInfo(updateVoiceTest, 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 VoiceApi#createVoiceTest");
            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
updateVoiceTest UpdateVoiceTest
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<Expand> Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. [optional]

Return type

ApiResponse<VoiceTest>

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 -

deleteVoiceTest

void deleteVoiceTest(testId, aid)

Delete Voice test

Deletes the specified Voice test. This method requires Account Admin permissions.

Example

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

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");

        VoiceApi apiInstance = new VoiceApi(defaultClient);
        String testId = "281474976710706"; // String | ID of the test
        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.
        try {
            apiInstance.deleteVoiceTest(testId, aid);
        } catch (ApiException e) {
            System.err.println("Exception when calling VoiceApi#deleteVoiceTest");
            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
testId String ID of the test
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]

Return type

null (empty response body)

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No content -
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 -

deleteVoiceTestWithHttpInfo

ApiResponse deleteVoiceTest deleteVoiceTestWithHttpInfo(testId, aid)

Delete Voice test

Deletes the specified Voice test. This method requires Account Admin permissions.

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.Configuration;
import com.thousandeyes.sdk.authentication.*;
import com.thousandeyes.sdk.models.*;
import com.thousandeyes.sdk.tests.VoiceApi;

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");

        VoiceApi apiInstance = new VoiceApi(defaultClient);
        String testId = "281474976710706"; // String | ID of the test
        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.
        try {
            ApiResponse<Void> response = apiInstance.deleteVoiceTestWithHttpInfo(testId, aid);
            System.out.println("Status code: " + response.getStatusCode());
            System.out.println("Response headers: " + response.getHeaders());
        } catch (ApiException e) {
            System.err.println("Exception when calling VoiceApi#deleteVoiceTest");
            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
testId String ID of the test
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]

Return type

ApiResponse

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No content -
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 -

getVoiceTest

VoiceTest getVoiceTest(testId, aid, expand)

Get Voice test

Returns details for a Voice test, including name, intervals, targets, alert rules and agents.

Example

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

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");

        VoiceApi apiInstance = new VoiceApi(defaultClient);
        String testId = "281474976710706"; // String | ID of the test
        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<Expand> expand = Arrays.asList(); // List<Expand> | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query.
        try {
            VoiceTest result = apiInstance.getVoiceTest(testId, aid, expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VoiceApi#getVoiceTest");
            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
testId String ID of the test
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<Expand> Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. [optional]

Return type

VoiceTest

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
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 -

getVoiceTestWithHttpInfo

ApiResponse getVoiceTest getVoiceTestWithHttpInfo(testId, aid, expand)

Get Voice test

Returns details for a Voice test, including name, intervals, targets, alert rules and agents.

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.Configuration;
import com.thousandeyes.sdk.authentication.*;
import com.thousandeyes.sdk.models.*;
import com.thousandeyes.sdk.tests.VoiceApi;

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");

        VoiceApi apiInstance = new VoiceApi(defaultClient);
        String testId = "281474976710706"; // String | ID of the test
        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<Expand> expand = Arrays.asList(); // List<Expand> | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query.
        try {
            ApiResponse<VoiceTest> response = apiInstance.getVoiceTestWithHttpInfo(testId, 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 VoiceApi#getVoiceTest");
            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
testId String ID of the test
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<Expand> Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. [optional]

Return type

ApiResponse<VoiceTest>

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
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 -

getVoiceTests

VoiceTests getVoiceTests(aid)

List Voice tests

Returns a list of Voice tests and saved events.

Example

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

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");

        VoiceApi apiInstance = new VoiceApi(defaultClient);
        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.
        try {
            VoiceTests result = apiInstance.getVoiceTests(aid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VoiceApi#getVoiceTests");
            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
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]

Return type

VoiceTests

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
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 -

getVoiceTestsWithHttpInfo

ApiResponse getVoiceTests getVoiceTestsWithHttpInfo(aid)

List Voice tests

Returns a list of Voice tests and saved events.

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.Configuration;
import com.thousandeyes.sdk.authentication.*;
import com.thousandeyes.sdk.models.*;
import com.thousandeyes.sdk.tests.VoiceApi;

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");

        VoiceApi apiInstance = new VoiceApi(defaultClient);
        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.
        try {
            ApiResponse<VoiceTests> response = apiInstance.getVoiceTestsWithHttpInfo(aid);
            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 VoiceApi#getVoiceTests");
            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
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]

Return type

ApiResponse<VoiceTests>

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
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 -

updateVoiceTest

VoiceTest updateVoiceTest(testId, updateVoiceTest, aid, expand)

Update Voice test

Updates a Voice test. The target test cannot be a live share or saved event. This method requires Account Admin permissions.

Example

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

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");

        VoiceApi apiInstance = new VoiceApi(defaultClient);
        String testId = "281474976710706"; // String | ID of the test
        UpdateVoiceTest updateVoiceTest = new UpdateVoiceTest(); // UpdateVoiceTest | 
        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<Expand> expand = Arrays.asList(); // List<Expand> | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query.
        try {
            VoiceTest result = apiInstance.updateVoiceTest(testId, updateVoiceTest, aid, expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VoiceApi#updateVoiceTest");
            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
testId String ID of the test
updateVoiceTest UpdateVoiceTest
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<Expand> Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. [optional]

Return type

VoiceTest

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
200 OK -
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 -

updateVoiceTestWithHttpInfo

ApiResponse updateVoiceTest updateVoiceTestWithHttpInfo(testId, updateVoiceTest, aid, expand)

Update Voice test

Updates a Voice test. The target test cannot be a live share or saved event. This method requires Account Admin permissions.

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.Configuration;
import com.thousandeyes.sdk.authentication.*;
import com.thousandeyes.sdk.models.*;
import com.thousandeyes.sdk.tests.VoiceApi;

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");

        VoiceApi apiInstance = new VoiceApi(defaultClient);
        String testId = "281474976710706"; // String | ID of the test
        UpdateVoiceTest updateVoiceTest = new UpdateVoiceTest(); // UpdateVoiceTest | 
        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<Expand> expand = Arrays.asList(); // List<Expand> | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query.
        try {
            ApiResponse<VoiceTest> response = apiInstance.updateVoiceTestWithHttpInfo(testId, updateVoiceTest, 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 VoiceApi#updateVoiceTest");
            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
testId String ID of the test
updateVoiceTest UpdateVoiceTest
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<Expand> Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. [optional]

Return type

ApiResponse<VoiceTest>

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
200 OK -
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 -