Automate filesharing

Hi, it’s someone aware if it’s possible to automate the file sharing procedure?
We have a bunch of files stored in a database (Filemaker), and we would like to save each of them in a Nextcloud folder, generate a share link and store this link in the database.

We found out how to create folders and move the files through the WebDAV API or applescript, but we cannot find any hint on how to create and read the sharing link.

Any help is really appreciated.

Thanks

Us, too! I have several traces but no solution yet. Are you still interested?!