Blogs   Forums   Creator Home Toll Free : 888 900 9646

API Home >> Creator API  >> REST API >> REST API Methods >> Sharing Application




 


Sharing Application

 

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

Who can share an application?

Only the owner of the application with valid APIKey can share a Zoho Creator application.


Request URL

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

XML : htpp://creator.zoho.com/api/xml/share/
JSON: htpp://creator.zoho.com/api/json/
share/


Request Parameters

The request parameters comprises of .

Field
Description
applinkname
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.
mailids/usernamesThe user email ids/user names  to share the application, seperated by commas. For example,  test@zoho.com, test1@zoho.com


Sample Form (POST Method Format) - Using mailids

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

<input type="text" name="applinkname" id="applinkname" value="[applicationName]">

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

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

</form>



Sample Form (POST Method Format) - Using usernames

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

<input type="text" name="applinkname" id="applinkname" value="[applicationName]">

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

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

</form>




Sample Request (using mailids)

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


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

<input type="text" name="applinkname" id="applinkname" value="employee">

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

<input type="hidden" name ="apikey" id="apikey" value="7be221b9e0c6b859f2932463d5388409">

<input type="submit" value="Share">

</form>




Sample XML Response

 

<response>
<share operation="add">
<application name="employee">
<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"}],
"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 an application, using the HTTPPOST method. In return, the user gets a formatted XML/JSON response from the called method.

Who can cancel sharing for an application?

Only the owner of the application with valid APIKey can cancel sharing for the applications 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/cancelshare/
JSON: htpp://creator.zoho.com/api/json/
cancelshare/


Request Parameters

The request parameters comprises of .

Field
Description
applinkName
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.
mailids/usernamesThe user email ids/usernames 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//cancelshare/">

<input type="text" name="applinkname" id="applinkname" value="[applicationName]">

<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="submit" value="Share">

</form>





Sample Request

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



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

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

<input type="hidden" name ="apikey" id="apikey" value="7be221b9e0c6b859f2932463d5388409">

<input type="submit" value="Share">

</form>




Sample XML Response

 

<response>
<share operation="remove">
<application name="employee">
<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"}],
"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".