Zoho Writer > Writer - REST API Methods > ZW - Make a document public

ZW - Make a document public

Tags:  



To make a document public.



Request URL POST Method

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

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

To make a particular document public we need to submit a form data to Writer with the following fields:

Field
Description
documentId
Unique ID of the document for which tags are to be added.
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/makePublic/[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 makePublic 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 that is being made public.
documentName
Name the document made public for others to view.


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/makePublic/8892000000064009">
  <result>

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

  </result>
</response>


Equivalent JSON response


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


Errors

Making a document public method may return general errors. Other HTTP errorcode may be 1404.
 


 RSS of this page