Skip to content

Latest commit

 

History

History
393 lines (289 loc) · 15.5 KB

TeXmlApplicationsApi.md

File metadata and controls

393 lines (289 loc) · 15.5 KB

TeXmlApplicationsApi

All URIs are relative to https://api.telnyx.com/v2

Method HTTP request Description
createTexmlApplication POST /texml_applications Creates a TeXML Application
deleteTexmlApplication DELETE /texml_applications/{id} Deletes a TeXML Application
findTexmlApplications GET /texml_applications List all TeXML Applications
getTexmlApplication GET /texml_applications/{id} Retrieve a TeXML Application
updateTexmlApplication PATCH /texml_applications/{id} Update a TeXML Application

createTexmlApplication

TexmlApplicationResponse createTexmlApplication(createTexmlApplicationRequest)

Creates a TeXML Application

Creates a TeXML Application.

Example

// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.TeXmlApplicationsApi;

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

        TeXmlApplicationsApi apiInstance = new TeXmlApplicationsApi(defaultClient);
        CreateTexmlApplicationRequest createTexmlApplicationRequest = new CreateTexmlApplicationRequest(); // CreateTexmlApplicationRequest | Parameters that can be set when creating a TeXML Application
        try {
            TexmlApplicationResponse result = apiInstance.createTexmlApplication(createTexmlApplicationRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TeXmlApplicationsApi#createTexmlApplication");
            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
createTexmlApplicationRequest CreateTexmlApplicationRequest Parameters that can be set when creating a TeXML Application

Return type

TexmlApplicationResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Successful response -
401 Unauthorized -
403 Unauthenticated response. Happens when the current user cannot be authenticated. -
404 Resource not found -
422 Unprocessable entity -

deleteTexmlApplication

TexmlApplicationResponse deleteTexmlApplication(id)

Deletes a TeXML Application

Deletes a TeXML Application.

Example

// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.TeXmlApplicationsApi;

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

        TeXmlApplicationsApi apiInstance = new TeXmlApplicationsApi(defaultClient);
        String id = "1293384261075731499"; // String | Identifies the resource.
        try {
            TexmlApplicationResponse result = apiInstance.deleteTexmlApplication(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TeXmlApplicationsApi#deleteTexmlApplication");
            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
id String Identifies the resource.

Return type

TexmlApplicationResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -
400 Bad request, the request was unacceptable, often due to missing a required parameter. -
401 Unauthorized -
403 Unauthenticated response. Happens when the current user cannot be authenticated. -
404 Resource not found -

findTexmlApplications

GetAllTexmlApplicationsResponse findTexmlApplications(pageNumber, pageSize, filterFriendlyNameContains, filterOutboundOutboundVoiceProfileId, sort)

List all TeXML Applications

Returns a list of your TeXML Applications.

Example

// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.TeXmlApplicationsApi;

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

        TeXmlApplicationsApi apiInstance = new TeXmlApplicationsApi(defaultClient);
        Integer pageNumber = 1; // Integer | The page number to load
        Integer pageSize = 20; // Integer | The size of the page
        String filterFriendlyNameContains = "null"; // String | If present, applications with <code>friendly_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters.
        String filterOutboundOutboundVoiceProfileId = "1293384261075731499"; // String | Identifies the associated outbound voice profile.
        String sort = "created_at"; // String | Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul>   <li>     <code>connection_name</code>: sorts the result by the     <code>connection_name</code> field in ascending order.   </li>    <li>     <code>-connection_name</code>: sorts the result by the     <code>connection_name</code> field in descending order.   </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order.
        try {
            GetAllTexmlApplicationsResponse result = apiInstance.findTexmlApplications(pageNumber, pageSize, filterFriendlyNameContains, filterOutboundOutboundVoiceProfileId, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TeXmlApplicationsApi#findTexmlApplications");
            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
pageNumber Integer The page number to load [optional] [default to 1]
pageSize Integer The size of the page [optional] [default to 20]
filterFriendlyNameContains String If present, applications with <code>friendly_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. [optional] [default to null]
filterOutboundOutboundVoiceProfileId String Identifies the associated outbound voice profile. [optional]
sort String Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. [optional] [default to created_at] [enum: created_at, connection_name, active]

Return type

GetAllTexmlApplicationsResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -
400 Bad request, the request was unacceptable, often due to missing a required parameter. -
401 Unauthorized -
403 Unauthenticated response. Happens when the current user cannot be authenticated. -

getTexmlApplication

TexmlApplicationResponse getTexmlApplication(id)

Retrieve a TeXML Application

Retrieves the details of an existing TeXML Application.

Example

// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.TeXmlApplicationsApi;

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

        TeXmlApplicationsApi apiInstance = new TeXmlApplicationsApi(defaultClient);
        String id = "1293384261075731499"; // String | Identifies the resource.
        try {
            TexmlApplicationResponse result = apiInstance.getTexmlApplication(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TeXmlApplicationsApi#getTexmlApplication");
            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
id String Identifies the resource.

Return type

TexmlApplicationResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -
400 Bad request, the request was unacceptable, often due to missing a required parameter. -
401 Unauthorized -
403 Unauthenticated response. Happens when the current user cannot be authenticated. -
404 Resource not found -

updateTexmlApplication

TexmlApplicationResponse updateTexmlApplication(id, updateTexmlApplicationRequest)

Update a TeXML Application

Updates settings of an existing TeXML Application.

Example

// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.TeXmlApplicationsApi;

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

        TeXmlApplicationsApi apiInstance = new TeXmlApplicationsApi(defaultClient);
        String id = "1293384261075731499"; // String | Identifies the resource.
        UpdateTexmlApplicationRequest updateTexmlApplicationRequest = new UpdateTexmlApplicationRequest(); // UpdateTexmlApplicationRequest | Parameters that can be updated in a TeXML Application
        try {
            TexmlApplicationResponse result = apiInstance.updateTexmlApplication(id, updateTexmlApplicationRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TeXmlApplicationsApi#updateTexmlApplication");
            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
id String Identifies the resource.
updateTexmlApplicationRequest UpdateTexmlApplicationRequest Parameters that can be updated in a TeXML Application

Return type

TexmlApplicationResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -
400 Bad request, the request was unacceptable, often due to missing a required parameter. -
401 Unauthorized -
403 Unauthenticated response. Happens when the current user cannot be authenticated. -
404 Resource not found -
422 Unprocessable entity -