getProjects
Returns all created projects.
| Route | /project/getProjects[/:key[/:domain[/:format[/:limit[/:skip]]]]] | 
|---|---|
| Necessary parameter | – | 
| Optional parameter | domain format limit (max:1000) skip | 
| Return values | hash name | 
| 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 | 
|---|---|---|---|
| domain | Defines the projects domain. | (www.)?(A-Z|a-z|0-9)+. (a-z)+ | – | 
| limit | Defines the amount of the returned results. (max:1000) | 0-1000 | 10 | 
| skip | Defines the starting page of the result. One page equals the the value of limit. | (0-9)+ | 0 | 
| format | Defines in which format the result will be returned. | json|xml | json | 
Return values
| Labeling | Description | Values margin | 
|---|---|---|
| hash | Contains a unique identifier. | (a-f0-9){32} | 
| name | Contains a designator for an already created project. | (A-Z|a-z|0-9)+ | 
| domain | Contains the main domain of the project. | see example | 
| competitors | Contains all competitors associated with the domain. | see example | 
Messages
| Message | Description | 
|---|---|
| maximum limit exeeded | The maximum limit is reached. | 
| 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' =>'project',
 'method' =>'getProjects',
 'key' =>'myPersonalKey',
 'domain' => 'NULL',
 'format' =>'json',
 );
$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":[
        {
            "hash":661dfc3980899852736864b4e43cd374,
            "name":"apiprojects",
            "domain":{
                "hash":"fa84390d885661e2",
                "domain":"www.xovi.de"
            },
            "competitors":{
                "competitor0":{
                    "hash":"fa940b03894669a9",
                    "domain":"mitbewerber1.de"
                },
                "competitor1":{
                   "hash":"fa940b03894665ab",
                   "domain":"mitbewerber2.com"
                }
           }
        }]
}
 
XML
<?xml version="1.0"?>
<result>
    <apiErrorCode>0</apiErrorCode>
    <apiErrorMessage>0k.</apiErrorMessage>
    <apiResult>
        <projects>
            <project>
                <hash>661dfc3980899852736864b4e43cd374</hash>
                <name>apiprojects</name>
                <domain>
                    <hash>fa843907565661e2</hash>
                    <domain>www.xovi.de</domain>
                </domain>
                <competitors>
                    <competitor0>
                        <hash>23lkjw5rljk</hash>
                        <domain>competitor1.de</domain>
                    </competitor0>
                    <competitor1>
                        <hash>23lkjw5rljk</hash>
                        <domain>competitor2.de</domain>
                    </competitor1>
               </competitors> 
            </project> 
         </projects> 
     </apiResult> 
  </result>



