Zoho - Trademark
Blogs
  Forums  Writer Home
  Toll Free : 888 900 9646

API Home >> Writer >> API Reference >> POST Method APIs



To remove public sharing access from a particular document.



Request URL POST Method

                             XML :  http://export.writer.zoho.com/api/private/xml/removePublic/[documentID]?apikey=[API Key]&ticket=[Ticket]

                            JSON : http://export.writer.zoho.com/api/private/json/removePublic/[documentID]?apikey=[API Key]&ticket=[Ticket]


Request parameters :

To remove public sharing access from a particular document we need to submit a form data to Writer with the following fields:

Field
Description
documentId
Unique ID of the public document.
allowcomment
[boolean] - Check whether permission to add comment to the public document is allowed or not.
showcomment
[boolean] - Check whether permission to view other users comment is allowed or not.


Sample Form (POST Method)


<form method="POST"    action="http://export.writer.zoho.com/api/private/xml/removePublic/[documentId]?apikey=[APIKEY]&ticket=[Ticket]">

<input type="hidden" name="allowcomment" value="[true/false]">

<input type="hidden" name="showcomment" value="[true/false]">

<input type="submit" value="makePublic" class="divbutton" name="submit">

</form>



* It is mandatory to pass the apikey and ticket parameters to access the removePublic api.


Response fields

The schema document for the API response is located at: http://export.writer.zoho.com/schema/restapi/save.xsd

Field
Description
documentId
Unique ID associated with the document whose public sharing access is to be removed.
documentName
Name the document.


Sample Response

The following is the sample XML response for the above method:


<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/private/xml/removePublic/8892000000064009">
  <result>

     <documentId>
8892000000064009</documentId>
        <documentName>Dell Laptops</documentName>

  </result>
</response>


Equivalent JSON response


{
  "response":
   {
        "uri": "/api/private/json/removePublic/8892000000064009",
        "result":
        {
   
            "
documentId":"8892000000064009",
            "documentName":"Dell Laptops"
        }
    }
}  


Errors

Removing public sharing access from a document method may return general errors. Other HTTP error code may be 1404.