getParameter.php
618 Bytes
<?php
/**
* @file getParameter.php
* @brief REST interface for service getParameter
*
*
* @version $Id: $
*/
require_once '../config.php';
$amda_ws = new WebServer();
if (!$_GET["token"]) {
return array('success' => false, 'message' => "E01\nAuthentication is required for this webservice.");
}
if ($amda_ws->getNewToken()['token'] != $_GET["token"]) {
return array('success' => false, 'message' => "E02\nToken expired. Please authenticate again.");
}
$result = $amda_ws->getParameter($_GET);
if ($result['success']) {
echo $result['dataFileURLs'];
} else {
echo $result['message'];
}
?>