Skip to content

Commit

Permalink
Update migration guide with the REST API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Paweł Chrząszcz authored and chrzaszcz committed Sep 29, 2022
1 parent ae22bda commit 50c32ed
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions doc/migrations/5.1.0_6.0.0.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
## 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`.

## Metrics

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.

0 comments on commit 50c32ed

Please sign in to comment.