Skip to main content

Installation

Requirements​

  • xTIPP 1.0.36. The plugin is pinned to this version, see the overview.
  • HTTPS. By default the API only answers requests over HTTPS, see Settings.

Install​

  1. Install the plugin, either way:
    • ZIP upload: upload the ZIP of a release (rest-api-<version>.zip) in the admin area under Konfiguration → Erweiterungen. xTIPP 1.0.36 offers the upload only when XTIPP_PLUGIN_UPLOAD=1 is set in its .env file.
    • FTP: upload the folder to plugins/rest-api/ of your xTIPP installation. Check that all files arrived.
  2. Activate it under Konfiguration → Erweiterungen. This runs the migrations, which create the table plugin_rest_api_keys and the role API-Benutzer.
  3. Optional: check the settings, especially who may use the API.

Logged-in users with access to the API now find API-Schlüssel in their profile menu. No link has to be added.

Update​

Upload the ZIP of the new version the same way. The old version is kept in storage/app/plugin-backups/.

Alternatively, deactivate the plugin, replace the files via FTP and activate it again.

Remove​

To switch the API off, deactivate the plugin.

Deactivating does not roll back the migrations, and the tables stay in the database. To remove everything:

  1. Deactivate the plugin.

  2. Optional: roll back the migrations of the plugin. This drops the table of the keys and removes the role API-Benutzer with its assignments. Run it before you delete the folder:

    php artisan migrate:rollback --path=plugins/rest-api/database/migrations --realpath --force
  3. Delete plugins/rest-api/.

  4. If you kept the tables and want a clean state, remove the migration rows of the plugin from the migrations table.