. */ use SP\Api\ApiRequest; use SP\Log\Log; define('APP_ROOT', '.'); require APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; header('Content-type: application/json'); try { $ApiRequest = new ApiRequest(); exit($ApiRequest->runApi()); } catch (Exception $e) { Log::writeNewLog('API', $e->getMessage(), Log::ERROR); exit($ApiRequest->formatJsonError($e)); }