getParameterList.php 1.16 KB
<?php

/**
 * @api {get} getParameterList.php getParameterList
 * @apiDescription Provides the hierarchy of parameters belonging to a user in AMDA.
 * @apiName getParameterList
 * @apiGroup webservices
 *
 * @apiParam {String} userID Identifier of the user in AMDA.
 * @apiParam {String} password password of the user in AMDA.
 *
 * @apiSuccess {String} success `true`
 * @apiSuccess {String} url_XYZ URL of the file containing the points.
 *
 * @apiError {String} success `false`
 * @apiError {String} faultcode The error code.
 * @apiError {String} faultstring The error message.

 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     http://amda.irap.omp.eu/AMDA/data/WSRESULT/obsdatatree_impex_20180727_AmdaLocalDataBaseParameters.xml
 *
 * @apiErrorExample
 *     HTTP/1.1 4xx OK
 *     {"success":false,"faultcode":"server00","faultstring":"Server error"}
 */

  require_once '../config.php';

  $amda_ws = new WebServer();
  $result = $amda_ws->getParameterList($_GET);

    if ($result['ParameterList']){
      foreach($result['ParameterList'] as $key => $value) {
	echo "<$key>$value</$key><br/>";
      }
    }
    else {
     echo $result['message'];  
    }
?>