All URIs are relative to https://api.telnyx.com/v2
Method | HTTP request | Description |
---|---|---|
createDefaultGateway | POST /networks/{id}/default_gateway | Create Default Gateway. |
createNetwork | POST /networks | Create a Network |
deleteDefaultGateway | DELETE /networks/{id}/default_gateway | Delete Default Gateway. |
deleteNetwork | DELETE /networks/{id} | Delete a Network |
getDefaultGateway | GET /networks/{id}/default_gateway | Get Default Gateway status. |
getNetwork | GET /networks/{id} | Retrieve a Network |
listNetworkInterfaces | GET /networks/{id}/network_interfaces | List all Interfaces for a Network. |
listNetworks | GET /networks | List all Networks |
updateNetwork | PATCH /networks/{id} | Update a Network |
GetDefaultGateway200Response createDefaultGateway(id, defaultGateway)
Create Default Gateway.
Create Default Gateway.
import java.util.UUID;
// 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.NetworksApi;
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");
NetworksApi apiInstance = new NetworksApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
DefaultGateway defaultGateway = new DefaultGateway(); // DefaultGateway |
try {
GetDefaultGateway200Response result = apiInstance.createDefaultGateway(id, defaultGateway);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling NetworksApi#createDefaultGateway");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. | |
defaultGateway | DefaultGateway |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
CreateNetwork200Response createNetwork(networkCreate)
Create a Network
Create a new Network.
// 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.NetworksApi;
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");
NetworksApi apiInstance = new NetworksApi(defaultClient);
NetworkCreate networkCreate = new NetworkCreate(); // NetworkCreate |
try {
CreateNetwork200Response result = apiInstance.createNetwork(networkCreate);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling NetworksApi#createNetwork");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
networkCreate | NetworkCreate |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
422 | Unprocessable entity. Check the 'detail' field in response for details. | - |
0 | Unexpected error | - |
GetDefaultGateway200Response deleteDefaultGateway(id)
Delete Default Gateway.
Delete Default Gateway.
import java.util.UUID;
// 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.NetworksApi;
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");
NetworksApi apiInstance = new NetworksApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
GetDefaultGateway200Response result = apiInstance.deleteDefaultGateway(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling NetworksApi#deleteDefaultGateway");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
CreateNetwork200Response deleteNetwork(id)
Delete a Network
Delete a Network.
import java.util.UUID;
// 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.NetworksApi;
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");
NetworksApi apiInstance = new NetworksApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
CreateNetwork200Response result = apiInstance.deleteNetwork(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling NetworksApi#deleteNetwork");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
GetDefaultGateway200Response getDefaultGateway(id)
Get Default Gateway status.
Get Default Gateway status.
import java.util.UUID;
// 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.NetworksApi;
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");
NetworksApi apiInstance = new NetworksApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
GetDefaultGateway200Response result = apiInstance.getDefaultGateway(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling NetworksApi#getDefaultGateway");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
CreateNetwork200Response getNetwork(id)
Retrieve a Network
Retrieve a Network.
import java.util.UUID;
// 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.NetworksApi;
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");
NetworksApi apiInstance = new NetworksApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
try {
CreateNetwork200Response result = apiInstance.getNetwork(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling NetworksApi#getNetwork");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
ListNetworkInterfaces200Response listNetworkInterfaces(id, pageNumber, pageSize, filterName, filterType, filterStatus)
List all Interfaces for a Network.
List all Interfaces for a Network.
import java.util.UUID;
// 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.NetworksApi;
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");
NetworksApi apiInstance = new NetworksApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
Integer pageNumber = 1; // Integer | The page number to load
Integer pageSize = 20; // Integer | The size of the page
String filterName = "test interface"; // String | The interface name to filter on.
String filterType = "wireguard_interface"; // String | The interface type to filter on.
InterfaceStatus filterStatus = InterfaceStatus.fromValue("created"); // InterfaceStatus | The interface status to filter on.
try {
ListNetworkInterfaces200Response result = apiInstance.listNetworkInterfaces(id, pageNumber, pageSize, filterName, filterType, filterStatus);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling NetworksApi#listNetworkInterfaces");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. | |
pageNumber | Integer | The page number to load | [optional] [default to 1] |
pageSize | Integer | The size of the page | [optional] [default to 20] |
filterName | String | The interface name to filter on. | [optional] |
filterType | String | The interface type to filter on. | [optional] |
filterStatus | InterfaceStatus | The interface status to filter on. | [optional] [enum: created, provisioning, provisioned, deleting] |
ListNetworkInterfaces200Response
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
ListNetworks200Response listNetworks(pageNumber, pageSize, filterName)
List all Networks
List all Networks.
// 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.NetworksApi;
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");
NetworksApi apiInstance = new NetworksApi(defaultClient);
Integer pageNumber = 1; // Integer | The page number to load
Integer pageSize = 20; // Integer | The size of the page
String filterName = "test network"; // String | The network name to filter on.
try {
ListNetworks200Response result = apiInstance.listNetworks(pageNumber, pageSize, filterName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling NetworksApi#listNetworks");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
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] |
filterName | String | The network name to filter on. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |
CreateNetwork200Response updateNetwork(id, networkCreate)
Update a Network
Update a Network.
import java.util.UUID;
// 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.NetworksApi;
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");
NetworksApi apiInstance = new NetworksApi(defaultClient);
UUID id = UUID.fromString("6a09cdc3-8948-47f0-aa62-74ac943d6c58"); // UUID | Identifies the resource.
NetworkCreate networkCreate = new NetworkCreate(); // NetworkCreate |
try {
CreateNetwork200Response result = apiInstance.updateNetwork(id, networkCreate);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling NetworksApi#updateNetwork");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Identifies the resource. | |
networkCreate | NetworkCreate |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |