while creating share link with the help of ocs share api i am able to create the link but it is not setting the permission that i am trying to give it.
$ch = curl_init("https://servername/ocs/v2.php/apps/files_sharing/api/v1/shares");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: multipart/form-data', "OCS-APIRequest:true"));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_USERPWD, getenv('NEXTCLOUDUSERNAME') . ":" . getenv('NEXTCLOUDPASSWORD'));
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$return = curl_exec($ch);