I've got an application that is based on PHP 7.0 and that uses the API to collaborate.
The basic API connections work, I can read directories and create folders.
For example folder creation:
<?PHP$accesstoken='123';$xml='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><folder><name>Test HH2</name><description>Via API</description><accessInherited>1</accessInherited></folder>';$ch = curl_init();curl_setopt($ch, CURLOPT_URL,"">instancename.highq.com/.../folders curl_setopt($ch, CURLOPT_PROXY, "456");curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/xml; charset=utf-8','Authorization:Bearer '.$accesstoken));curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_POSTFIELDS,$xml);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);$server_output = curl_exec($ch);curl_close ($ch);echo $server_output;?>
But I can not manage "change folder permission".
First of all I found no way to get a list of all usergroups, the documenation says this feature is not available right now.
But I sniffed a POST request of “instancename.highq.com” and got the impression, that the group "ABC" I am interested in has the number 41.
Based on this knowledge and the API documentation
collaborate.highq.com/.../viewWikiPage.action
I wrote this code snippet:
<?PHP$accesstoken='123';$xml='<usergrouppermissions usergrouptype="2"> <id>41</id> <folderpermissions> <viewfolder>1</viewfolder> <viewfiles>1</viewfiles> <addfiles>1</addfiles> <admin>1</admin> <disableprint>1</disableprint> <disablesave>1</disablesave> <watermark>1</watermark> </folderpermissions> </usergrouppermissions>';$ch = curl_init();curl_setopt($ch, CURLOPT_URL,"instancename.highq.com/.../permissions");curl_setopt($ch, CURLOPT_PROXY, "456");curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/xml; charset=utf-8','Authorization:Bearer '.$accesstoken));curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_POSTFIELDS,$xml);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);$server_output = curl_exec($ch);curl_close ($ch);echo $server_output;?>
But the resulting error is:
405 Method not allowed
Could someone help me here?
Thx, Helmut