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
- 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 whenXTIPP_PLUGIN_UPLOAD=1is set in its.envfile. - FTP: upload the folder to
plugins/rest-api/of your xTIPP installation. Check that all files arrived.
- ZIP upload: upload the ZIP of a release
(
- Activate it under Konfiguration → Erweiterungen. This runs the migrations, which create the table
plugin_rest_api_keysand the roleAPI-Benutzer. - 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:
-
Deactivate the plugin.
-
Optional: roll back the migrations of the plugin. This drops the table of the keys and removes the role
API-Benutzerwith its assignments. Run it before you delete the folder:php artisan migrate:rollback --path=plugins/rest-api/database/migrations --realpath --force -
Delete
plugins/rest-api/. -
If you kept the tables and want a clean state, remove the migration rows of the plugin from the
migrationstable.