getDownloads
Returns an overview of all downloadable already existent reports.
Route | /report/getDownloads[/:key[/:format[/:limit[/:skip]]]] |
---|---|
Necessary parameter | – |
Optional parameter | format limit (max:1000) skip |
Return values | id domain sengine reportDate |
Cross references | – |
Hints | Limit: The maximum limit is 1000. To get more results, please use the parameter skip. |
Parameter
Labeling | Description | Values margin | Default value |
---|---|---|---|
format | Defines in which format the result will be returned. | json|xml | json |
limit | Defines the amount of the returned results. | (0-9)+ | 10 |
skip | Defines the starting page of the result. One page equals the the value of limit. | (0-9)+ | 0 |
Return values
Labeling | Description | Values margin |
---|---|---|
id | Contains a unique identifier for a compiled and downloadable report. | (0-9)+ |
domain | Contains a qualified domain name. | (www.)?(A-Z|a-z|0-9)+. (a-z)+ |
sengine | Contains a search engine which is crawled by XOVI. | (www.)?(A-Z|a-z|0-9)+. (a-z)+ |
reportDate | Contains the date the report got created. | Date: YYYY-MM-DD |
Messages
Message | Description |
---|---|
no permission | The 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' => 'report', 'method' => 'getDownloads', 'key' => 'myPersonalKey', 'limit' => '20', 'skip' => '2', 'format' =>'xml', ); $GETparams = implode('/', $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":[
{
"id":"22560",
"domain":"xovi.de",
"sengine":"google.ch",
"reportDate":"2012-10-07",
}]
}
XML
<?xml version="1.0"?> <result> <apiErrorCode>0</apiErrorCode> <apiErrorMessage>0k.</apiErrorMessage> <apiResult> <downloads> <download> <id>22560</id> <domain>xovi.de</domain> <sengine>google.ch</sengine> <reportDate>2012-10-07</reportDate> </download> </downloads> </apiResult> </result>