<?php /** * @api {get} getCatalogsList.php getCatalogsList * @apiDescription Provides the private list of Catalogs owned by a user. When called without * userID, this web-service returns the list of shared Catalogs. * * @apiName getCatalogsList * @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} CatalogsList URL of the XML file, which contains the list of Catalogs. * * @apiSuccessExample Success-Response: * HTTP/1.1 200 OK * [success] => 1 * [CatalogsList] => http://amda.irap.omp.eu/data/WSRESULT/catalogs_impex_20180905.xml * * @apiErrorExample Error-Response: * {"error": "Workspace Error : Cannot load Catalogs list for userID"} */ require_once '../config.php'; $amda_ws = new WebServer(); $result = $amda_ws->getCatalogsList($_GET); if ($result['success']) { echo $result['CatalogsList']; } else { echo $result['message']; } ?>