All URIs are relative to https://api.telnyx.com/v2
Method | HTTP request | Description |
---|---|---|
listRegions | GET /regions | List all Regions |
ListRegions200Response listRegions()
List all Regions
List all regions and the interfaces that region supports
// 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.RegionsApi;
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");
RegionsApi apiInstance = new RegionsApi(defaultClient);
try {
ListRegions200Response result = apiInstance.listRegions();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RegionsApi#listRegions");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
0 | Unexpected error | - |