Analytics-Plus Help

Embed API

With this API you can embed reports & dashboards created in Analytics Plus into your Web pages/applications programmatically. This offers great possibilities to developers for creating dynamic reporting content embedded within their websites & applications seamlessly.

 

Get View URL

This API returns the URL to access the mentioned view. You need to provide the database name and the view name as input for the API.

 

URL

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

 

URL PARAMETERS 

ParameterPossible ValuesDescription
ZOHO_ACTIONGETVIEWURLThis 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

 

Sample Request:

https://<server_hostname>:<portnumber>/api/abc@zoho.com/Employee/EmployeeDetails?ZOHO_ACTION=GETVIEWURL
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_API_VERSION=1.0&authtoken=8b30a900d73sjc7392n8923dkf983k

 

Sample Response XML Format:

<response uri="/api/abc@zoho.com/Employee/EmployeeDetails" action="GETVIEWURL">
<result>
<viewurl>
https://<server_hostname>:8443/ZDBDataSheetView.cc?&
OBJID=9999999999999&STANDALONE=true&REMTOOLBAR=true&
ZDB_THEME_NAME=blue
</viewurl>
</result>
</response>

 

Sample Response JSON Format:

{
"response":
{
"uri": "\/api\/abc@zoho.com\/Employee\/EmployeeDetails",
"action": "GETVIEWURL",
"result":
{
"viewurl": "https://<server_hostname>:8443/ZDBDataSheetView.cc?&
OBJID=9999999999999&STANDALONE=true&REMTOOLBAR=true&
ZDB_THEME_NAME=blue"
}
}
}

 

Get Embed URL

The Get Embed URL API is used to get the embed URL of the particular table / view. This API is available only for the White Label Administrator.

 

URL

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

 

URL PARAMETERS

ParameterPossible ValuesDescription
ZOHO_ACTIONGETEMBEDURLThis 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

 

URL PARAMETERS

ParameterPossible ValuesDescription
ZOHO_CRITERIA 
(optional)
criteriaThis parameter value should be GETEMBEDURL. (Upper Case)
ZOHO_VUD_PERMISSION 
(optional)
true/falseDefault is false.
In case it is true, then the view have the permission to view the Underlying data.
In case its false, then the view don’t have the permission to view the Underlying data.
ZOHO_INCLUDE_TOOLBAR 
(optional)
true/falseDefault is false.
In case it is true, then the toolbar is visible in the embed mode.
In case its false, no toolbar is visible in the embed mode.
ZOHO_VALIDITY_PERIOD 
(optional)
<number>Controls the validity period of the embed url.
Default is 3600 seconds (One hour).
Value in seconds.
ZOHO_THEME_COLOR 
(optional)
blue/brownTheme color.
Default is blue
ZOHO_DATATYPE_SYMBOL 
(optional)
true/falseControls to display the datatype symbol in the table column.
Default is false
ZOHO_SEARCH_BOX 
(optional)
true/falseControls to display the search box in the table
ZOHO_IS_SECURE 
(optional)
true/falseControls to access the url in secure mode or not (http or https)
ZOHO_LEGEND_POSITION 
(optional)
  • RIGHT
  • LEFT
  • TOPLEFT
  • TOPRIGHT
  • TOPCENTER
  • BOTTOMLEFT
  • BOTTOMRIGHT
  • BOTTOMCENTER
  • NONE
Controls to display the position on the legend
ZOHO_EXPORT_PERMISSION
(optional)
true/falseDefault is false.
If set as true, then the view have the permission to export the data.
If set as false, then the view don’t have the permission to export the data.

 

Sample Request:

https://<server_hostname>:<portnumber>/api/demouser/EmployeeDB/EmployeeDetails?ZOHO_ACTION=GETEMBEDURL &ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON &authtoken=g38sl4j4856guvncrywox8251sssds&ZOHO_API_VERSION=1.0

 

Sample Response XML Format:

<response uri="/api/abc@zoho.com/SalesDB/Sales" action="GETEMBEDURL">
<result>
<embedurl>https://<server_hostname>:8443/ZDBDataSheetView.cc?&
OBJID=100000000000026025&REMTOOLBAR=>true&FS=OS
&RSCONFIG=Ksp6SkShM5/PySm0q3lMQC4lNc6BUVBGQC4wp+YS6ahHG8e1j
035yQrpZwAZdq7I
</embedurl>
</result>
</response>

 

Sample Response JSON Format:

{
"response":
{
"uri":"\/api\/abc@zoho.com\/SalesDB\/Sales",
"action":"GETEMBEDURL",
"result": {"embedUrl":"https://<server_hostname>:8443/ZDBDataSheetView.cc?&
OBJID=100000000000026025&REMTOOLBAR=true&FS=OS
&RSCONFIG=Ksp6SkShM5/PySm0q3lMQC4lNc6BUVBGQC4wp+YS6ahHG8e1j
035yQrpZwAZdq7I"}
}
}

Error handling in embed

This section explains about the error response sent from the Analytics Plus server on failure of Embed APIs. The sample error response is below.

 

ERROR CODES

Error CodeReasonSolution
7103The database name specified in the API request URL does not existCheck the database name in the request URL and provide a valid database name
7138The view name specified in the API request URL does not exist.Check the view name in the request URL and provide a valid view name
8023You do not have required permission to perform this operation.Kindly contact our support team .


In case of any error other than the above said, mail the API request URL parameters and error response details to analyticsplus-support@manageengine.com. Analytics Plus will get back to you with the best possible solution.

Share this post : FacebookTwitter