Hi !
I’m trying to use the API to get shares from a specific folder but Nextcloud (17.0.3) sends every user’s shares.
Here is my command line :
curl -u “user:password” -H “OCS-APIRequest: true” -X GET https://cloud.domain.tld/ocs/v2.php/apps/files_sharing/api/v1/shares -d “path=Folder1/Folder2”
I can’t find what I’m doing wrong.
abijma
March 3, 2020, 11:20am
2
@Jaymzwize i don’t have the answer for your question;-) but i’m looking for an overview of all available api calls. is there something like a document/list with all calls and params ?
Hi !
I finally found the answer and my mistake, path argument is an url argument not a GET one so you have to send the following curl command to display shares from a specific folder :
curl -u “user:password” -H “OCS-APIRequest: true” -X GET https://cloud.domain.tld/ocs/v2.php/apps/files_sharing/api/v1/shares?path=/root/folder1”
1 Like