getSystemVersion

Beschreibung

Mit dieser Methode kann sowohl die Buildversion des Backends abgefragt werden, als auch die API-Version. Höhere Buildversionen sind innerhalb derselben API-Version immer Abwärtskompatibel.

Kommunikation zwischen

Consuming-Party Backend > Backend

Request-URL

/api/sociallyve/system/version

Methoden-Typ

GET

allyve Backendaktivität

Identifizierung der API-Version

Response

JSON
Das Ergebnis ist ein JSON-Objekt in der üblichen Syntax für API-Results. Das Datenobjekt besteht aus einer Liste von Key/Value-Paaren, folgende sind aktuell möglich:
API_VERSION (aktuell 1)
BUILD_VERSION (vierstellig, z.B.: 1.6.4.3)

Ein exemplarisches JSON-Response-Objekt:

{"timestamp":"1310644183","data":{"resultList":[
{"property":"API_VERSION","value":"1"},
{"property":"BUILD_VERSION","value":"1.6.4.3"}
]}}

Code-Beispiel: PHP

//Your application's credentials for using the API
$myAppKey = '12345678910111213';
$myAppSecret = 'IWillNeverTellThisToAnyone';
 
//Set the correct API URL to use
$apiUrl = 'https://api.allyve.com/api/sociallyve/system/version';
 
//let's call the API with the help of CURL
$curl = curl_init($apiUrl);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
//If you do not have alredy set up a CA cert bundle in PEM format uncomment the next line, BUT YOU SHOULD NOT DO THAT IN PRODUCTION
//curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
 
//If you have a CA cert bundle set the path to it (http://curl.haxx.se/docs/caextract.html)
$pathToMyCertBundle = getcwd().'/cacert.pem';
curl_setopt($curl, CURLOPT_CAINFO, $pathToMyCertBundle);
 
curl_setopt($curl, CURLOPT_POSTFIELDS, $queryStringSigned);
 
$result = curl_exec($curl);
//$result might look like this: {"timestamp":"1321979801","data":{"resultList":[{"property":"API_VERSION","value":"1"},{"property":"BUILD_VERSION","value":"0.8.5.6"}]}}
 
curl_close($curl);

Weiterführende Informationen

Zuletzt aktualisiert am 5. März 2012 von admin - Anmelden

Kommentare

Schreibe einen Kommentar