REST API Methods > REST APIs for POST Method > Creator - Share Forms and Views

Creator - Share Forms and Views

Tags:  

 


Sharing Forms and Views

 
Zoho Creator REST style Web API allows the owner of an application to share forms or views with users, using the HTTP POST method. In return, the user gets a formatted XML/JSON response from the called method.

Who can share a Form/View?

Only the owner of the application with valid API Key can share forms and views in the Zoho Creator application.

Request URL

The request url to share a form/view is given below:

XML : htpp://creator.zoho.com/api/xml/<applicationName>/<formName> (or) <viewname>/share/
JSON: htpp://creator.zoho.com/api/json/
<applicationName>/<formName> (or) <viewname>/share/

Request Parameters

The request parameters comprises of .


Field
Description
applicationName
The application name as specified in deluge script. Refer http://creator.zoho.com/api/reference/ to view the application names as specified in the deluge script.
formName/viewName
Name of the Form/View to be shared in the application as specified in deluge script. Refer http://creator.zoho.com/api/reference/ to view the application names as specified in the deluge script.
mailids The user email ids to share the application, seperated by commas. For example,  test@zoho.com, test1@zoho.com

Sample Form (POST Method Format)


<form method=
"POST action ="http://creator.zoho.com/api/xml/<applicationName>/<formName> (or)<viewName>/share/">

<textarea rows=10 cols=27 name="mailids" id="mailids" value="[mailids seperated by commas]"> </textarea>

<input type="hidden" name ="apikey" id="apikey" value="[APIKEY]">
<input type="hidden" name ="apikey" id="apikey" value="[Ticket]">
</form>



Sample Request

Sample request to share an application named "employee" with form name "Employee_Details" with the email ids test@zoho.com



<form method="POST action ="http://creator.zoho.com/api/xml/employee/Employee_Details/cancelshare/">

<input type="textarea" name="mailids" value="test@zoho.com">

<input type="hidden" name ="apikey" id="apikey" value="7be221b9e0c6b859f2932463d5388409">
<input type="hidden" name ="ticket" id="ticket" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
<input type="submit" value="Share">

</form>




Sample XML Response


<response>
<share operation="add">
<application name="employee">
<form name="Employee_Details"/>
<mailids>
<mailid>test@zoho.com</mailid>
</mailids>

<status>Success</status>
</application>
</share>
</response>



Sample JSON Response


{"response":
[
{
"status":"Success",
"mailids":["test@zoho.com"],
"application":[{"name":"employee"},
{"form":[{"name":"Employee_Details"}]}],
"share":[{"operation":"add"}]
}
]
}


If there is an error in the request format, the corresponding error code with the error message will be displayed. Please refer the topic, Error codes and description, to learn about the list of error code displayed.

If the application is successfully shared with the users, the response message will be displayed with status as "Success".

 


Cancel Sharing

 
Zoho Creator REST style Web API allows the owner of an application to cancel sharing for the forms or views shared with users, using the HTTPPOST method. In return, the user gets a formatted XML/JSON response from the called method.

Who can cancel sharing for a Form/View?

Only the owner of the application with valid APIKey can cancel sharing for the forms and views already shared with users.

Request URL

The request url to add a record in xml format is given below:

XML : htpp://creator.zoho.com/api/xml/<applicationName>/<formName> (or) <viewname>/cancelshare/
JSON: htpp://creator.zoho.com/api/json/
<applicationName>/<formName> (or) <viewname>/cancelshare/


Request Parameters

The request parameters comprises of .


Field
Description
applicationName
The application name as specified in deluge script. Refer http://creator.zoho.com/api/reference/ to view the application names as specified in the deluge script.
formName/viewName
Name of the Form/View to be shared in the application as specified in deluge script. Refer http://creator.zoho.com/api/reference/ to view the application names as specified in the deluge script.
mailids The user email ids to share the application, seperated by commas. For example,  test@zoho.com, test1@zoho.com

Sample Form (POST Method Format)


<form method=
"POST action ="http://creator.zoho.com/api/xml/<applicationName>/<formName> (or)<viewName>/cancelshare/">

<textarea rows=10 cols=27 name="mailids" id="mailids" value="[mailids seperated by commas]
"> </textarea>

<input type="hidden" name ="apikey" id="apikey" value="[APIKEY]">
<input type="hidden" name ="tickety" id="ticket" value="[Ticket]">
<input type="submit" value="Share">

</form>



Sample Request

Sample request to cancel sharing for an application named "employee" with form name "Employee_View" with the email ids test@zoho.com.



<form method="POST action ="http://creator.zoho.com/api/xml/employee/Employee_Details/cancelshare/">

<input type="textarea" name="mailids" value="test@zoho.com">

<input type="hidden" name ="apikey" id="apikey" value="7be221b9e0c6b859f2932463d5388409">
<input type="hidden" name ="ticket" id="ticket" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
<input type="submit" value="Share">

</form>




Sample XML Response


<response>
<share operation="remove">
<application name="employee">
<form name="Employee_Details"/>
<mailids>
<mailid>test@zoho.com</mailid>
</mailids>

<status>Success</status>
</application>
</share>
</response>


Sample JSON Response


{"response":
[
{
"status":"Success",
"mailids":["test@zoho.com"],
"application":[{"name":"employee"},
{"form":[{"name":"Employee_Details"}]}],
"share":[{"operation":"remove"}]
}
]
}


If there is an error in the request format, the corresponding error code with the error message will be displayed. Please refer the topic, Error codes and description, to learn about the list of error code displayed.

If the application is successfully shared with the users, the response message will be displayed with status as "Success".



 


 RSS of this page