Skip to content

Latest commit

 

History

History
402 lines (298 loc) · 16 KB

FqdnConnectionsApi.md

File metadata and controls

402 lines (298 loc) · 16 KB

FqdnConnectionsApi

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

Method HTTP request Description
createFqdnConnection POST /fqdn_connections Create an FQDN connection
deleteFqdnConnection DELETE /fqdn_connections/{id} Delete an FQDN connection
listFqdnConnections GET /fqdn_connections List FQDN connections
retrieveFqdnConnection GET /fqdn_connections/{id} Retrieve an FQDN connection
updateFqdnConnection PATCH /fqdn_connections/{id} Update an FQDN connection

createFqdnConnection

FQDNConnectionResponse createFqdnConnection(createFqdnConnectionRequest)

Create an FQDN connection

Creates a FQDN connection.

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.FqdnConnectionsApi;

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

        FqdnConnectionsApi apiInstance = new FqdnConnectionsApi(defaultClient);
        CreateFqdnConnectionRequest createFqdnConnectionRequest = new CreateFqdnConnectionRequest(); // CreateFqdnConnectionRequest | Parameters that can be defined during FQDN connection creation
        try {
            FQDNConnectionResponse result = apiInstance.createFqdnConnection(createFqdnConnectionRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FqdnConnectionsApi#createFqdnConnection");
            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
createFqdnConnectionRequest CreateFqdnConnectionRequest Parameters that can be defined during FQDN connection creation

Return type

FQDNConnectionResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

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

deleteFqdnConnection

FQDNConnectionResponse deleteFqdnConnection(id)

Delete an FQDN connection

Deletes an FQDN connection.

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.FqdnConnectionsApi;

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

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

FQDNConnectionResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response with details about an FQDN connection. -
401 Unauthorized -
403 Unauthenticated response. Happens when the current user cannot be authenticated. -
404 Resource not found -
422 Unprocessable entity -

listFqdnConnections

ListFQDNConnectionsResponse listFqdnConnections().pageNumber(pageNumber).pageSize(pageSize).filterConnectionNameContains(filterConnectionNameContains).filterFqdn(filterFqdn).filterOutboundOutboundVoiceProfileId(filterOutboundOutboundVoiceProfileId).sort(sort).execute();

List FQDN connections

Returns a list of your FQDN connections.

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.FqdnConnectionsApi;

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

        FqdnConnectionsApi apiInstance = new FqdnConnectionsApi(defaultClient);
        Integer pageNumber = 1; // Integer | The page number to load
        Integer pageSize = 20; // Integer | The size of the page
        String filterConnectionNameContains = "My Connection"; // String | If present, connections with <code>connection_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters.
        String filterFqdn = "filterFqdn_example"; // String | If present, connections with an `fqdn` that equals the given value will be returned. Matching is case-sensitive, and the full string must match.
        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 {
            ListFQDNConnectionsResponse result = api.listFqdnConnections()
                .pageNumber(pageNumber)
                .pageSize(pageSize)
                .filterConnectionNameContains(filterConnectionNameContains)
                .filterFqdn(filterFqdn)
                .filterOutboundOutboundVoiceProfileId(filterOutboundOutboundVoiceProfileId)
                .sort(sort)
                .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FqdnConnectionsApi#listFqdnConnections");
            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]
filterConnectionNameContains String If present, connections with <code>connection_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. [optional]
filterFqdn String If present, connections with an `fqdn` that equals the given value will be returned. Matching is case-sensitive, and the full string must match. [optional]
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

ListFQDNConnectionsResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response with a list of FQDN connections. -
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 -

retrieveFqdnConnection

FQDNConnectionResponse retrieveFqdnConnection(id)

Retrieve an FQDN connection

Retrieves the details of an existing FQDN connection.

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.FqdnConnectionsApi;

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

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

FQDNConnectionResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response with details about an FQDN connection. -
401 Unauthorized -
403 Unauthenticated response. Happens when the current user cannot be authenticated. -
404 Resource not found -
422 Unprocessable entity -

updateFqdnConnection

FQDNConnectionResponse updateFqdnConnection(id, updateFqdnConnectionRequest)

Update an FQDN connection

Updates settings of an existing FQDN connection.

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.FqdnConnectionsApi;

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

        FqdnConnectionsApi apiInstance = new FqdnConnectionsApi(defaultClient);
        String id = "1293384261075731499"; // String | Identifies the resource.
        UpdateFqdnConnectionRequest updateFqdnConnectionRequest = new UpdateFqdnConnectionRequest(); // UpdateFqdnConnectionRequest | Parameters that can be updated in a FQDN connection
        try {
            FQDNConnectionResponse result = apiInstance.updateFqdnConnection(id, updateFqdnConnectionRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FqdnConnectionsApi#updateFqdnConnection");
            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.
updateFqdnConnectionRequest UpdateFqdnConnectionRequest Parameters that can be updated in a FQDN connection

Return type

FQDNConnectionResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response with details about an FQDN connection. -
401 Unauthorized -
403 Unauthenticated response. Happens when the current user cannot be authenticated. -
404 Resource not found -
422 Unprocessable entity -