• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/integration/bizproc/automation/rest.php
  • Класс: BitrixTasksIntegrationBizprocAutomationRest
  • Вызов: Rest::getTriggerList
static function getTriggerList(array $params, $server)
{
	/** @var CRestServer $server */
	$clientId = $server ? $server->getClientId() : null;

	if (!$clientId)
	{
		throw new AccessException('Application context required');
	}

	$app = AppTable::getList(
		array(
			'filter' => array(
				'=CLIENT_ID' => $clientId
			),
			'select' => array('ID')
		)
	)->fetch();

	return [
		TriggerEntityAppTable::getList(array(
		'filter' => array(
			'=APP_ID' => $app['ID'],
		),
		'select' => array('NAME', 'CODE')
		))->fetchAll()
	];
}