PHP API rrd error

Croscen

New Member
Jan 31, 2015
1
0
1
Hello! I use https://github.com/CpuID/pve2-api-php-client client for proxmox and trying get RRD data:

PHP:
if ($px->constructor_success()) {
    if ($px->login()) {

        $px->set_debug(true);
        $params = array();
        $params['timeframe'] = "day";
        $params['ds'] = "cpu";
        $params['cf'] = "MAX";
        $png = $px->get("/nodes/node/qemu/100/rrd",$params);
        print_r($png);
    }
}

and debug error:

PHP:
 FULL RESPONSE:HTTP/1.1 400 Parameter verification failed.
Cache-Control: max-age=0Connection: closeDate: Sat, 31 Jan 2015 12:25:11 GMT
Pragma: no-cacheServer: pve-api-daemon/3.0Content-Length: 131Content-Type: application/json;charset=UTF-8
Expires: Sat, 31 Jan 2015 12:25:11 GMT{"errors":{"timeframe":"property is missing and it is not optional","ds":"property is missing and it is not optional"},"data":null}END 
FULL RESPONSE.Headers:HTTP/1.1 400 Parameter verification failed.Cache-Control: max-age=0Connection: closeDate: Sat, 31 Jan 2015 12:25:11 GMTPragma: no-cacheServer: pve-api-daemon/3.0Content-Length: 131Content-Type: application/json;charset=UTF-8Expires: Sat, 31 Jan 2015 12:25:11 GMTEnd Headers.Data:{"errors":{"timeframe":"property is missing and it is not optional","ds":"property is missing and it is not optional"},"data":null}End Headers.RESPONSE ARRAY:Array(    [errors] => Array        (            [timeframe] => property is missing and it is not optional            [ds] => property is missing and it is not optional        )    [data] => )END RESPONSE ARRAY.----------------------------------------------This API Request Failed.HTTP Response - 400HTTP Error - HTTP/1.1 400 Parameter verification failed.

In ssh: pvesh get /nodes/{node}/qemu/{vmid}/rrd - job and get array data.


What am I doing wrong?
 
Last edited: