vserver_graph_data ()
This function returns requested data for VPS graph. The data is returned as XML escaped to output format.
HTTP Method: | GET | |
---|---|---|
Parameters: | sid | session id* |
vserver_id | unique id of VPS* | |
graph_type | graph type (virt_cpu_total, if_octets, if_packets, disk_octets, disk_ops)* | |
begin | start timestamp in format for rrdtool see further | |
end | end timestamp in format for rrdtool see further | |
step | time step see further | |
maxrows | maximum row number see further | |
Returns: | HTTP code | 200 (OK) |
Function call successful. Reply portion reply contains encoded image data. |
Return errors
Error code | HTTP response code | Description |
---|---|---|
1 | 400 (Bad request) | Function was not performed, because all required parameters were not entered. Reply portion reply is empty. |
3 | 403 (Forbidden) | Function call failed, invalid sid parameter. Create new sid using /api/login function. Reply portion reply is empty. |
4 | 400 (Bad request) | Function call failed, some parameter(s) have invalid value (e.g. contains invalid characters. Reply portion reply specifies invalid parameters. |
5 | 403 (Forbidden) | Function has not been performed, because it is probably an attempt to manipulate VPS that is not in your administration. Reply portion reply is empty. |
CURL
curl "https://admin.hosting90.eu/api/vserver_graph_data?sid=%sid%"
PHP Library
$api->vserver_graph_data(array());