Billing

Access billing information for accounts

Usage

from mbed_cloud import BillingAPI
api = BillingAPI()

api.get_billing_report()

Reference

class mbed_cloud.billing.BillingAPI(params=None)

API reference for the Billing API.

get_quota_history(**kwargs)

Get quota usage history

get_quota_remaining()

Get the remaining value

get_report_active_devices(month=None, file_path=None)

Downloads a report of the active devices

Parameters:
  • file_path (str) – [optional] location to store output file
  • month (str or datetime) – [default: utcnow] month as datetime instance, or string in YYYY-MM format
Returns:

The report structure

Return type:

dict

get_report_firmware_updates(month=None, file_path=None)

Downloads a report of the firmware updates

Parameters:
  • file_path (str) – [optional] location to store output file
  • month (str or datetime) – [default: utcnow] month as datetime instance, or string in YYYY-MM format
Returns:

The report structure

Return type:

dict

get_report_overview(month, file_path)

Downloads a report overview

Parameters:
  • month (str or datetime) – month as datetime instance, or string in YYYY-MM format
  • file_path (str) – location to store output file
Returns:

outcome

Return type:

True or None

get_service_packages()

Get all service packages