Realm management and maintenance

Good day. New to the forum so apologies if I am asking a similar question to what has already been asked. However, I did look one…

Situation: We have a repository that holds many realms and is in need of maintenance on a regular basis. We would like to remove realms that have not been accessed in a given period of time.

Any help is welcome.

Looking for any help we can get please!!

There’s no real built-in support for such kind of requirement.

But you could try this: Enable saving of events (or just a certain event, if it fits your needs, e.g. the LOGIN event, and, if necessary limit it to a proper expiration time) and query the events (and/or admin events) table if the KC database. If there are no entries in your given period of time, you may assume the realm isn’t used for that period and you can remove/delete/do-whatever-you-like with the realm, e.g. via the admin api or however you’d like to maintain your KC instance.

1 Like