Creating folders / copying files with OCS


#1

Hi everyone,

I hope it’s the right subforum. I’m currently facing some difficulties trying to figure out how ownclouds external API works. To be honest I have no specific knowledge in APIs/REST, never had to do anything with it. But now I’m put in a situation where I have to.

We have a couple of .pdf files on our own server(full admin access). Furthermore our institution has a separate server on which owncloud is running. We do have owncloud user accounts on that server, but no admin access just simple user accounts.
So the idea is to write a small php script which a) creates folders on our owncloud accounts b) copies the pdf files into these folders . Any idea how to do this? Placing any self written application on the owncloud server is not an option. My idea is to use : https://doc.owncloud.org/server/9.1/developer_manual/core/ocs-share-api.html unfortunately as mentioned I have no clue how to make this work and I couldn’t find any well explained examples :confused:

Thanks for any help you can provide, really appreciate it 

Best regards
Sicilio


#2

Using the ownCloud Desktop Client for this task seems the easiest ... you can just run it on your server and sync files/folders to the ownCloud Server that way.


#3

Just use plain WebDAV [1]. This is the "API" for such operations.

[1] https://doc.owncloud.org/server/latest/user_manual/files/access_webdav.html#accessing-files-using-curl