getKeywordLimits

Returns the consumption limits of the monitoring keywords. (Contains relevant data for other functions.)

Route /monitor/getKeywordLimits[/:key[/:format]]
required parameter
optional parameter format
return values total
used
cross references
hints

Parameter

labeling description values margin default values
 format Defines the format of the result. json|xml json

Return Values

labeling description values margin
total Contains the maximum amount of Monitoring credits. (0-9)+
used Contains the amount of used Monitoring credits. (0-9)+

Messages

message description
no permission The API-Key has no access to this function.
internal error An internal error occured.
param missing A required parameter is missing.
param invalid The value of a parameter is not valid.
result empty The request was successful, but the result itself is empty.
cost error The current credit amount is not sufficient to handle the request.
0k. The processing was successful.

Exemplary Code

$root = 'https://suite.xovi.net/api/';

$arrayParams = array(
       'service' =>'keywords',
       'method' =>'getMonitoringKeywordLimits',
       'key' =>'myPersonalKey',
       'format' =>'json',
 );

$GETparams = http_build_query($arrayParams);
$requestURL = $root.$GETparams;
if (!function_exists('curl_init')) die('cURL not available');
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_URL, $requestURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Download the given URL, and return output
$output = curl_exec($ch);
// Close the cURL resource, and free system resources
curl_close($ch);
echo $output;
?>

Exemplary Results

JSON

{
    "apiErrorCode":0,
    "apiErrorMessage":"0k.",
    "apiResult":[
        {
            "total":5000,
            "used":264,
        }]
}

XML

<?xml version="1.0"?>
<result>
    <apiErrorCode>0</apiErrorCode>
    <apiErrorMessage>0k.</apiErrorMessage>
    <apiResult>
        <limits>
            <limit>
                <total>5000</total>
                <used>264</used>
            </limit> 
         </limits> 
     </apiResult> 
  </result>