From 4d08062e554357b11acd1b5a84ef37ce30344501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chrz=C4=85szcz?= Date: Thu, 29 Sep 2022 15:39:35 +0200 Subject: [PATCH] Update migration guide with the REST API changes --- doc/migrations/5.1.0_6.0.0.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/migrations/5.1.0_6.0.0.md b/doc/migrations/5.1.0_6.0.0.md index 3010083757a..cb8d1a0f023 100644 --- a/doc/migrations/5.1.0_6.0.0.md +++ b/doc/migrations/5.1.0_6.0.0.md @@ -1,4 +1,4 @@ -## Configuration +## Module configuration The `mod_mam_meta` module is now named `mod_mam` for simplicity, so if you are using this module, you need to update the module name in `mongooseim.toml`. @@ -6,19 +6,25 @@ The `mod_mam_meta` module is now named `mod_mam` for simplicity, so if you are u The `mod_mam` backend module is now named `mod_mam_pm` for consistency with `mod_mam_muc`. As a result, the backend metrics have updated names, i.e. each `[backends, mod_mam, Metric]` name is changed to `[backends, mod_mam_pm, Metric]`, where `Metric` can be `lookup` or `archive`. -## Rest API +## REST API -All the backend administration endpoints for `mod_muc_light` require now `XMPPMUCHost` (MUC subdomain) instead of `XMPPHost` (domain) and `roomID` instead of `roomName`. +The whole REST API has been unified and simplified. There are now only two REST API handlers that you can configure in the `listen` section of `mongooseim.toml`: + +- [`mongoose_admin_api`](../../configuration/listen/#handler-types-rest-api-admin-mongoose_admin_api) handles the administrative API, +- [`mongoose_client_api`](../../configuration/listen/#handler-types-rest-api-client-mongoose_client_api) handles the client-facing API. + +You need to remove the references to the obsolete handlers (`mongoose_api_client`, `mongoose_api_admin`, `mongoose_api`, `mongoose_domain_handler`) from your configuration file. + +Additionally, all the backend administration endpoints for `mod_muc_light` require now `XMPPMUCHost` (MUC subdomain) instead of `XMPPHost` (domain) and `roomID` instead of `roomName`. For some endpoints, the response messages may be slightly different because of the unification with other APIs. -## CTL +## Command Line Interface For some commands, the response messages may be slightly different because of the unification with other APIs. -## Dynamic domains +## Dynamic comains Removing a domain was a potentially troublesome operation: if the removal was to fail midway through the process, retrials wouldn't be accepted. This is fixed now, by first disabling and marking a domain for removal, then running all the handlers, and only on full success will the domain be removed. So if any failure is notified, the whole operation can be retried again. The database requires a migration, as the status of a domain takes now more than the two values a boolean allows, see the migrations for Postgres, MySQL and MSSQL in the [`priv/migrations`](https://github.com/esl/MongooseIM/tree/master/priv/migrations) directory. -