Skip to content

Latest commit

 

History

History
96 lines (67 loc) · 2.8 KB

StatisticsApi.md

File metadata and controls

96 lines (67 loc) · 2.8 KB

bandwidth.StatisticsApi

All URIs are relative to http://localhost

Method HTTP request Description
get_statistics GET /accounts/{accountId}/statistics Get Account Statistics

get_statistics

AccountStatistics get_statistics(account_id)

Get Account Statistics

Returns details about the current state of the account.

Example

  • Basic Authentication (Basic):
import bandwidth
from bandwidth.models.account_statistics import AccountStatistics
from bandwidth.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = bandwidth.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = bandwidth.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with bandwidth.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = bandwidth.StatisticsApi(api_client)
    account_id = '9900000' # str | Your Bandwidth Account ID.

    try:
        # Get Account Statistics
        api_response = api_instance.get_statistics(account_id)
        print("The response of StatisticsApi->get_statistics:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling StatisticsApi->get_statistics: %s\n" % e)

Parameters

Name Type Description Notes
account_id str Your Bandwidth Account ID.

Return type

AccountStatistics

Authorization

Basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]