Analytics-Plus Help

Sharing and Collaboration API

This section provides APIs for sharing & collaboration. You can share views (reports & dashboards) created in Analytics Plus with fine grained permission control to users through APIs. You can also manage sharing as well as remove sharing through APIs.

 

Share View(s)

With the Analytics Plus Share API, you can share the views (tables/reports/dashboards) created in Analytics Plus with users. The Share API also allows you to the revoke sharing permission granted. It is recommended that you go through the documentation - Sharing and Collaboration, before using the API for better understanding.
Note: Sharing permissions can be updated by calling 'Share' again (over riding the existing share permissions).

 

URL

https://<server_hostname>:8443/api/<Email>/<Databasename>

 

URL PARAMETERS 

ParameterPossible ValuesDescription
ZOHO_ACTIONSHAREThis parameter specifies the action to be performed by the API request.
Note: Value of ZOHO_ACTION parameter should be in the same case(UPPER CASE) as given in this document.
ZOHO_OUTPUT_FORMATXML/JSONThis parameter specifies the output format for the response.
ZOHO_ERROR_FORMATXML/JSONSpecifies the output format for the response in case an error occurs when trying to process the request.
authtokenuser authtokenAuth Token is an unique token that authenticates the user to access the Analytics Plus account.
ZOHO_API_VERSION1.0The API version of Analytics Plus based on which the application(/service) has been written. This parameter allows the Analytics Plus to handle applications based on the older versions.The current API version is 1.0


Note:It is recommended to use Analytics Plus Login Email Address in the API URL instead of Analytics Plus Username.

 

POST PARAMETERS (URL ENCODED)

ParameterPossible ValuesDescriptionRemarks
ZOHO_VIEWSTable1,View1,View2,My ViewList of views which are to be shared. Multiple views can be shared by providing them separated by comma.
Note: ZOHO_VIEWS is encoded in URL encoding format. Value without encoding is given below:
ZOHO_VIEWS=Table1,View1,View2,My View
Mandatory Parameter
ZOHO_EMAILSuser1@finepick.com, user2@finepick.comUser email addresses as comma separated values to whom the views need to be shared.
Note: ZOHO_EMAILS is encoded in URL encoding format. Value without encoding is given below: 
ZOHO_EMAILS=user1@finepick.com,user2@finepick.com
Mandatory Parameter

 

POST PARAMETERS FOR FINE-GRAINED PERMISSIONS (AT LEAST ONE PARAMETER IS REQUIRED FROM THE BELOW) 

ParameterAllowed ValuesDefault valueDescription
ZOHO_READtrue or falsefalseRead Access to the view
ZOHO_EXPORTtrue or falsefalseExport permission for a view
ZOHO_VUDtrue or falsefalsePermission to view underlying data in a Chart / Pivot / Summary view
ZOHO_DRILLDOWNtrue or falsefalsePermission to drill down in a Chart
ZOHO_ADDROWtrue or falsefalsePermission to add a row in the table
ZOHO_UPDATEROWtrue or falsefalsePermission to update a row in the table
ZOHO_DELETEROWtrue or falsefalsePermission to delete a row in the table
ZOHO_DELETEALLROWStrue or falsefalsePermission to delete all rows in the table
ZOHO_IMPORT_APPENDtrue or falsefalsePermission to import data into the table using APPEND option
ZOHO_IMPORT_ADDORUPDATEtrue or falsefalsePermission to import data into the table using ADD or UPDATE option i.e new rows will be appended and existing rows will be updated based on the matching columns provided in IMPORT action
ZOHO_IMPORT_DELETEALLADDtrue or falsefalsePermission to import data into the table using the option: deleting all the existing records and adding the new records
ZOHO_SHAREtrue or falsefalsePermission to share the table / view to others

 

OTHER PARAMETERS 

ParameterAllowed ValuesDefault ValueDescriptionRemarks
ZOHO_CRITERIAFilter Criteria should be specified in the format as given in the example below. It is similar to a WHERE clause in SQL languages. ZOHO_CRITERIA: 
This parameter allows you to apply a filter criteria while sharing a view to users. The specified criteria will be applied on the reports shared, there by filtering the data viewed, when the report is accessed by the shared user. 
 
ZOHO_INHERIT_PARENT_CRITERIAtrue or falsefalseThis is valid only for reports(not tables). If true, then its parent tables’ criteria is also taken into account while sharing 
ZOHO_INVITE_MAILtrue or falsefalseWhether to send an invitation mail on sharingFor White Label Customers: 
If this parameter is set to 'true’, use your white label domain in the Share API request.
ZOHO_MAIL_SUBJECT  Required only if ZOHO_INVITE_MAIL is true 
ZOHO_MAIL_MESSAGE    
ZOHO_INVITE_MAIL_CCMEtrue or falsefalseWhether to CC the invitation mail to you on sharingThis parameter is valid only if ZOHO_INVITE_MAIL is true

 

Sample Request:

https://<server_hostname>:<portnumber>/api/abc@zoho.com/EmployeeDB?ZOHO_ACTION=SHARE
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
&authtoken=g38sl4j4856guvncrywox8251sssds&ZOHO_API_VERSION=1.0

 

Sample Response XML Format:

<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/abc@zoho.com/EmployeeDB" action="SHARE">
<result>success</result>
</response>

 

Sample Response JSON Format:

{
"response":
{
"uri": "/api/abc@zoho.com/EmployeeDB",
"action": "SHARE",
"result": "success"
}
}

 

Remove Sharing 

With the reportin Database Owner API, you can add / remove the database owners. It is recommended that you go through the documentation on Multiple Database Owners, before using the API for better understanding.

 

URL

https://<server_hostname>:8443/api/<Email>/<Databasename>

 

URL PARAMETERS 

ParameterPossible ValuesDescription
ZOHO_ACTIONREMOVESHAREThis parameter specifies the action to be performed by the API request.
Note: Value of ZOHO_ACTION parameter should be in the same case(UPPER CASE) as given in this document.
ZOHO_OUTPUT_FORMATXML/JSONThis parameter specifies the output format for the response.
ZOHO_ERROR_FORMATXML/JSONSpecifies the output format for the response in case an error occurs when trying to process the request.
authtokenuser authtokenAuth Token is an unique token that authenticates the user to access the Analytics Plus account.
ZOHO_API_VERSION1.0The API version of Analytics Plus based on which the application(/service) has been written. This parameter allows the Analytics Plus to handle applications based on the older versions.The current API version is 1.0

 

POST PARAMETERS (URL ENCODED) 

ParameterPossible ValuesDefault ValueDescriptionRemarks
ZOHO_VIEWSTable1,View1,View2,My View Views whose sharing need to be removed. Multiple views can be passed using comma separator.
Note: ZOHO_VIEWS is encoded in URL encoding format. Value without encoding is given below:
ZOHO_VIEWS=Table1,View1,View2,My View
Any one of the parameter (ZOHO_VIEWS or ZOHO_ALLVIEWS) is a mandatory Parameter.
ZOHO_ALLVIEWStrue or falsefalseIf true passed to this parameter it will remove the sharing for all the views which are shared to the corresponding users 
(users identified by the email addresses passed in the parameter ZOHO_EMAILS)
Any one of the parameter (ZOHO_VIEWS or ZOHO_ALLVIEWS) is a mandatory Parameter.
ZOHO_EMAILSuser1@finepick.com, user2@finepick.com User email addresses as comma separated values to whom the sharing need to be removed for the specified views
Note: ZOHO_EMAILS is encoded in URL encoding format. Value without encoding is given below:
ZOHO_EMAILS=user1@finepick.com,user2@finepick.com
Mandatory Parameter

 

Sample Request:

https://<server_hostname>:<portnumber>/api/abc@zoho.com/EmployeeDB?ZOHO_ACTION=REMOVESHARE
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
&authtoken=g38sl4j4856guvncrywox8251sssds&ZOHO_API_VERSION=1.0

 

Sample Response XML Format:

<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/abc@zoho.com/EmployeeDB" action="REMOVESHARE">
<result>success</result>
</response>

 

Sample Response JSON Format:

{
"response":
{
"uri": "/api/abc@zoho.com/EmployeeDB",
"action": "REMOVESHARE",
"result": "success"
}
}

 

Add Database Owner

This api used to add database owner for the particular database.

 

URL

https://<server_hostname>:8443/api/<Email>/<Databasename> 

 

URL PARAMETERS

ParameterPossible ValuesDescription
ZOHO_ACTIONADDDBOWNERThis parameter specifies the action to be performed by the API request.
Note: Value of ZOHO_ACTION parameter should be in the same case(UPPER CASE) as given in this document.
ZOHO_OUTPUT_FORMATXML/JSONThis parameter specifies the output format for the response.
ZOHO_ERROR_FORMATXML/JSONSpecifies the output format for the response in case an error occurs when trying to process the request.
authtokenuser authtokenAuth Token is an unique token that authenticates the user to access the Analytics Plus account.
ZOHO_API_VERSION1.0The API version of Analytics Plus based on which the application(/service) has been written. This parameter allows the Analytics Plus to handle applications based on the older versions.The current API version is 1.0
 

 

POST PARAMETERS (URL ENCODED)

ParameterPossible ValuesDefault ValueDescriptionRemarks
ZOHO_EMAILSuser1@finepick.com, user2@finepick.com User email addresses as comma separated values to whom the sharing need to be removed for the specified views
Note: ZOHO_EMAILS is encoded in URL encoding format. Value without encoding is given below:
ZOHO_EMAILS=user1@finepick.com,user2@finepick.com
Mandatory Parameter

 

OTHER PARAMETERS 

ParameterAllowed ValuesDefault ValueDescriptionRemarks
ZOHO_INVITE_MAILtrue or falsefalseWhether to send an invitation mail on sharingFor White Label Customers: 
If this parameter is set to 'true’, use your white label domain URL instead of "<server_hostname>:8443" in the Share API request.
ZOHO_MAIL_SUBJECT  Required only if ZOHO_INVITE_MAIL is true 
ZOHO_MAIL_MESSAGE  

 

Sample Request:

https://<server_hostname>:<portnumber>/api/abc@zoho.com/EmployeeDB?ZOHO_ACTION=ADDDBOWNER
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
&authtoken=g38sl4j4856guvncrywox8251sssds&ZOHO_API_VERSION=1.0

 

Sample Response XML Format:

<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/abc@zoho.com/EmployeeDB" action="ADDDBOWNER">
<result>success</result>
</response>

 

Sample Response JSON Format:

{
"response":
{
"uri": "/api/abc@zoho.com/EmployeeDB",
"action": "ADDDBOWNER",
"result": "success"
}
}

 

REMOVE DATABASE OWNER

This api used to remove database owner from the particular database.

 

URL

https://<server_hostname>:8443/api/<Email>/<Databasename>

 

URL PARAMETERS

ParameterPossible ValuesDescription
ZOHO_ACTIONREMOVEDBOWNERThis parameter specifies the action to be performed by the API request.
Note: Value of ZOHO_ACTION parameter should be in the same case(UPPER CASE) as given in this document.
ZOHO_OUTPUT_FORMATXML/JSONThis parameter specifies the output format for the response.
ZOHO_ERROR_FORMATXML/JSONSpecifies the output format for the response in case an error occurs when trying to process the request.
authtokenuser authtokenAuth Token is an unique token that authenticates the user to access the Analytics Plus account.
ZOHO_API_VERSION1.0The API version of Analytics Plus based on which the application(/service) has been written. This parameter allows the Analytics Plus to handle applications based on the older versions.The current API version is 1.0

 

POST PARAMETERS (URL ENCODED)

ParameterPossible ValuesDefault ValueDescriptionRemarks
ZOHO_EMAILSuser1@finepick.com, user2@finepick.com User email addresses as comma separated values to whom the sharing need to be removed for the specified views
Note: ZOHO_EMAILS is encoded in URL encoding format. Value without encoding is given below:
ZOHO_EMAILS=user1@finepick.com,user2@finepick.com
Mandatory Parameter

 

OTHER PARAMETERS

ParameterAllowed ValuesDefault ValueDescriptionRemarks
ZOHO_INVITE_MAILtrue or falsefalseWhether to send an invitation mail on sharingFor White Label Customers: 
If this parameter is set to 'true’, use your white label domain URL instead of "<server_hostname>:8443" in the Share API request.
ZOHO_MAIL_SUBJECT  Required only if ZOHO_INVITE_MAIL is true 
ZOHO_MAIL_MESSAGE   

 

Sample Request:

https://<server_hostname>:<portnumber>/api/abc@zoho.com/EmployeeDB?ZOHO_ACTION=REMOVEDBOWNER
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
&authtoken=g38sl4j4856guvncrywox8251sssds&ZOHO_API_VERSION=1.0

 

Sample Response XML Format:

<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/abc@zoho.com/EmployeeDB" action="REMOVEDBOWNER">
<result>success</result>
</response>

 

Sample Response JSON Format:

{
"response":
{
"uri": "/api/abc@zoho.com/EmployeeDB",
"action": "REMOVEDBOWNER",
"result": "success"
}
}

 

Error handling in sharing

 
This section explains about the possible error responses that could be returned by Analytics Plus on failure of the Share API calls discussed above. The sample error response is below.
 
Error CodeReasonSolution
7301You (your full name) do not have the permission to do this operation. Only database owner has the permission.Provide the authtoken for the Administrator of the database
7103The Database Name mentioned in the API URL does not existsPlease provide an existing Database Name to get the sharing details


In case you encounter any other errors, please mail the API request URL parameters and error response details to analyticsplus-support@manageengine.com. We will get back to you shortly with the best possible solution.

 

Share this post : FacebookTwitter