• Модуль: pull
  • Путь к файлу: ~/bitrix/modules/pull/lib/rest.php
  • Класс: BitrixPullRest
  • Вызов: Rest::applicationConfigGet
static function applicationConfigGet($params, $n, CRestServer $server)
{
	$params = array_change_key_case($params, CASE_UPPER);

	$clientId = $server->getClientId();
	if (!$clientId)
	{
		throw new BitrixRestRestException("Get access to application config available only for application authorization.", "WRONG_AUTH_TYPE", CRestServer::STATUS_FORBIDDEN);
	}

	$configParams = Array();
	$configParams['CACHE'] = $params['CACHE'] !== 'N';
	$configParams['REOPEN'] = $params['REOPEN'] !== 'N';
	$configParams['CUSTOM_TYPE'] = $clientId;
	$configParams['JSON'] = true;

	$config = BitrixPullConfig::get($configParams);
	if (!$config)
	{
		throw new BitrixRestRestException("Push & Pull server is not configured", "SERVER_ERROR", CRestServer::STATUS_INTERNAL);
	}

	return $config;
}