How to get Shares from a specific file or folder ? | Nextcloud OCS Share API

Viewed 9

i wanna integrate some nextcloud folders into my site, so people can download the files from it. Ive managed to the get all shares from the OCS Share Api. Im working with Python & Django.

This request works and gives me all shares.

headers = {'OCS-APIRequest': 'true', "Content-Type": "application/json", "Accept": "application/json"}
        url = "https://app.xxxx.com/nextcloud/ocs/v2.php/apps/files_sharing/api/v1/shares"
        apirequest = requests.get(url, verify=False, headers=headers, auth=('xxxx', 'xxxx'))
        apiresult = apirequest.json()

Now ive got some folders in the shares that i wanna open and display on the site file by file. For that case nextcloud got this option:

https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-share-api.html

I just cant figure out, how the "subfile and path" parameters should look like. Ive tried a lot of different versions but its always 404 and i cant find some examples for that. Maybe someone can help me with that, i think it shouldn be that hard. Thank you!

0 Answers
Related