Class WorkspaceAPI
WorkspaceAPI contains workspace level operations.
Inheritance
Implements
Inherited Members
Namespace: ZohoAnalytics
Assembly: ZohoAnalytics.dll
Syntax
public class WorkspaceAPI : IWorkspaceAPI
Methods
AddAdmins(List<String>, Dictionary<String, Object>)
Add admins for the specified workspace.
Declaration
public void AddAdmins(List<string> emailIds, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
List<System.String> | emailIds | The email address of the admin users to be added. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
AddDefault()
Adds a specified workspace as default.
Declaration
public void AddDefault()
AddFavorite()
Adds a specified workspace as favorite.
Declaration
public void AddFavorite()
AddGroupMembers(Int64, List<String>, Dictionary<String, Object>)
Add users to the specified group.
Declaration
public void AddGroupMembers(long groupId, List<string> emailIds, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | groupId | The id of the group. |
List<System.String> | emailIds | The email address of the users to be added to the group. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
AddWorkspaceUsers(List<String>, String, Dictionary<String, Object>)
Add users to the specified workspace.
Declaration
public void AddWorkspaceUsers(List<string> emailIds, string role, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
List<System.String> | emailIds | The email address of the users to be added. |
System.String | role | Role of the users to be added. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
ChangeEmailScheduleStatus(Int64, String)
Rename a specified column in the table.
Declaration
public void ChangeEmailScheduleStatus(long scheduleId, string operation)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | scheduleId | Id for the email schedule. |
System.String | operation | New status for the schedule ( Values - activate | deactivate ) |
ChangeFolderHierarchy(Int64, Int32, Dictionary<String, Object>)
Swaps the hierarchy of a parent folder and a subfolder.
Declaration
public void ChangeFolderHierarchy(long folderId, int hierarchy, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | folderId | Id of the folder. |
System.Int32 | hierarchy | New hierarchy for the folder. (0 - Parent; 1 - Child) |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
ChangeFolderPosition(Int64, Int64, Dictionary<String, Object>)
Place the folder above the reference folder.
Declaration
public void ChangeFolderPosition(long folderId, long referenceFolderId, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | folderId | Id of the folder. |
System.Int64 | referenceFolderId | Id of the reference folder. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
ChangeWorkspaceUserRole(List<String>, String, Dictionary<String, Object>)
Change role for the specified users.
Declaration
public void ChangeWorkspaceUserRole(List<string> emailIds, string role, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
List<System.String> | emailIds | The email address of the users. |
System.String | role | Name of the role. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
ChangeWorkspaceUserStatus(List<String>, String, Dictionary<String, Object>)
Change users staus in the specified workspace.
Declaration
public void ChangeWorkspaceUserStatus(List<string> emailIds, string operation, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
List<System.String> | emailIds | The email address of the users. |
System.String | operation | New status for the users ( Values - activate | deactivate ) |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
Copy(String, Dictionary<String, Object>, Nullable<Int64>)
Copy the specified workspace from one organization to another or within the organization.
Declaration
public long Copy(string newWorkspaceName, Dictionary<string, object> config, long? destOrgId)
Parameters
Type | Name | Description |
---|---|---|
System.String | newWorkspaceName | Name of the new workspace. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
System.Nullable<System.Int64> | destOrgId | Id of the organization where the destination workspace is present. Can be null. |
Returns
Type | Description |
---|---|
System.Int64 | New workspace id. |
CopyViews(List<Int64>, Int64, Dictionary<String, Object>, Nullable<Int64>)
Copy the specified views from one workspace to another workspace.
Declaration
public JsonElement CopyViews(List<long> viewIds, long destWorkspaceId, Dictionary<string, object> config, long? destOrgId)
Parameters
Type | Name | Description |
---|---|---|
List<System.Int64> | viewIds | The id of the views to be copied. |
System.Int64 | destWorkspaceId | The destination workspace id. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
System.Nullable<System.Int64> | destOrgId | Id of the organization where the destination workspace is present. Can be null. |
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Views list. |
CreateEmailSchedule(String, List<Int64>, String, List<String>, Dictionary<String, Object>, Dictionary<String, Object>)
Create an email schedule in the specified workspace.
Declaration
public long CreateEmailSchedule(string scheduleName, List<long> viewIds, string format, List<string> emailIds, Dictionary<string, object> scheduleDetails, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.String | scheduleName | Name of the email schedule. |
List<System.Int64> | viewIds | View ids to be mailed. |
System.String | format | The format in which the data has to be mailed. |
List<System.String> | emailIds | The recipients' email addresses for sending views. |
Dictionary<System.String, System.Object> | scheduleDetails | Contains schedule frequency, date, and time info. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
Returns
Type | Description |
---|---|
System.Int64 | Email schedule id. |
CreateFolder(String, Dictionary<String, Object>)
Create a folder in the specified workspace.
Declaration
public long CreateFolder(string folderName, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.String | folderName | The name of the folder. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
Returns
Type | Description |
---|---|
System.Int64 | Folder id. |
CreateGroup(String, List<String>, Dictionary<String, Object>)
Create a group in the specified workspace.
Declaration
public long CreateGroup(string groupName, List<string> emailIds, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.String | groupName | Name of the group. |
List<System.String> | emailIds | The email address of the users to be added to the group. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
Returns
Type | Description |
---|---|
System.Int64 | Group id. |
CreateQueryTable(String, String, Dictionary<String, Object>)
Create a new query table in the workspace.
Declaration
public long CreateQueryTable(string sqlQuery, string queryTableName, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.String | sqlQuery | SQL query to construct the query table. |
System.String | queryTableName | Name of the query table to be created. |
Dictionary<System.String, System.Object> | config | Contains the control configurations. |
Returns
Type | Description |
---|---|
System.Int64 | View id. |
CreateSlideshow(String, List<Int64>, Dictionary<String, Object>)
Create a slideshow in the specified workspace.
Declaration
public long CreateSlideshow(string slideName, List<long> viewIds, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.String | slideName | Name of the slideshow to be created. |
List<System.Int64> | viewIds | Ids of the view to be included in the slideshow. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
Returns
Type | Description |
---|---|
System.Int64 | Slideshow id. |
CreateTable(Dictionary<String, Object>)
Create a table in the specified workspace.
Declaration
public long CreateTable(Dictionary<string, object> tableDesign)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<System.String, System.Object> | tableDesign | Table structure. |
Returns
Type | Description |
---|---|
System.Int64 | Table id. |
CreateVariable(String, Int32, Int32, Dictionary<String, Object>)
Create a variable in the workspace.
Declaration
public long CreateVariable(string variableName, int variableDataType, int variableType, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.String | variableName | Name of the variable to be created. |
System.Int32 | variableDataType | Datatype of the variable to be created. |
System.Int32 | variableType | Type of the variable to be created. |
Dictionary<System.String, System.Object> | config | Contains the control configurations. |
Returns
Type | Description |
---|---|
System.Int64 | Variable id. |
Delete()
Delete a specified workspace in the organization.
Declaration
public void Delete()
DeleteEmailSchedule(Int64)
Delete the specified email schedule in the workspace.
Declaration
public void DeleteEmailSchedule(long scheduleId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | scheduleId | Id for the email schedule. |
DeleteFolder(Int64)
Delete a specified folder in the workspace.
Declaration
public void DeleteFolder(long folderId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | folderId | The id of the folder. |
DeleteGroup(Int64)
Delete a specified group.
Declaration
public void DeleteGroup(long groupId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | groupId | The id of the group. |
DeleteSlideshow(Int64)
Delete a specified slideshow in the workspace.
Declaration
public void DeleteSlideshow(long slideId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | slideId | The id of the slideshow. |
DeleteTrashView(Int64, Dictionary<String, Object>)
Delete the specified view permanently from trash.
Declaration
public void DeleteTrashView(long viewId, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | viewId | Id of the view. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
DeleteVariable(Int64)
Delete a specified variable in the workspace.
Declaration
public void DeleteVariable(long variableId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | variableId | The id of the variable. |
DisableDomainAccess()
Disable workspace from the specified white label domain.
Declaration
public void DisableDomainAccess()
EditQueryTable(Int64, String, Dictionary<String, Object>)
Update the mentioned query table in the workspace.
Declaration
public void EditQueryTable(long viewId, string sqlQuery, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | viewId | Id of the query table to be updated. |
System.String | sqlQuery | New SQL query to be updated. |
Dictionary<System.String, System.Object> | config | Contains the control configurations. |
EnableDomainAccess()
Enable workspace to the specified white label domain.
Declaration
public void EnableDomainAccess()
ExportAsTemplate(List<Int64>, String, Dictionary<String, Object>)
Export the views as templates.
Declaration
public void ExportAsTemplate(List<long> viewIds, string filePath, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
List<System.Int64> | viewIds | |
System.String | filePath | Path of the file where the data exported to be stored. ( Should be in 'atpt' format ) |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
GetAdmins()
Returns list of admins for the specified workspace.
Declaration
public JsonElement GetAdmins()
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Workspace admins list. |
GetDatasources()
Returns list of datasources for the specified workspace.
Declaration
public JsonElement GetDatasources()
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Datasource list. |
GetEmailSchedules()
Returns list of email schedules available in the specified workspace.
Declaration
public JsonElement GetEmailSchedules()
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | List of email schedules. |
GetFolders()
Returns list of all accessible folders for the specified workspace.
Declaration
public JsonElement GetFolders()
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Folders list. |
GetGroupDetails(Int64)
Returns details of the specified group.
Declaration
public JsonElement GetGroupDetails(long groupId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | groupId | The id of the group. |
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Group details. |
GetGroups()
Returns list of groups for the specified workspace.
Declaration
public JsonElement GetGroups()
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Groups list. |
GetSecretKey(Dictionary<String, Object>)
Returns the secret key of the specified workspace.
Declaration
public string GetSecretKey(Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
Returns
Type | Description |
---|---|
System.String | Workspace secret key. |
GetSharedDetailsForViews(List<Int64>)
Returns shared details of the specified views.
Declaration
public JsonElement GetSharedDetailsForViews(List<long> viewIds)
Parameters
Type | Name | Description |
---|---|---|
List<System.Int64> | viewIds | View ids for which sharing details are required. |
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Shared details. |
GetShareInfo()
Returns shared details of the specified workspace.
Declaration
public JsonElement GetShareInfo()
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Shared details. |
GetSlideshowDetails(Int64)
Returns details of the specified slideshow.
Declaration
public JsonElement GetSlideshowDetails(long slideId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | slideId | The id of the slideshow. |
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Slideshow details. |
GetSlideshows()
Returns list of slideshows for the specified workspace.
Declaration
public JsonElement GetSlideshows()
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Slideshow list. |
GetSlideshowURL(Int64, Dictionary<String, Object>)
Returns slide URL to access the specified slideshow.
Declaration
public string GetSlideshowURL(long slideId, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | slideId | The id of the slideshow. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
Returns
Type | Description |
---|---|
System.String | Slideshow URL. |
GetTrashViews()
Returns list of all views available in trash for the specified workspace.
Declaration
public JsonElement GetTrashViews()
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Views list. |
GetVariableDetails(Int64)
Returns details of the specified variable.
Declaration
public JsonElement GetVariableDetails(long variableId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | variableId | The id of the variable. |
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Variable details. |
GetVariables()
Returns list of variables for the specified workspace.
Declaration
public JsonElement GetVariables()
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Variables list. |
GetViews(Dictionary<String, Object>)
Returns list of all accessible views for the specified workspace.
Declaration
public JsonElement GetViews(Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | Views list. |
GetWorkspaceUsers()
Returns list of users for the specified workspace.
Declaration
public JsonElement GetWorkspaceUsers()
Returns
Type | Description |
---|---|
System.Text.Json.JsonElement | List of users. |
MakeDefaultFolder(Int64)
Make the specified folder as default.
Declaration
public void MakeDefaultFolder(long folderId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | folderId | The id of the folder. |
MoveViewsToFolder(Int64, List<Int64>, Dictionary<String, Object>)
Move views to the mentioned folder.
Declaration
public void MoveViewsToFolder(long folderId, List<long> viewIds, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | folderId | Id of the folder. |
List<System.Int64> | viewIds | View ids to be moved. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
RemoveAdmins(List<String>, Dictionary<String, Object>)
Remove admins from the specified workspace.
Declaration
public void RemoveAdmins(List<string> emailIds, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
List<System.String> | emailIds | The email address of the admin users to be removed. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
RemoveDefault()
Remove a specified workspace from default.
Declaration
public void RemoveDefault()
RemoveFavorite()
Remove a specified workspace from favorite.
Declaration
public void RemoveFavorite()
RemoveGroupMembers(Int64, List<String>, Dictionary<String, Object>)
Remove users from the specified group.
Declaration
public void RemoveGroupMembers(long groupId, List<string> emailIds, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | groupId | The id of the group. |
List<System.String> | emailIds | The email address of the users to be removed from the group. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
RemoveShare(List<Int64>, List<String>, Dictionary<String, Object>)
Remove shared views for the specified users.
Declaration
public void RemoveShare(List<long> viewIds, List<string> emailIds, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
List<System.Int64> | viewIds | View ids whose sharing needs to be removed. |
List<System.String> | emailIds | The email address of the users to whom the sharing need to be removed. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
RemoveWorkspaceUsers(List<String>, Dictionary<String, Object>)
Remove users from the specified workspace.
Declaration
public void RemoveWorkspaceUsers(List<string> emailIds, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
List<System.String> | emailIds | The email address of the users to be removed. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
Rename(String, Dictionary<String, Object>)
Rename a specified workspace in the organization.
Declaration
public void Rename(string workspaceName, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.String | workspaceName | New name of the workspace. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
RenameFolder(Int64, String, Dictionary<String, Object>)
Rename a specified folder in the workspace.
Declaration
public void RenameFolder(long folderId, string folderName, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | folderId | The id of the folder. |
System.String | folderName | The new name of the folder. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
RenameGroup(Int64, String, Dictionary<String, Object>)
Rename a specified group.
Declaration
public void RenameGroup(long groupId, string groupName, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | groupId | The id of the group. |
System.String | groupName | The new name of the group. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
RestoreTrashView(Int64, Dictionary<String, Object>)
Restore the specified view from trash.
Declaration
public void RestoreTrashView(long viewId, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | viewId | Id of the view. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
ShareViews(List<Int64>, List<String>, Dictionary<String, Boolean>, Dictionary<String, Object>)
Share views to the specified users.
Declaration
public void ShareViews(List<long> viewIds, List<string> emailIds, Dictionary<string, bool> permissions, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
List<System.Int64> | viewIds | View ids which to be shared. |
List<System.String> | emailIds | The email address of the users to whom the views need to be shared. |
Dictionary<System.String, System.Boolean> | permissions | Contains permission details. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
SyncData(Int64, Dictionary<String, Object>)
Initiate data sync for the specified datasource.
Declaration
public void SyncData(long datasourceId, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | datasourceId | Id of the datasource. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
TriggerEmailSchedule(Int64)
Trigger configured email schedules instantly.
Declaration
public void TriggerEmailSchedule(long scheduleId)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | scheduleId | Id for the email schedule. |
UpdateDatasourceConnection(Int64, Dictionary<String, Object>)
Update connection details for the specified datasource.
Declaration
public void UpdateDatasourceConnection(long datasourceId, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | datasourceId | Id of the datasource. |
Dictionary<System.String, System.Object> | config | Contains the control configurations. |
UpdateEmailSchedule(Int64, Dictionary<String, Object>)
Update configurations of the specified email schedule in the workspace.
Declaration
public long UpdateEmailSchedule(long scheduleId, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | scheduleId | Id for the email schedule. |
Dictionary<System.String, System.Object> | config | Contains the control configurations. |
Returns
Type | Description |
---|---|
System.Int64 | Updated schedule id. |
UpdateSlideshow(Int64, Dictionary<String, Object>)
Update details of the specified slideshow.
Declaration
public void UpdateSlideshow(long slideId, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | slideId | The id of the slideshow. |
Dictionary<System.String, System.Object> | config | Contains any additional control configurations. Can be null. |
UpdateVariable(Int64, String, Int32, Int32, Dictionary<String, Object>)
Update details of the specified variable in the workspace.
Declaration
public void UpdateVariable(long variableId, string variableName, int variableDataType, int variableType, Dictionary<string, object> config)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | variableId | Id for the variable. |
System.String | variableName | New name for the variable. |
System.Int32 | variableDataType | New datatype for the variable. |
System.Int32 | variableType | New type for the variable. |
Dictionary<System.String, System.Object> | config | Contains the control configurations. |