I want to get the data from zoho reporter and get the data in list.
I am creating a function in Zoho Creator.
In function, i want to get the data from zoho reporter and get the data in list.
How this is possible ?
Code is :
ticketDetails = getUrl(("https://accounts.zoho.com/login?servicename=ZohoReports&FROM_AGENT=true&LOGIN_ID=<your username>&PASSWORD=<your password>"));
ticket = (ticketDetails.toString()).subString(((ticketDetails).indexOf("TICKET=") + 7),((ticketDetails).indexOf("RESULT") - 1));
query = "select * from Products";//Sample Query
url = ((("http://reports.zoho.com/api/<ZOHO USERNAME>/<DATABASE NAME>/<TABLE NAME>?ZOHO_ACTION=EXPORT&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=XML&ZOHO_API_KEY=493ac846aaf440ed9b5c040865b2e076&ticket=") + ticket) + "&ZOHO_API_VERSION=1.0&ZOHO_SQLQUERY=") + query;
response = getUrl(url);
result = response.executeXPath("/root/response/result/rows/text()");