I’ve checked the commit and review (https://reviews.apache.org/r/22354/). It 
looks like there should be additional parameters returned in the response for 
request with type=2

API Request: 
command=listUsageRecords&response=json&startdate=2014-11-03&enddate=2014-11-03&type=2

API Response:
class stdClass#1 (1) {
  public $listusagerecordsresponse =>
  class stdClass#2 (2) {
    public $count =>
    int(6)
    public $usagerecord =>
    array(6) {
      [0] =>
      class stdClass#3 (16) {
        public $account =>
        string(6) "ISH001"
        public $accountid =>
        string(36) "e2104bd7-dc87-4528-9d69-7141c79d7879"
        public $domainid =>
        string(36) "8255b58c-39d1-4221-837f-3a6a8ed84a3f"
        public $zoneid =>
        string(36) "75cb86ef-d0e0-4459-b781-0a31002f2786"
        public $description =>
        string(55) "wolkvm01 allocated (ServiceOffering: 1) (Template: 201)"
        public $usage =>
        string(12) "0.166666 Hrs"
        public $usagetype =>
        int(2)
        public $rawusage =>
        string(8) "0.166666"
        public $virtualmachineid =>
        string(36) "5a2c057a-6aff-44ae-8b65-ff524c8c2007"
        public $name =>
        string(8) "wolkvm01"
        public $offeringid =>
        string(36) "39f423ca-9c83-4061-9ad6-4f5b48fa312c"
        public $templateid =>
        string(36) "92b60dfd-11a3-4b47-8a93-1a65cef9619f"
        public $usageid =>
        string(36) "5a2c057a-6aff-44ae-8b65-ff524c8c2007"
        public $type =>
        string(3) "KVM"
        public $startdate =>
        string(27) "2014-11-03'T'15:05:00+01:00"
        public $enddate =>
        string(27) "2014-11-03'T'15:15:00+01:00"
      }
      [1] =>
      class stdClass#4 (16) {
        public $account =>
        string(6) "ISH001"
        public $accountid =>
        string(36) "e2104bd7-dc87-4528-9d69-7141c79d7879"
        public $domainid =>
        string(36) "8255b58c-39d1-4221-837f-3a6a8ed84a3f"
        public $zoneid =>
        string(36) "75cb86ef-d0e0-4459-b781-0a31002f2786"
        public $description =>
        string(55) "wolkvm01 allocated (ServiceOffering: 1) (Template: 201)"
        public $usage =>
        string(12) "0.166667 Hrs"
        public $usagetype =>
        int(2)
        public $rawusage =>
        string(8) "0.166667"
        public $virtualmachineid =>
        string(36) "5a2c057a-6aff-44ae-8b65-ff524c8c2007"
        public $name =>
        string(8) "wolkvm01"
        public $offeringid =>
        string(36) "39f423ca-9c83-4061-9ad6-4f5b48fa312c"
        public $templateid =>
        string(36) "92b60dfd-11a3-4b47-8a93-1a65cef9619f"
        public $usageid =>
        string(36) "5a2c057a-6aff-44ae-8b65-ff524c8c2007"
        public $type =>
        string(3) "KVM"
        public $startdate =>
        string(27) "2014-11-03'T'14:55:00+01:00"
        public $enddate =>
        string(27) "2014-11-03'T'15:05:00+01:00"
      }
…
}}}


MySQL, cloud_usage:

mysql> select * from cloud_usage where usage_type = 2;
+--------+---------+------------+-----------+---------------------------------------------------------+---------------+------------+---------------------+----------------+----------+-------------+-------------+----------+------+------+------------+---------------------+---------------------+--------------+-----------+-----------+--------+
| id     | zone_id | account_id | domain_id | description                       
                      | usage_display | usage_type | raw_usage           | 
vm_instance_id | vm_name  | offering_id | template_id | usage_id | type | size 
| network_id | start_date          | end_date            | virtual_size | 
cpu_speed | cpu_cores | memory |
+--------+---------+------------+-----------+---------------------------------------------------------+---------------+------------+---------------------+----------------+----------+-------------+-------------+----------+------+------+------------+---------------------+---------------------+--------------+-----------+-----------+--------+
| 152915 |       1 |         23 |        11 | wolkvm01 allocated 
(ServiceOffering: 1) (Template: 201) | 0.166667 Hrs  |          2 |  
0.1666669398546219 |             31 | wolkvm01 |           1 |         201 |    
   31 | KVM  | NULL |       NULL | 2014-11-03 13:15:00 | 2014-11-03 13:25:00 |  
       NULL |      NULL |      NULL |   NULL |
| 152943 |       1 |         23 |        11 | wolkvm01 allocated 
(ServiceOffering: 1) (Template: 201) | 0.166663 Hrs  |          2 | 
0.16666333377361298 |             31 | wolkvm01 |           1 |         201 |   
    31 | KVM  | NULL |       NULL | 2014-11-03 13:25:00 | 2014-11-03 13:35:00 | 
        NULL |      NULL |      NULL |   NULL |
| 152971 |       1 |         23 |        11 | wolkvm01 allocated 
(ServiceOffering: 1) (Template: 201) | 0.166667 Hrs  |          2 |  
0.1666666716337204 |             31 | wolkvm01 |           1 |         201 |    
   31 | KVM  | NULL |       NULL | 2014-11-03 13:35:00 | 2014-11-03 13:45:00 |  
       NULL |      NULL |      NULL |   NULL |
| 152999 |       1 |         23 |        11 | wolkvm01 allocated 
(ServiceOffering: 1) (Template: 201) | 0.166667 Hrs  |          2 |  
0.1666666716337204 |             31 | wolkvm01 |           1 |         201 |    
   31 | KVM  | NULL |       NULL | 2014-11-03 13:45:00 | 2014-11-03 13:55:00 |  
       NULL |      NULL |      NULL |   NULL |
| 153027 |       1 |         23 |        11 | wolkvm01 allocated 
(ServiceOffering: 1) (Template: 201) | 0.166667 Hrs  |          2 |  
0.1666669398546219 |             31 | wolkvm01 |           1 |         201 |    
   31 | KVM  | NULL |       NULL | 2014-11-03 13:55:00 | 2014-11-03 14:05:00 |  
       NULL |      NULL |      NULL |   NULL |
| 153055 |       1 |         23 |        11 | wolkvm01 allocated 
(ServiceOffering: 1) (Template: 201) | 0.166666 Hrs  |          2 | 
0.16666610538959503 |             31 | wolkvm01 |           1 |         201 |   
    31 | KVM  | NULL |       NULL | 2014-11-03 14:05:00 | 2014-11-03 14:15:00 | 
        NULL |      NULL |      NULL |   NULL |
| 153086 |       1 |         23 |        11 | wolkvm01 allocated 
(ServiceOffering: 1) (Template: 201) | 0.166667 Hrs  |          2 |  
0.1666666716337204 |             31 | wolkvm01 |           1 |         201 |    
   31 | KVM  | NULL |       NULL | 2014-11-03 14:15:00 | 2014-11-03 14:25:00 |  
       NULL |      NULL |      NULL |   NULL |
+--------+---------+------------+-----------+---------------------------------------------------------+---------------+------------+---------------------+----------------+----------+-------------+-------------+----------+------+------+------------+---------------------+---------------------+--------------+-----------+-----------+--------+




Kind regards,

Ilia Shakitko
Innovation Engineer
LeaseWeb Technologies B.V.

T: +31 20 316 0235

E: i.shaki...@tech.leaseweb.com
W: www.leaseweb.com<http://www.leaseweb.com>

Luttenbergweg 8,        1101 EC Amsterdam,      Netherlands



Reply via email to