fbpx
Search
Close this search box.
Search
Close this search box.

< / >

APIsR Real Time

4. Dedicated server monitoring

URL:

https://wv{{wolkvox_server}}.wolkvox.com/api/v2/real_time.php?api=info_server

Description:

This api only works on dedicated servers, it has the limit of the api’s own queries.

How it works:

  • The consumption of this API is done by GET method.
  • To consume this API you must replace in the url {{{wolkvox_server}} by the nomenclature of the server of the operation.
  • The wolkvox-token header must be used to make use of the authorization token.
  • Note that the same token cannot be consumed simultaneously, so you can schedule the next API to be consumed when the result of the previous one is successful.
  • In terms of time, to keep track of your operation you can make a consumption every 5 minutes of the information.
  • Permissions are required

REQUEST

 


Request

NAME DESCRIPTION TYPE
api Type of required report String

 


Response

NAME DESCRIPTION TYPE
code Indicates the HTTP response code. Int
error Indicates if there was any error during the request. String
msg It is a field that can provide a descriptive message about the outcome of the request. String
data It is the specific dataset obtained. Object
cpu_avg_10s It indicates the average (in percentage) CPU usage over the last 10 seconds. Int
cpu_max_10s It indicates the maximum (in percentage) CPU usage recorded in the last 10 seconds. Int
cpu_min_10s It indicates the minimum (in percentage) CPU usage recorded in the last 10 seconds. Int
ram It indicates the percentage of RAM memory usage. Int
calls It indicates the number of calls being managed on the server at the time the API was consumed. Int
connected_agents It indicates the number of agents currently connected in the system. Int

RESPONSE

 

Possible response codes
				
					$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/real_time.php?api=info_server',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'wolkvox-token: {{token}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

				
			

RESPONSE

				
					{
    "code": "",
    "error": ,
    "msg": "",
    "data": {
        "cpu_avg_10s": "",
        "cpu_max_10s": "",
        "cpu_min_10s": "",
        "ram": "",
        "calls": "",
        "connected_agents": ""
    }
}
				
			
We use cookies, if you continue browsing we will assume that you agree. You can read more about the use of cookies in our privacy policies and treatment of personal data