All URIs are relative to https://api.telnyx.com/v2
Method | HTTP request | Description |
---|---|---|
createCsvDownload | POST /phone_numbers/csv_downloads | Create a CSV download |
getCsvDownload | GET /phone_numbers/csv_downloads/{id} | Retrieve a CSV download |
listCsvDownloads | GET /phone_numbers/csv_downloads | List CSV downloads |
CSVDownloadResponse createCsvDownload()
Create a CSV download
// 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.CsvDownloadsApi;
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");
CsvDownloadsApi apiInstance = new CsvDownloadsApi(defaultClient);
try {
CSVDownloadResponse result = apiInstance.createCsvDownload();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CsvDownloadsApi#createCsvDownload");
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 with details about a CSV download. | - |
0 | Unexpected error | - |
CSVDownloadResponse getCsvDownload(id)
Retrieve a CSV download
// 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.CsvDownloadsApi;
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");
CsvDownloadsApi apiInstance = new CsvDownloadsApi(defaultClient);
String id = "id_example"; // String | Identifies the CSV download.
try {
CSVDownloadResponse result = apiInstance.getCsvDownload(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CsvDownloadsApi#getCsvDownload");
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 | String | Identifies the CSV download. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response with details about a CSV download. | - |
0 | Unexpected error | - |
ListCSVDownloadsResponse listCsvDownloads().pageNumber(pageNumber).pageSize(pageSize).execute();
List CSV downloads
// 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.CsvDownloadsApi;
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");
CsvDownloadsApi apiInstance = new CsvDownloadsApi(defaultClient);
Integer pageNumber = 1; // Integer | The page number to load
Integer pageSize = 20; // Integer | The size of the page
try {
ListCSVDownloadsResponse result = api.listCsvDownloads()
.pageNumber(pageNumber)
.pageSize(pageSize)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CsvDownloadsApi#listCsvDownloads");
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] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response with a list of CSV downloads. | - |
0 | Unexpected error | - |