i create a file using php and afterwards want to share this file via owncloud (using the same php file)
it seems, the easiest way would be via a https request https://doc.owncloud.org/server/10.0/developer_manual/core/ocs-share-api.html#response-attributes-1 although it feel a bit weird to use an admin account just to share a user file.
<?xml version=“1.0”?> <ocs> <meta> <status>ok</status> <statuscode>100</statuscode> <message/> </meta> <data/> </ocs>
but no share is beeing created. my questions:
- what may i did wrong? Did not really find example code in the docs
- do i really need an admin account?
- what means “status:OK”? “the share was created” or just that “the syntax was correct”?
- And is this the expected behavior or rather a bug? (OK/Status/100, but no share created)
- how to send a mail notification? mail_send is only a Response Attribute but cannot be set?
also i have another OC9 instance running under 2 Domains: https://cloud.domain1.tld and https://cloud.domain2.tld
even though domain1.tld is the MAIN domain set in config.php AND /etc/apache/sites/enabled/owncloud-ssl.config
the API call works ONLY on Domain2 and ends up in a redirect when using the same call on Domain1. 8wich then prompt for user:pass again and will never actually answer the API call.
This is really weird and i wonder if there is another location to set the main domain…