Obtaining Usage Statistics in WHMCS ----------------------------------- Thi section describes how to obtain usage statistics via in WHMCS for billing or other purposes. .. note:: Delete statistics objects after collecting the required data. Listing Statistics Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~ You can list all available statistics objects with the ``ostor-usage`` service and no parameters. IThe output only contains objects that have not been deleted. WHMCS lists the available statistics objects from S3 cluster when you click **List statistics objects (on/off)**. Create a file ``S3_listStatsObjects.php`` with the following contents: :: .. image:: ../../../images/stor_saas_whmcs_integration10.png :align: center :class: align-center Querying Statistics Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can display usage statistics with the ``ostor-usage`` service and parameter ``obj`` specifying the statistics object. WHMCS displays the accessed buckets, user ID, and counters when you click the **Get** button. Create a file ``S3_getStatsForObject.php`` with the following contents: :: .. image:: ../../../images/stor_saas_whmcs_integration9.png :align: center :class: align-center Deleting Statistics Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can delete existing statistics objects with the ``ostor-usage`` service and parameter ``obj`` specifying the statistics object. WHMCS removes the statistics object from S3 cluster when you click the **Delete** button. Create a file ``S3_deleteStatsForObject.php`` with the following contents: ::