Analytics-Plus Help

Metadata API 

This section lists all the metadata APIs. Metadata API's can be used to fetch information about the reporting databases,tables, reports and dashboards created in Analytics Plus.

 

Database Metadata

Using the Database Metadata API, you can get the following meta information.

 

  • List of Reporting Databases in your account

  • List of Views and View Information in your Reporting Database

  • Different views available in Analytics Plus

  • Datatypes available in Analytics Plus

 

URL

https://<server_hostname>:<portnumber>/api/<Email>/<DatabaseName>


URL PARAMETERS

Parameter NamePossible ValuesDescription
ZOHO_ACTIONDATABASEMETADATAThis parameter specifies the action to be performed by the API request.
ZOHO_METADATAThe supported values are:
  • ZOHO_CATALOG_LIST: To list the reporting databases for the specified user
  • ZOHO_CATALOG_INFO: To fetch information about the tables & reports (view) present in the given reporting database in Analytics Plus.
  • ZOHO_DATATYPES: To get the list of datatypes supported by Analytics Plus
  • ZOHO_TABLETYPES: Various view types available in Analytics Plus
specifies the information to be fetched.
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/SalesDB?ZOHO_ACTION=DATABASEMETADATA&ZOHO_METADATA=<METADATA_INFO_PARAMETER> &ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML& authtoken=g38sl4j4856guvncrywox8251sssds&ZOHO_API_VERSION=1.0

 

Sample Response XML Format:

<response URI="/api/abc@zoho.com/SalesDB" ACTION="ZOHO_CATALOG_LIST">
<ZCATALOGS>
<ZCATALOG IS_DEFAULT="1" TABLE_CAT="SalesDB"></ZCATALOG>
<ZCATALOG IS_DEFAULT="0" TABLE_CAT="Super Store Sales"></ZCATALOG>
<ZCATALOG IS_DEFAULT="0" TABLE_CAT="Project Manager"></ZCATALOG>
</ZCATALOGS>
</response>

 

Sample Response JSON Format:

{
"response":
{
"uri": "\/api\/abc@zoho.com/SalesDB",
"action": "ZOHO_CATALOG_LIST",
"result":
[
{
"isDefault": true,
"tableCat": "SalesDB"
},
{
"isDefault": false,
"tableCat": "Super Store Sales"
},
{
"isDefault": false,
"tableCat": "Project Manager"
}
]
}
}

 

GETTING DATABASES (CATALOG) LIST

To list the reporting databases for the specified user

 

URL

https://<server_hostname>:<portnumber>/api/<Email>/<DatabaseName>

 

URL PARAMETERS 

Parameter NamePossible ValuesDescription
ZOHO_ACTIONDATABASEMETADATAThis parameter specifies the action to be performed by the API request.
ZOHO_METADATAZOHO_CATALOG_LISTTo list the reporting databases for the specified user
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 Url

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

 

Sample response XML Format

<RESPONSE URI="/api/abc@zoho.com/SalesDB" ACTION="ZOHO_CATALOG_LIST">

<ZCATALOGS>

<ZCATALOG CREATEDTIME="1484737186344" IS_DEFAULT="false" TABLE_CAT="Fed"></ZCATALOG>

</ZCATALOGS>

</RESPONSE>

 

Sample response JSON Format

{
"response":
{
"uri": "\/api\/abc@zoho.com/SalesDB",

"action": "ZOHO_CATALOG_LIST",
    "result": [
      {
        "createdtime": 1484737186344,
        "isDefault": false,
        "tableCat": "Fed"
      }
    ]
  }
}

 

GETTING TABLES AND REPORTS IN A DATABASE (CATALOG INFORMATION)

To fetch information about the tables & reports (view) present in the given reporting database in
Analytics Plus.

  

URL PARAMETERS

Parameter NamePossible ValuesDescription
ZOHO_ACTIONDATABASEMETADATAThis parameter specifies the action to be performed by the API request.
ZOHO_METADATAZOHO_CATALOG_INFOTo fetch information about the tables & reports (view) present in the given reporting database in Analytics Plus.
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 for fetching information about the tables, reports and dashboards available in a reporting database, SalesDB.

In the query string of the URL, the ZOHO_ACTION parameter should be DATABASEMETADATA and ZOHO_METADATA parameter should be ZOHO_CATALOG_INFO.

 

Sample URL

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

 

Sample Responses for Catalog Information

 

XML Format:

<response URI="/api/abc@zoho.com/SalesDB" ACTION="ZOHO_CATALOG_INFO">
<ZCATALOG TABLE_CAT="Fed">
<ZVIEW TABLE_NAME="Cost Across Year" REMARKS="Cost across Year (based on Date)" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Cost Across Year by Product Category" REMARKS="Cost across Year (based on Date) by Product Category" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Cost Across Year by Region" REMARKS="Cost across Year (based on Date) by Region" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Cost Analysis Dashboards" REMARKS="A complete analysis on Cost" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Cost by Year and Region" REMARKS="Total Cost by each Year (based on Date) and Region" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Product Category-wise Cost" REMARKS="Product Category-wise split up of Cost. Average of Cost plotted as Threshold value" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Product Category-wise Cost by Region" REMARKS="Product Category-wise split up of Cost by Region" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Product Category-wise Sales" REMARKS="Product Category-wise split up of Sales. Average of Sales plotted as Threshold value" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Product Category-wise Sales by Region" REMARKS="Product Category-wise split up of Sales by Region" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Product-wise Cost" REMARKS="Product-wise split up of Cost. Product sorted in Ascending order based on Cost" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Product-wise Sales" REMARKS="Product-wise split up of Sales. Product sorted in Ascending order based on Sales" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Region-wise Cost" REMARKS="Region-wise split up of Cost" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Region-wise Sales" REMARKS="Region-wise split up of Sales" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Running Total of Cost Across Year" REMARKS="Running Total of Cost across Year (based on Date)" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Sales Across Year" REMARKS="Sales across Year (based on Date)" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Sales Across Year by Product Category" REMARKS="Sales across Year (based on Date) by Product Category" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Sales Across Year by Region" REMARKS="Sales across Year (based on Date) by Region" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Sales Analysis Dashboards" REMARKS="A complete analysis on Sales" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Sales and Cost for Region and Product Category by Year" REMARKS="Total Sales and Cost for each Region and Product Category by each Year (based on Date)" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Sales for Region and Product Category by Year" REMARKS="Total Sales for each Region and Product Category by each Year (based on Date)" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Sales vs Cost" REMARKS="Comparison between Sales and Cost in a Scatter plot" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Sales vs Cost Across Year" REMARKS="Comparison between Sales and Cost across Year (based on Date)" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Sales vs Cost by Product Category" REMARKS="Comparison between Sales and Cost across Product Category" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Sales vs Cost by Region" REMARKS="Comparison between Sales and Cost across Region" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Sales VS Cost Dashboards" REMARKS="Comparison between Sales and Cost" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="StoreSales" REMARKS="\N" TABLE_TYPE="TABLE">
<ZCOLUMNS>

<ZCOLUMN TYPE_NAME="Auto" PKTABLE_NAME="\N" REMARKS="\N" COLUMN_NAME="__ZDBID" ORDINAL_POSITION="0" PKCOLUMN_NAME="\N" NULLABLE="false" DECIMAL_DIGITS="-1" DATA_TYPE="-5" COLUMN_SIZE="19"></ZCOLUMN>

<ZCOLUMN TYPE_NAME="Date" PKTABLE_NAME="\N" REMARKS="\N" COLUMN_NAME="Date" ORDINAL_POSITION="1" PKCOLUMN_NAME="\N" NULLABLE="true" DECIMAL_DIGITS="-1" DATA_TYPE="93" COLUMN_SIZE="19"></ZCOLUMN>

<ZCOLUMN TYPE_NAME="Plain Text" PKTABLE_NAME="\N" REMARKS="\N" COLUMN_NAME="Region" ORDINAL_POSITION="2" PKCOLUMN_NAME="\N" NULLABLE="true" DECIMAL_DIGITS="-1" DATA_TYPE="12" COLUMN_SIZE="100"></ZCOLUMN>

<ZCOLUMN TYPE_NAME="Plain Text" PKTABLE_NAME="\N" REMARKS="\N" COLUMN_NAME="Product Category" ORDINAL_POSITION="3" PKCOLUMN_NAME="\N" NULLABLE="true" DECIMAL_DIGITS="-1" DATA_TYPE="12" COLUMN_SIZE="100"></ZCOLUMN>

<ZCOLUMN TYPE_NAME="Plain Text" PKTABLE_NAME="\N" REMARKS="\N" COLUMN_NAME="Product" ORDINAL_POSITION="4" PKCOLUMN_NAME="\N" NULLABLE="true" DECIMAL_DIGITS="-1" DATA_TYPE="12" COLUMN_SIZE="100"></ZCOLUMN>

<ZCOLUMN TYPE_NAME="Plain Text" PKTABLE_NAME="\N" REMARKS="\N" COLUMN_NAME="Customer Name" ORDINAL_POSITION="5" PKCOLUMN_NAME="\N" NULLABLE="true" DECIMAL_DIGITS="-1" DATA_TYPE="12" COLUMN_SIZE="100"></ZCOLUMN>

<ZCOLUMN TYPE_NAME="Currency" PKTABLE_NAME="\N" REMARKS="\N" COLUMN_NAME="Sales" ORDINAL_POSITION="6" PKCOLUMN_NAME="\N" NULLABLE="true" DECIMAL_DIGITS="2" DATA_TYPE="8" COLUMN_SIZE="19"></ZCOLUMN>

<ZCOLUMN TYPE_NAME="Currency" PKTABLE_NAME="\N" REMARKS="\N" COLUMN_NAME="Cost" ORDINAL_POSITION="7" PKCOLUMN_NAME="\N" NULLABLE="true" DECIMAL_DIGITS="2" DATA_TYPE="8" COLUMN_SIZE="19"></ZCOLUMN>
</ZCOLUMNS></ZVIEW>
<ZVIEW TABLE_NAME="Top 10 Customer Name by Cost" REMARKS="Top 10 Customer Name with more Cost" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Top 10 Customer Name by Sales" REMARKS="Top 10 Customer Name with more Sales" TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEW TABLE_NAME="Year to Date(YTD) Sales by each Year" REMARKS="Year to Date(YTD) Sales by each Year (based on Date)" TABLE_TYPE="REPORT"></ZVIEW></ZCATALOG>
</RESPONSE>

 

JSON Format:


{
"response":
{
"uri": "\/api\/abc@zoho.com\/SalesDB",

"action": "ZOHO_CATALOG_INFO",
    "result": {
      "views": [
        {
          "tableName": "Cost Across Year",
          "remarks": "Cost across Year (based on Date)",
          "tableType": "REPORT",
          "columns": []
        }

 

GETTING DATATYPE INFORMATION

The following table lists the common DATA TYPE numbers and its corresponding TYPE NAMES.

 

Data Type NumberType Name
12Plain Text / Multi Line Text / Email / URL
-7Yes / No Decision
8Percent / Currency / Decimal Number
-5Number / Auto Number / Positive Number
93Date

 

URL

https://<server_hostname>:<portnumber>/api/<Email>/<DatabaseName>

 

URL PARAMETERS

Parameter NamePossible ValuesDescription
ZOHO_ACTIONDATABASEMETADATAThis parameter specifies the action to be performed by the API request.
ZOHO_METADATAZOHO_DATATYPESTo get the list of datatypes supported by Analytics Plus
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 URL

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

Sample Responses for Datatype Information

XML Format:

<response URI="/api/abc@zoho.com/SalesDB" ACTION="ZOHO_DATATYPES">
<ZDATATYPES>

<ZDATATYPE LOCAL_TYPE_NAME="" UNSIGNED_ATTRIBUTE="false" SQL_DATETIME_SUB="0" MINIMUM_SCALE="\N" CREATE_PARAMS="" PRECISION="-1" LITERAL_PREFIX="&apos;" NULLABLE="1" NUM_PREC_RADIX="10" SQL_DATA_TYPE="12" AUTO_INCREMENT="false" TYPE_NAME="Multi Line Text" CASE_SENSITIVE="true" FIXED_PREC_SCALE="false" ZNAME="Multi Line Text" SEARCHABLE="0" MAXSIZE="500" MAXIMUM_SCALE="\N" LITERAL_SUFFIX="&apos;" DATA_TYPE="12"></ZDATATYPE>

</ZDATATYPES>
</response>

 

JSON Format

{
"response":
{
"uri": "\/api\/abc@zoho.com/SalesDB",
"action": "ZOHO_DATATYPES",
"result":
[

{
"localTypeName": "",
"unsignedAttribute": false,
"sqlDatetimeSub": "0",
"minimumScale": null,
"createParams": "",
"precision": -1,
"literalPrefix": "\'",
"nullable": true,
"numPrecRadix": "10",
"sqlDataType": 12,
"autoIncrement": false,
"typeName": "Multi Line Text",
"caseSensitive": true,
"fixedPrecScale": false,
"zname": "Multi Line Text",
"searchable": false,
"maxsize": 500,
"maximumScale": null,
"literalSuffix": "\'",
"dataType": 12
}

 

GETTING TABLE TYPES 

The following table lists the common TABLETYPES.

 

Actual ViewTABLETYPE Value
TablesTABLE
Query TablesVIEW
Charts / Pivots / Tabular Views / Summary Views / DashboardsREPORT

 

URL

https://<server_hostname>:<portnumber>/api/<Email>/<DatabaseName>

 

URL PARAMETERS

Parameter NamePossible ValuesDescription
ZOHO_ACTIONDATABASEMETADATAThis parameter specifies the action to be performed by the API request.
ZOHO_METADATAZOHO_TABLETYPESVarious view types available in Analytics Plus
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.

 

RESPONSE ATTRIBUTES 

In this section, we have described the detailed explanation of the attribute / property we used in DATABASEMETADATA APIs.

 

Attribute/PropertyDescription
IS_DEFAULT/isDefaultIndicates whether a reporting database is set as the default. Can be used to set default database for third party tools that loads reporting databases using JDBC Driver.
TABLE_CAT/tableCatReporting database name (ex: SalesDB)
COLUMN_NAME/columnNameName of the column in table type views (ex: Region)
LITERAL_PREFIXPrefix character used when literal values found (ex: '45’)
NULLABLEWill be true if the column can contain null value, false otherwise.
MAXSIZEMaximum size of the column (ex: 20)
TYPE_NAMEAnalytics Plus name for the data type (ex: Positive Number)

 

Note:\N in XML response refer to the NULL value

 

Sample URL

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

 

Sample Responses for Table Types 

XML Format:

<response URI="/api/abc@zoho.com/SalesDB" ACTION="ZOHO_TABLETYPES"><ZVIEWTYPES >

<ZVIEWTYPE TYPE="TABLE"></ZVIEWTYPE>

<ZVIEWTYPE TYPE="VIEW"></ZVIEWTYPE>

<ZVIEWTYPE TYPE="REPORT"></ZVIEWTYPE>
</ZVIEWTYPES>
</RESPONSE>

 

JSON Format

{
"response":
{
"uri": "\/api\/abc@zoho.com/SalesDB",
"action": "ZOHO_TABLETYPES",
"result": [
"TABLE",
"VIEW",
"REPORT"
]
}
}

 

GET DATABASE NAME

This API returns the name of a database in Analytics Plus given its Database ID as input. Database ID's are unique identifiers that is associated with each reporting database created in Analytics Plus.

 

URL

https://<server_hostname>:<portnumber>/api/<Email>/<DatabaseName>

 

URL PARAMETERS

Parameter NamePossible ValuesDescription
ZOHO_ACTIONGETDATABASENAMEThis parameter specifies the action to be performed by the API request.
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

Parameter NamePossible ValuesDescription
DBID 
(mandatory)
A Long number like 9999999999999The DBID of the Analytics Plus Reporting Database which can be taken from database URL

 

Sample Request:

https://<server_hostname>:<portnumber>/api/abc@zoho.com/SalesDB?ZOHO_ACTION=GETDATABASENAME&DBID=999999999999999
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_API_VERSION=1.0&authtoken=8b30a900d73sjc7392n8923dkf983k

 

Sample Response XML Format:

<response uri="/api/abc@zoho.com/SalesDB" action="GETDATABASENAME">
<dbname>Employee</dbname>
</response>

 

Sample Response JSON Format:

{
"response":
{
"uri": "\/api\/abc@zoho.com/SalesDB",
"action": "GETDATABASENAME",
"result":
{
"dbname": "Employee"
}
}
}

 

GET VIEW NAME

This API returns the name of a view in Analytics Plus given its View ID as input. View ID's are unique identifiers that is associated with each view (tables, reports and dashboards) that is created in Analytics Plus.

 

URL

https://<server_hostname>:<portnumber>/api/<Email>/<DatabaseName>


URL PARAMETERS

Parameter NamePossible ValuesDescription
ZOHO_ACTIONGETVIEWNAMEThis parameter specifies the action to be performed by the API request.
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

Parameter NamePossible ValuesDescription
OBJID
(mandatory)
A Long number like 9999999999999The ID of the view which can be taken from the corresponding view URL.

 

Sample Request:

https://<server_hostname>:<portnumber>/api/abc@zoho.com/SalesDB?ZOHO_ACTION=GETVIEWNAME&OBJID=999999999999999
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_API_VERSION=1.0&authtoken=8b30a900d73sjc7392n8923dkf983k

 

Sample Response XML Format:

<response uri="/api/abc@zoho.com/SalesDB" action="GETVIEWNAME">
<viewname>Employee Details</viewname>
</response>

 

Sample Response JSON Format:

{
"response":
{
"uri": "\/api\/abc@zoho.com/SalesDB",
"action": "GETVIEWNAME",
"result":
{
"viewname": "Employee Details"
}
}
}

 

GET INFO

This API returns the Database ID (DBID) and View ID (OBJID) of the corresponding Database and View Name provided as input for the API.

 

URL

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

 

URL PARAMETERS 

Parameter NamePossible ValuesDescription
ZOHO_ACTIONGETINFOThis parameter specifies the action to be performed by the API request.
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=GETINFO
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_API_VERSION=1.0&authtoken=8b30a900d73sjc7392n8923dkf983k

 

Sample Response XML Format:

<response uri="/api/abc@zoho.com/Employee/EmployeeDetails" action="GETINFO">
<result>
<objid>1201</objid>
<dbid>301</dbid>
</result></response>

 

Sample Response JSON Format:

{
"response": {
"uri": "/api/abc@zoho.com/Fed/StoreSales",
"action": "GETINFO",
"result": {
"objid": "1201",
"dbid": "301"
}
}
}

 

ERROR HANDLING IN METADATA

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

 

ERROR CODES

Error CodeReasonSolution
7102The database name specified in the API request URL is empty.Check the API Request URL and provide the Database Name
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
7104The 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

 

Sample error XML Format:

<response uri="/api/abc@zoho.com/Employee" action="DATABASEMETADATA">
<error>
<code>7103</code>
<message>
Database not found! Please check whether the database exists
</message>
</error>
</response>

 

Sample error JSON Format:

{
"response":
{
"uri": "\/api\/abc@zoho.com\/Employee",
"action": "DATABASEMETADATA",
"error":
{
"code":7103,
"message": "Database not found! Please check whether
the database exists"
}
}
}

 

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