How can I regenerate Realm schema in Mongo Atlas from CLI or via API calls?

In our deploy pipeline we want re-generate realm schemas automatically after update mongo collections in atlas.

We are planing follow steps:

  1. Pushing to our GitLab repo
  2. GitLab runner run some migrations in our cloud Mongo DB in Atlas (trough remote connection)
  3. After that GitLab runner must regenerate realm schemas based on actual collection schemas (because it was changed). But we don’t know how to do it.

Is it possible do this step programmatically?