Skip to content
Thomas Hufschmidt edited this page Oct 24, 2017 · 30 revisions

Installation

The following text contains a short installation guide and a few tips.

Linux

  • Go to your ILIAS installation directory:
    cd ${ILIAS_DIR}
  • Create the plugin directory-structure as required by ILIAS:
    mkdir -p Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST
  • Change into the newly created directory tree:
    cd Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST
  • Download and extract the latest Releases into this directory.
    wget https://github.com/hrz-unimr/Ilias.RESTPlugin/archive/${RELEASE_VERSION}.zip
    unzip ${RELEASE_VERSION}.zip
    rm ${RELEASE_VERSION}.zip
  • [Optional] Delete the tools directory on production servers:
    rm -rf tools/
  • Make sure this directory is readable by the webserver (eg. owned by www-data):
    chown -R www-data:www-data .
  • [Optional] Create a writeable log-file for the RESTPlugin:
    touch ${ILIAS_LOG_DIR}/restplugin-${ILIAS_CLIENT}.log
    chmod 644 ${ILIAS_LOG_DIR}/restplugin-${ILIAS_CLIENT}.log
    chown www-data:www-data ${ILIAS_LOG_DIR}/restplugin-${ILIAS_CLIENT}.log
  • Update the database and activate the plugin by logging into ILIAS and navigating to:
    • Administration > Plugins > REST (Actions) > Update
    • Administration > Plugins > REST (Actions) > Activate

Reset / Uninstall Plugin

In case of a major code revision it may become necessary to reinstall the plugin. It should not happen very often and we will indicate it in the release notes if it is necessary.

1. SQL: Delete Tables (<1.4.0)

DROP TABLE IF EXISTS ui_uihk_rest_client, ui_uihk_rest_user, ui_uihk_rest_perm, ui_uihk_rest_config, ui_uihk_rest_authcode, ui_uihk_rest_refresh, ui_uihk_rest_challenge, ui_uihk_rest_keys, ui_uihk_rest_oauth2, ui_uihk_rest_key2user, ui_uihk_rest_key2ip;

1. SQL: Delete Tables (>=1.4.0)

DROP TABLE IF EXISTS ui_uihk_rest_access, ui_uihk_rest_authcode, ui_uihk_rest_client, ui_uihk_rest_config, ui_uihk_rest_perm, ui_uihk_rest_refresh;

2. Reset ILIAS Plugin Information

DELETE FROM il_plugin WHERE component_type = 'Services' AND component_name = 'UIComponent' AND slot_id = 'uihk' AND name = 'REST';

3. Completely Remove Plugin Code

rm -rf ${ILIAS_DIR}/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST

Notes

  • The variables ${ILIAS_DIR} and ${ILIAS_LOG_DIR} should point to your ILIAS installation directory (eg. /var/www/ilias) and the external logging directory set during ILIAS installation (eg. /var/log/ilias) respectively, while ${ILIAS_CLIENT} is the name of the/all ILIAS client(s) using the RESTPlugin.
  • On a unix-like operating-systems make sure the ILIAS and the plugin directory is readable and the log-file is writeable by the webserver, eg.:
    chown -R www-data:www-data ${ILIAS_DIR}/
    chmod -R 755 ${ILIAS_LOG_DIR}/
  • While the introduction of the new whoops! error-handler with ILIAS 5.1 is really awesome, it is currently causing issues with the way the REST-Plugin wants to forward any error to the endpoint as valid JSON. For this reason it is best to ensure error-reporting does not enable any E_NOTICE, E_WARNING and most importantly E_STRICT error. Otherwise routes may fail because a notice or warning was generated!