All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
getStatistics | GET /accounts/{accountId}/statistics | Get Account Statistics |
AccountStatistics getStatistics(accountId)
Get Account Statistics
Returns details about the current state of the account.
// Import classes:
import com.bandwidth.sdk.ApiClient;
import com.bandwidth.sdk.ApiException;
import com.bandwidth.sdk.Configuration;
import com.bandwidth.sdk.auth.*;
import com.bandwidth.sdk.models.*;
import com.bandwidth.sdk.api.StatisticsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure HTTP basic authorization: Basic
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
StatisticsApi apiInstance = new StatisticsApi(defaultClient);
String accountId = "9900000"; // String | Your Bandwidth Account ID.
try {
AccountStatistics result = apiInstance.getStatistics(accountId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StatisticsApi#getStatistics");
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 |
---|---|---|---|
accountId | String | Your Bandwidth Account ID. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
405 | Method Not Allowed | - |
415 | Unsupported Media Type | - |
429 | Too Many Requests | * Retry-After - When you should try your request again. |
500 | Internal Server Error | - |