Get Linked Workspace Sync Details
Get the sync details of the workspaces linked to the specified master workspace, including the entities pending sync.
REQUEST URI
https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/linkedworkspaces/sync
Get
oauthscope: ZohoAnalytics.metadata.read
QUERY PARAMETERS
| Description |
|---|---|
| CONFIG | JSONObject Config parameter specifications are available in the below section. If not specified, the sync details of all the linked workspaces are returned. |
FIELDS FOR CONFIG JSON
| Description |
|---|---|
| sandboxIds | JSONArray of String The sandbox IDs of the linked workspaces whose sync details are required. Specify each sandbox ID as a string. Supports 1 to 100 entries. Maximum length - 5000 characters. Each sandbox ID must be linked to the master workspace. This attribute is mandatory when CONFIG is specified. Sample: {"sandboxIds":["137687000012345001","137687000012345002"]} |
Note: To get the sync details of all the linked workspaces, do not specify CONFIG. An empty CONFIG such as {} is not supported.
Sample Request:
Copiedcurl "https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/linkedworkspaces/sync?CONFIG=%7B%22sandboxIds%22%3A%5B%22137687000012345001%22%2C%22137687000012345002%22%5D%7D" \
-H 'ZANALYTICS-ORGID: <org-id>' \
-H 'Authorization: Zoho-oauthtoken <access_token>'Copiedusing System;
using System.Collections.Generic;
using System.Text.Json;
using ZohoAnalytics;
namespace ZohoAnalyticsTest
{
class Program
{
long orgId = 55522777;
long workspaceId = 35130000001055707;
public void GetLinkedWorkspaceSyncDetails(IAnalyticsClient ac)
{
List<long> sandboxIds = new List<long>();
sandboxIds.Add(137687000012345001L);
sandboxIds.Add(137687000012345002L);
IWorkspaceAPI workspace = ac.GetWorkspaceInstance(orgId, workspaceId);
JsonElement result = workspace.GetLinkedWorkspaceSyncDetails(sandboxIds, null);
Console.WriteLine(result);
}
static void Main(string[] args)
{
string clientId = "1000.xxxxxxx";
string clientSecret = "xxxxxxx";
string refreshToken = "1000.xxxxxxx.xxxxxxx";
IAnalyticsClient ac = new AnalyticsClient(clientId, clientSecret, refreshToken);
Program obj = new Program();
obj.GetLinkedWorkspaceSyncDetails(ac);
}
}
}Copiedpackage main
import (
"fmt"
ZAnalytics "zoho/pkg/analyticsclient"
)
var (
clientId = "1000.xxxxxxx"
clientSecret = "xxxxxxx"
refreshToken = "1000.xxxxxxx.xxxxxxx"
orgId = "55522777"
workspaceId = "35130000001055707"
)
func GetLinkedWorkspaceSyncDetails(ac ZAnalytics.Client) {
sandboxids := []string{"137687000012345001", "137687000012345002"}
workspace := ZAnalytics.GetWorkspaceInstance(&ac, orgId, workspaceId)
result, exception := workspace.GetLinkedWorkspaceSyncDetails(sandboxids, nil)
if exception != nil {
fmt.Println(exception.ErrorMessage)
return
}
fmt.Println(result)
}
func main() {
ac := ZAnalytics.GetAnalyticsClient(clientId, clientSecret, refreshToken)
GetLinkedWorkspaceSyncDetails(ac)
}Copiedimport com.zoho.analytics.client.*;
import org.json.*;
public class Test {
private long orgId = 55522777l;
private long workspaceId = 35130000001055707l;
public static void main(String args[]) {
String clientId = "1000.xxxxxxx";
String clientSecret = "xxxxxxx";
String refreshToken = "1000.xxxxxxx.xxxxxxx";
Test tObj = new Test();
AnalyticsClient ac = new AnalyticsClient(clientId, clientSecret, refreshToken);
try {
tObj.getLinkedWorkspaceSyncDetails(ac);
} catch (Exception ex) {
ex.printStackTrace();
}
}
public void getLinkedWorkspaceSyncDetails(AnalyticsClient ac) throws Exception {
JSONArray sandboxIds = new JSONArray();
sandboxIds.put("137687000012345001");
sandboxIds.put("137687000012345002");
WorkspaceAPI workspace = ac.getWorkspaceInstance(orgId, workspaceId);
JSONArray result = workspace.getLinkedWorkspaceSyncDetails(sandboxIds, null);
System.out.println(result);
}
}Copied<?php
require 'AnalyticsClient.php';
class Test {
public $ac;
public $org_id = "55522777";
public $workspace_id = "35130000001055707";
function __construct() {
$this->ac = new AnalyticsClient("1000.xxxxxxx", "xxxxxxx", "1000.xxxxxxx.xxxxxxx");
}
function getLinkedWorkspaceSyncDetails() {
$sandbox_ids = array("137687000012345001", "137687000012345002");
$workspace = $this->ac->getWorkspaceInstance($this->org_id, $this->workspace_id);
$response = $workspace->getLinkedWorkspaceSyncDetails($sandbox_ids);
print_r($response);
}
}
$obj = new Test();
$obj->getLinkedWorkspaceSyncDetails();
?>Copiedfrom AnalyticsClient import AnalyticsClient
class Config:
CLIENTID = "1000.xxxxxxx"
CLIENTSECRET = "xxxxxxx"
REFRESHTOKEN = "1000.xxxxxxx.xxxxxxx"
ORGID = "55522777"
WORKSPACEID = "35130000001055707"
class Sample:
ac = AnalyticsClient(Config.CLIENTID, Config.CLIENTSECRET, Config.REFRESHTOKEN)
def get_linked_workspace_sync_details(self, ac):
sandbox_ids = ["137687000012345001", "137687000012345002"]
workspace = ac.get_workspace_instance(Config.ORGID, Config.WORKSPACEID)
result = workspace.get_linked_workspace_sync_details(sandbox_ids)
print(result)
obj = Sample()
obj.get_linked_workspace_sync_details(obj.ac)Copiedvar analyticsClient = require('./AnalyticsClient');
var ac = new analyticsClient('1000.xxxxxxx', 'xxxxxxx', '1000.xxxxxxx.xxxxxxx');
var orgId = '55522777';
var workspaceId = '35130000001055707';
var sandboxIds = ["137687000012345001", "137687000012345002"];
var workspace = ac.getWorkspaceInstance(orgId, workspaceId);
workspace.getLinkedWorkspaceSyncDetails(sandboxIds).then((result) => { console.log(result); }).catch((error) => { console.log(error); });CopiedorgId = "55522777";
workspaceId = "35130000001055707";
headersMap = Map();
headersMap.put("ZANALYTICS-ORGID", orgId);
config = {"sandboxIds": ["137687000012345001", "137687000012345002"]};
response = invokeurl
[
url :"https://analyticsapi.zoho.com/restapi/v2/workspaces/" + workspaceId + "/linkedworkspaces/sync?CONFIG=" + zoho.encryption.urlEncode(config.toString())
type :GET
headers:headersMap
connection:"analytics_oauth_connection"
];
info response;Copiedrequire 'zoho_analytics_client'
class Config
ORGID = "55522777"
WORKSPACEID = "35130000001055707"
end
class Sample
def initialize
@ac = AnalyticsClient.new.with_data_center("US").with_oauth({
"clientId" => "1000.xxxxxxx",
"clientSecret" => "xxxxxxx",
"refreshToken" => "1000.xxxxxxx.xxxxxxx"
}).build
end
def get_linked_workspace_sync_details
sandbox_ids = ["137687000012345001", "137687000012345002"]
workspace = @ac.get_workspace_instance(Config::ORGID, Config::WORKSPACEID)
result = workspace.get_linked_workspace_sync_details(sandbox_ids)
puts result
end
end
obj = Sample.new
obj.get_linked_workspace_sync_detailsDownload client libraries: C# | GO | JAVA | PHP | PYTHON | NodeJS | Ruby
Sample value for CONFIG parameter:
Copied{
"sandboxIds": [
"137687000012345001",
"137687000012345002"
]
}Sample Response:
CopiedHTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
{
"status": "success",
"summary": "Get linked workspace sync details",
"data": {
"workspaces": [
{
"sandboxId": "137687000012345001",
"workspaceId": "466206000000071000",
"workspaceName": "Northwind Sandbox",
"lastSync": {
"syncTime": "1779226560981",
"syncStatus": "partialSuccess",
"syncedBy": "jane.doe@example.com",
"syncedByName": "Jane Doe",
"syncedByZuId": "60002000000000123",
"entities": {
"dataSources": [
{
"datasourceName": "Books Connection",
"status": "success",
"message": "Compatible"
}
],
"tables": [
{
"viewId": "137687000006991601",
"viewName": "Sales_Fact",
"viewType": "Table",
"viewTypeId": 0,
"status": "success",
"message": "Compatible"
}
],
"views": [
{
"viewId": "466206000000105001",
"viewName": "Revenue by Region",
"viewType": "Chart View",
"viewTypeId": 2,
"status": "failure",
"message": "Formula column missing in client workspace"
}
]
}
},
"hasPendingEntities": true,
"pendingEntities": {
"dataSources": [],
"tables": [
{
"viewId": "137687000006991601",
"viewName": "Sales_Fact",
"viewType": "Table",
"viewTypeId": 0,
"modifiedStatus": "updated"
}
],
"views": [
{
"viewId": "466206000000105001",
"viewName": "Revenue by Region",
"viewType": "Chart View",
"viewTypeId": 2,
"modifiedStatus": "created"
}
]
}
}
]
}
}