Hi all,
I’m new to Nextcloud, and have some questions regarding API usage.
As of now I have installed it with official Nextcloud helm chart, fine tuned config.php:
to start clean without any nextcloud default files, some caching fixes, etc.
Added also before starting hook to run some commands like to integrate with OIDC - installing app and adding the config, disabling public link sharing and installing groupfolders,…
So Last bit to understand is API, I can see in documentation there are support for REST API, there is WebDav and OCS…
What I need is to be able to have CRUD for shared files/foldes/subfolders based on permission for the user.
-
I tried just with admin to share some folder with user group - it worked only for users existing to that group, when new user authenticated and automatically was added to the group it did work only if I re-share the whole folder, and that was when I decided to switch to groupfolders app instead as it did not have such issues.
-
groupfolders app is easy to use, there is REST APIs to list folders, but not subfolders or files… or upload/delete or download the file if user has access to it.
I’ve tested with WebDav and it works, CRUD methods work, but, for the path I must include the username which authenticates and wants to get the file.
/remote.php/dav/files/matthew/my_files/my_file.pdf
The idea is I want to have shared folder structure containing subfolders with specific permissions for specific user group and ideally request should be like:
- authenticate with idp
- be able to list shares (get internal url - f/244 or smth like that as I’ve seen it)
- then access with api that shared file withou specifying the username.
Does Nextcloud this support out of the box API for CRUD methods without the need to specify the username ? Just like authenticate with idp and then if You have the shared file url, You can access and download it or be able to list Your shared folders/subfolders and files ?
Spent couple of days but did not find if it is possible out of the box without doing some overlays, custom stuff on top of it…
Have anyone done it, do You have some examples ?
Thank You in advance. :))