Share

    Important Note:

    1. It is mandatory to use HTTPS in all API requests instead of HTTP request. HTTP is not supported.
    2. Always use https://<reports-hostname>:<port>/api/<reports-loginname>/<databasename>/<tablename> as the API request URL.

    With the ManageEngine Reports Share API, you can share the views (tables/reports/dashboards) created in ManageEngine Reports with users. The Share API also allows you to the revoke sharing permission granted. It is recommended that you go through the documentation on How sharing works in ManageEngine Reports , before using the API for better understanding.

    Note:

    • Sharing permissions can be updated by calling 'Share' again (over riding the existing share permissions).

    Share - Sample URL

    https://<reports-hostname>:<port>/api/demouser/EmployeeDB?ZOHO_ACTION=SHARE
    &ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
    &ZOHO_API_KEY=demouser_apikey&ticket=demouser_ticket&ZOHO_API_VERSION=1.0

    Data sent as POST parameters (URL Encoded)

    Parameter Possible Values Description Remarks
    ZOHO_VIEWS Table1,View1,View2,My%20View List 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
    Mandatoryparameter
    ZOHO_EMAILS user1%40finepick.com, user2%40finepick.com User 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
    Mandatoryparameter

    POST parameters for fine-grained permissions(At least one parameter is required from the below)

    Parameter Allowed Values Default value Description Remarks
    ZOHO_READ true or false false Read Access to theview  
    ZOHO_EXPORT trueorfalse false Export permission for aview  
    ZOHO_VUD trueorfalse false Permission to view underlying data in a Chart / Pivot / Summary view  
    ZOHO_ADDROW trueorfalse false Permission to add a row in the table  
    ZOHO_UPDATEROW trueorfalse false Permission to update a row in the table  
    ZOHO_DELETEROW trueorfalse false Permission to delete a row in the table  
    ZOHO_DELETEALLROWS trueorfalse false Permission to delete all rows in the table  
    ZOHO_IMPORT_APPEND trueorfalse false Permission to import data into the table using APPEND option  
    ZOHO_IMPORT_ADDORUPDATE trueorfalse false Permission 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_DELETEALLADD trueorfalse false Permission to import data into the table using the option: deleting all the existing records and adding the new records  
    ZOHO_SHARE trueorfalse false Permission to share the table / view to others  

    Other Parameters

    Parameter Allowed Values Default Value Description Remarks
    ZOHO_CRITERIA Filter Criteria should be specified in the format as given in the example below. It is similar to a WHERE clause in SQL languages.Read More   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, whenthe report is accessed by the shared user.
    Refer the below topic to use ZOHO_CRITERIA:
    Applying Filters
     
    ZOHO_INHERIT_PARENT_CRITERIA true or false false This is valid only for reports(not tables). If true, then its parent tables' criteria is also taken into account while sharing  
    ZOHO_INVITE_MAIL true or false false Whether to send an invitation mail on sharing For White Label Customers:
    If this parameter is set to 'true', use your white label domain URL instead of reportsapi.zoho.com in the Share API request.
    ZOHO_MAIL_SUBJECT     Required only if ZOHO_INVITE_MAIL is true  
    ZOHO_MAIL_MESSAGE        
    ZOHO_INVITE_MAIL_CCME true or false false Whether to CC the invitation mail to you on sharing This parameter is valid only if ZOHO_INVITE_MAIL is true

    Share - Sample Success Response

    XML

    <?xml version="1.0" encoding="UTF-8" ?><response uri="/api/demouser/EmployeeDB" action="SHARE"><result>success</result></response>

    JSON

    {
    "response";
    {
    "uri": "/api/demouser/EmployeeDB",
    "action": "SHARE",
    "result": "success"
    }
    }

    Remove Share - Sample URL

    URL

    https://<reports-hostname>:<port>/api/demouser/EmployeeDB?ZOHO_ACTION=REMOVESHARE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&ZOHO_API_KEY=demouser_apikey&ticket=demouser_ticket&ZOHO_API_VERSION=1.0

    Data Sent as POST parameters (URL Encoded):

    Parameter Allowed Values Default Value Description Remarks
    ZOHO_VIEWS Table1,View1,View2,
    My%20View
      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 these two parameter is amandatory Parameter
    ZOHO_ALLVIEWS true or false false If 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)
     
    ZOHO_EMAILS user1%40finepick.com, user2%40finepick.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

    Remove Share - Sample Success Response

    XML

    <?xml version="1.0" encoding="UTF-8" ?><response uri="/api/demouser/EmployeeDB" action="REMOVESHARE"><result>success</result></response>

    JSON

    {
    "response";
    {
    "uri": "/api/demouser/EmployeeDB",
    "action": "REMOVESHARE",
    "result": "success"
    }
    }

    With the ManageEngine Reports Database Owner API, you can add / remove the multiple database owners for a database. It is recommended that you go through the documentation on How multiple database owners works in ManageEngine Reports , before using the API for better understanding.

    Add Database Owner - Sample URL

    https://<reports-hostname>:<port>/api/demouser/EmployeeDB?ZOHO_ACTION=ADDDBOWNER&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&ZOHO_API_KEY=demouser_apikey&ticket=demouser_ticket&ZOHO_API_VERSION=1.0

    Data sent as POST parameters (URL Encoded)

    Parameter Possible Values Description Remarks
    ZOHO_EMAILS user1%40finepick.com, user2%40finepick.com

    User email addresses as comma separated values to whom database ownership need to be provided
    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:

    Parameter Allowed Values Default Value Description Remarks
    ZOHO_INVITE_MAIL true or false false Whether to send an invitation mail on sharing For White Label Customers:
    If this parameter is set to 'true', use your white label domain URL instead of reportsapi.zoho.com in the Share API request.
    ZOHO_MAIL_SUBJECT     Required only if ZOHO_INVITE_MAIL is true  
    ZOHO_MAIL_MESSAGE        

    Add Database Owner- Sample Success Response

    XML

    <?xml version="1.0" encoding="UTF-8" ?><response uri="/api/demouser/EmployeeDB" action="ADDDBOWNER"><result>success</result></response>

    JSON

    {
    "response";
    {
    "uri": "/api/demouser/EmployeeDB",
    "action": "ADDDBOWNER",
    "result": "success"
    }
    }

    Remove Database Owner - Sample URL

    https://<reports-hostname>:<port>/api/demouser/EmployeeDB?ZOHO_ACTION=REMOVEDBOWNER&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&ZOHO_API_KEY=demouser_apikey&ticket=demouser_ticket&ZOHO_API_VERSION=1.0

    Data sent as POST parameters (URL Encoded)

    Parameter Possible Values Description Remarks
    ZOHO_EMAILS user1%40finepick.com, user2%40finepick.com User email addresses as comma separated values to whom database ownership need to be removed
    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:

    Parameter Allowed Values Default Value Description Remarks
    ZOHO_INVITE_MAIL true or false false Whether to send a mail on sharing removal For White Label Customers: If this parameter is set to 'true', use your white label domain URL instead of reportsapi.zoho.com in the Share API request.
    ZOHO_MAIL_SUBJECT     Required only if ZOHO_INVITE_MAIL is true  
    ZOHO_MAIL_MESSAGE        

    Remove Database Owner- Sample Success Response

    XML

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/demouser/EmployeeDB" action="REMOVEDBOWNER">
    <result>success</result>
    </response>

    JSON

    {
    "response";
    {
    "uri": "/api/demouser/EmployeeDB",
    "action": "REMOVEDBOWNER",
    "result": "success"
    }
    }

     

    Copyright © 2016, ZOHO Corp. All Rights Reserved.