Copiedcurl -d "ZOHO_ACTION=DELETE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
&ZOHO_API_VERSION=1.0
&ZOHO_CRITERIA=("Department" = 'Finance')"
-H "Authorization:Zoho-oauthtoken <access_token>"
https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Copiedusing ZReports;
namespace Test
{
CLIENT_ID = "************";
CLIENT_SECRET = "************";
REFRESH_TOKEN = "************";
EMAIL = "Email Address";
DBNAME = "Workspace Name";
TBNAME = "Table Name";
class Program
{
public IReportClient getClient()
{
IReportClient RepClient = new ReportClient(CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN);
return RepClient;
}
public void deleteRow(IReportClient RepClient)
{
string tableURI = RepClient.GetURI(EMAIL, DBNAME, TBNAME);
string criteria = "\"Region\"='South'";
RepClient.DeleteData(tableURI, criteria, null);
}
static void Main(string[] args)
{
Program obj = new Program();
IReportClient rc = obj.getClient();
obj.deleteRow(rc);
}
}
}
Copiedpackage main
import (
"fmt"
"zoho/pkg/reportclient"
)
var(
clientid = "************"
clientsecret = "************"
refreshtoken = "************"
)
func deletedata() {
url := reportclient.GetUri("Email Address", "Workspace Name", "Table Name")
params := map[string]string{}
params["ZOHO_CRITERIA"] = "Id=2"
resp,err := reportclient.DeleteData(url, params)
if(err != nil){
fmt.Println(err.ErrorMessage)
fmt.Println(err.ErrorCode)
fmt.Println(err.Action)
fmt.Println(err.HttpStatusCode)
}else{
fmt.Println(resp)
}
}
func main() {
reportclient.SetOAuthToken(clientid, clientsecret, refreshtoken)
deletedata()
}
Copiedimport com.adventnet.zoho.client.report.*;
public class Sample
{
String clientId = "************";
String clientSecret = "************";
String refreshToken = "************";
private ReportClient rc = new ReportClient(clientId, clientSecret, refreshToken);
public void deletedata() throws Exception
{
String uri = rc.getURI("Email Address","Workspace Name","Table Name");
String criteria = "No=12";
Long result = rc.deleteData(uri,criteria,null);
System.out.println(result);
}
public static void main(String[] args) throws Exception
{
Sample obj = new Sample();
obj.deletedata();
}
}
Copied<?php
require 'ReportClient.php';
$CLIENT_ID = "************";
$CLIENT_SECRET = "************";
$REFRESH_TOKEN = "************";
$request = new ReportClient($CLIENT_ID, $CLIENT_SECRET, $REFRESH_TOKEN);
$uri = $request->getURI("Email Address", "Workspace Name", "Table Name");
$criteria = "Experience = 3";
$resp = $request->deleteData($uri ,$criteria);
print_r($resp);
?>
Copiedfrom __future__ import with_statement
from ReportClient import ReportClient
import sys
class Sample:
CLIENTID="************"
CLIENTSECRET="************"
REFRESHTOKEN="************"
rc = None
rc = ReportClient(REFRESHTOKEN, CLIENTID, CLIENTSECRET)
def DeleteData(self,rc):
uri = rc.getURI("Email Address","Workspace Name","Table Name")
criteria = "No=1001"
result = rc.deleteData(uri,criteria,None);
print result
obj = Sample()
obj.DeleteData(obj.rc)
Copiedvar nodelib = require('./ZAnalyticsClient');
var clientId = '************';
var clientSecret = '************';
var refreshtoken = '************';
var emailId = 'EmailAddress';
var workspaceName = 'WorkspaceName';
var viewName = 'ViewName';
nodelib.initialize(clientId, clientSecret, refreshtoken).then(() => {
var params = {};
params['ZOHO_CRITERIA'] = '\"Country\"=\'France\'';
var uripath = nodelib.getUri(emailId, workspaceName, viewName);
nodelib.deleteData(uripath, params).then((response) => {
console.log(response);
}).catch((error) => {
console.log('Error : '+error.message);
});
}).catch((error) => {
console.log('Authentication Error : '+error);
});
Copiedemail = zoho.encryption.urlEncode("");
workspaceName = zoho.encryption.urlEncode("");
viewName = zoho.encryption.urlEncode("");
paramsMap = Map();
oauthParams = Map();
headers = Map();
//AUTHENTICATION PARAMS
oauthParams.put("client_id","********");
oauthParams.put("client_secret","********");
oauthParams.put("refresh_token","********");
oauthParams.put("grant_type","refresh_token");
tokenInfo = invokeurl
[
url :"https://accounts.zoho.com/oauth/v2/token"
type :POST
parameters:oauthParams
];
if(tokenInfo.containKey("access_token"))
{
accessToken = tokenInfo.get("access_token");
headers.put("Authorization","Zoho-oauthtoken ".concat(accessToken));
}
else
{
info tokenInfo;
return;
}
//COMMON PARAMS
paramsMap.put("ZOHO_ACTION","DELETE");
paramsMap.put("ZOHO_OUTPUT_FORMAT","JSON");
paramsMap.put("ZOHO_ERROR_FORMAT","JSON");
paramsMap.put("ZOHO_API_VERSION","1.0");
//ACTION SPECIFIC PARAMS
paramsMap.put("ZOHO_CRITERIA","");
response = invokeurl
[
url :"https://analyticsapi.zoho.com/api/" + email + "/" + workspaceName + "/" + viewName
type :POST
parameters:paramsMap
headers:headers
];
info response;