All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
GetStatistics | GET /accounts/{accountId}/statistics | Get Account Statistics |
AccountStatistics GetStatistics (string accountId)
Get Account Statistics
Returns details about the current state of the account.
using System.Collections.Generic;
using System.Diagnostics;
using Bandwidth.Standard.Api;
using Bandwidth.Standard.Client;
using Bandwidth.Standard.Model;
namespace Example
{
public class GetStatisticsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new StatisticsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
try
{
// Get Account Statistics
AccountStatistics result = apiInstance.GetStatistics(accountId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling StatisticsApi.GetStatistics: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get Account Statistics
ApiResponse<AccountStatistics> response = apiInstance.GetStatisticsWithHttpInfo(accountId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling StatisticsApi.GetStatisticsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]