

Last date modified: June 17 2025
The Tab Manager API supports programmatically managing tabs in Relativity. It includes the following features:
As a sample use case, you might use the Tab Manager service to add specialized tab functionality to custom pages in a Relativity application developed for your organization.
You can also use the Tab Manager API through REST. For more information, see Tab Manager (REST).
Review the following information to learn about the methods, classes, and other entities used by the Tab Manager API.
The Tab Manager API includes the following methods available on the ITabManager interface in the Relativity.Services.Interfaces.DataVisualization.<VersionNumber>.Tab namespace.
The <VersionNumber> variable in the namespace indicates the version number of the API. The version number uses the format uppercase V and an integer version number, such as V1 or V2 in .NET.
The Tab Manager API uses the following classes and enumerations:
Review the following guidelines for working with the Tab Manager service.
You can access the Tab Manager service by creating a client proxy, and then instantiating a TabManager object.
1
2
3
4
Uri keplerEndPoint = new Uri("http://localhost/relativity.rest/api");
Services.ServiceProxy.ServiceFactory serviceFactory = new Services.ServiceProxy.ServiceFactory(new Services.ServiceProxy.ServiceFactorySettings(keplerEndpoint,
new Services.ServiceProxy.UsernamePasswordCredentials("username", "password")));
Relativity.DataVisualization.V1.Tab.ITabManager proxy = serviceFactory.CreateProxy<Relativity.DataVisualization.V1.Tab.ITabManager>();
The methods on the Tab Manager API require that you pass an integer representing a workspace ID. You must pass -1 when you want to indicate the admin-level context. For example, you would pass -1 as the workspace ID to retrieve metadata for system or admin tabs. See Retrieve workspace-level metadata for admin and system tabs.
When you call a method on the Tab Manager API, it returns a Task object. You can retrieve the data returned in Task object by retrieving an awaiter for the Task object, and then calling the GetResult() method.
1
2
3
4
5
List<TabViewOrder> tabViewOrder = tabManager.GetViewOrderListAsync(WorkspaceID).GetAwaiter().GetResult();
List<ParentTabResponse> allParentTabs = tabManager.GetEligibleParentTabsAsync(WorkspaceID).GetAwaiter().GetResult();
TabResponse entitiesTabResponse = tabManager.ReadAsync(WorkspaceID, entitiesTabArtifactID).GetAwaiter().GetResult();
When creating a tab, you must the set the Parent property. This property is required for tabs at all levels, including tabs created at the admin-level or as parent tabs. For admin-level tabs, set this property to SystemArtifactId.
1
2
3
4
5
6
7
8
9
10
int systemArtifactID = artifactHelper.RetrieveSystemArtifactId();
return new TabRequest()
{
Name = Constants.ENTITIES_PARENT_TAB_NAME,
Order = newEntitiesParentTabOrder,
LinkType = TabLinkTypeEnum.Parent,
IsVisible = true,
Parent = new ObjectIdentifier { ArtifactID = systemArtifactID }
};
You may want to update a tab by using data obtained from a read operation. In the Tab Manager API, the ReadAsync() method returns a TabResponse object. However, the UpdateAsync() method requires that you pass a TabRequest object to it. To use data obtained from a read operation, you need to translate it from the form provided in the TabResponse object to that required for a TabRequest object.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
TabResponse entitiesTabResponse = tabManager.ReadAsync(WorkspaceID, entitiesTabArtifactID).GetAwaiter().GetResult();
TabRequest entitiesTabRequest = TranslateTabResponseToTabRequest(entitiesTabResponse);
private TabRequest TranslateTabResponseToTabRequest(TabResponse tabResponse)
{
TabRequest tabRequest = null;
if (tabResponse != null)
{
tabRequest = new TabRequest
{
Name = tabResponse.ObjectIdentifier.Name,
Order = tabResponse.Order,
Link = tabResponse.Link,
IsDefault = tabResponse.IsDefault,
IsVisible = tabResponse.IsVisible,
IsShownInSidebar = tabResponse.IsShownInSidebar,
RelativityApplications = tabResponse.RelativityApplications.ViewableItems.Select(x => new ObjectIdentifier { ArtifactID = x.ArtifactID }).ToList(),
LinkType = tabResponse.LinkType,
IconIdentifier = tabResponse.IconIdentifier,
Parent = new ObjectIdentifier { ArtifactID = tabResponse.Parent.Value.ArtifactID },
ObjectType = tabResponse.ObjectType
};
}
return tabRequest;
}
The TabRequest class contains the IconIdentifier property, which represents a string identifier for the icon displayed when a tab appears in the sidebar.
The following table lists the available values for the IconIdentifier property:
Icon |
String Identifier |
Name |
---|---|---|
|
sidebar-access |
Access |
|
sidebar-analytics |
Analytics |
|
sidebar-bar-chart |
Bar chart |
|
sidebar-case |
Case |
|
sidebar-case-dynamics |
Case dynamics |
|
sidebar-configure |
Configure |
|
sidebar-data-transfer |
Data transfer |
|
sidebar-documents |
Documents |
|
sidebar-download |
Download |
|
sidebar-export |
Export |
|
sidebar-folder |
Folder |
|
sidebar-infrastructure |
Infrastructure |
|
sidebar-monitor |
Monitor |
|
sidebar-page |
Page |
|
sidebar-pie-chart |
Pie chart |
|
sidebar-processing |
Processing |
|
sidebar-production |
Production |
|
sidebar-resources |
Resources |
|
sidebar-review |
Review |
|
sidebar-default-tab |
Tag |
|
sidebar-upload |
Upload |
|
sidebar-workspaces |
Workspaces |
To create a tab, call the CreateAsync() method by passing the Artifact ID of the workspace and a TabRequest object to it.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
public bool Create(IHelper helper)
{
bool success = false;
using (ITabManager proxy = helper.GetServicesManager().CreateProxy<ITabManager>(ExecutionIdentity.System))
{
try
{
string tabName = "Sample_Tab";
TabRequest request = new TabRequest
{
Name = tabName,
Order = 100,
LinkType = TabLinkTypeEnum.Object,
IsVisible = true,
Parent = new ObjectIdentifier { ArtifactID = 1003663 }
};
TabResponse response = proxy.CreateAsync(SampleWorkspace_ID, request).GetAwaiter().GetResult();
_logger.LogDebug("{TabID} - {TabName}", response.ObjectIdentifier.ArtifactID, response.ObjectIdentifier.Name);
}
catch (Exception ex)
{
_logger.LogError("Create failed - {message}", ex.Message);
throw;
}
}
return success;
}
Use the overloaded ReadAsync() method to retrieve basic or extended metadata for a tab. Extended metadata includes operations that you have permissions to perform on the tab, such as delete or update.
For basic tab metadata, call the ReadAsync() method by passing the Artifact IDs of the workspace and the tab. For extended metadata, you can pass Boolean values for both the includeMetadata and includeActions parameters on the overloaded method.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public bool Read(IHelper helper)
{
bool success = false;
using (ITabManager proxy = helper.GetServicesManager().CreateProxy<ITabManager>(ExecutionIdentity.System))
{
try
{
TabResponse response = proxy.ReadAsync(SampleWorkspace_ID, SampleTab_ID).GetAwaiter().GetResult();
_logger.LogDebug("{TabID} - {TabName}", response.ObjectIdentifier.ArtifactID, response.ObjectIdentifier.Name);
success = true;
}
catch (Exception ex)
{
_logger.LogError("Read failed - {message}", ex.Message);
throw;
}
}
return success;
}
To modify the properties of a tab, call the UpdateAsync() method by passing Artifact ID of the workspace and a TabRequest object to it. This overloaded method also supports restricting the update of a tab to the date when it was last modified. To restrict the update, you must pass a DateTime object to the method as well.
The value for the DateTime object must match the LastModifiedOn date for the tab stored in Relativity. Otherwise, you receive an error, indicating that the object has been modified.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
public bool Update(IHelper helper)
{
bool success = false;
using (ITabManager proxy = helper.GetServicesManager().CreateProxy<ITabManager>(ExecutionIdentity.System))
{
try
{
string tabName = "Sample_Tab";
TabRequest request = new TabRequest
{
Name = tabName,
Order = 100,
LinkType = TabLinkTypeEnum.Object,
IsVisible = true,
Parent = new ObjectIdentifier { ArtifactID = 1003663 },
ObjectType = new DisplayableObjectTypeIdentifier { ArtifactTypeID = 10 }
};
proxy.UpdateAsync(SampleWorkspace_ID, request).GetAwaiter().GetResult();
success = true;
}
catch (Exception ex)
{
_logger.LogError("Update failed - {message}", ex.Message);
throw;
}
}
return success;
}
Use the DeleteAsync() method to remove a tab from Relativity. You must have the permissions to perform a delete operation. For more information, see Security and permissions in the Relativity
Before you delete a tab, consider checking for other dependent tabs using Object Manager API. See Object Manager (.NET).
Remove a tab by passing the Artifact IDs of the workspace and the existing tab to the DeleteAsync() method.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public bool Delete(IHelper helper)
{
bool success = false;
using (ITabManager proxy = helper.GetServicesManager().CreateProxy<ITabManager>(ExecutionIdentity.System))
{
try
{
proxy.DeleteAsync(SampleWorkspace_ID, SampleTab_ID).GetAwaiter().GetResult();
success = true;
}
catch (Exception ex)
{
_logger.LogError("Delete failed - {message}", ex.Message);
throw;
}
}
return success;
}
When creating an object link type tab, you must associate it with an object. Use the GetEligibleObjectTypesAsync() method to obtain a list of available object types before executing a create operation. It retrieves a list of all object types in a workspace available for creating a tab.
Pass the Artifact ID of a workspace to the GetEligibleObjectTypesAsync() method.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
public bool GetAvailableObjectTypes(IHelper helper)
{
bool success = false;
using (ITabManager proxy = helper.GetServicesManager().CreateProxy<ITabManager>(ExecutionIdentity.System))
{
try
{
List<DisplayableObjectTypeIdentifier> response = proxy.GetEligibleObjectTypesAsync(SampleWorkspace_ID).GetAwaiter().GetResult();
_logger.LogDebug("All available object types for workspace {WorkspaceID}", SampleWorkspace_ID);
foreach (DisplayableObjectTypeIdentifier identifier in response)
{
_logger.LogDebug("{Name} - {ArtifactTypeID} - {ArtifactID}", identifier.Name, identifier.ArtifactTypeID, identifier.ArtifactID);
}
success = true;
}
catch (Exception ex)
{
_logger.LogError("Get all available object types failed - {message}", ex.Message);
throw;
}
}
return success;
}
Use the GetEligibleParentTabsAsync() method to retrieve a list of parent tabs, which you can associate with a tab when you add or edit it. In the Relativity UI, a parent tab displays a drop-down list containing child tabs.
Pass this method the Artifact ID of the workspace where you want to add the tab or where it currently exists.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
public bool GetAvailableParents(IHelper helper)
{
bool success = false;
using (ITabManager proxy = helper.GetServicesManager().CreateProxy<ITabManager>(ExecutionIdentity.System))
{
try
{
List<ParentTabResponse> response = proxy.GetEligibleParentTabsAsync(SampleWorkspace_ID).GetAwaiter().GetResult();
_logger.LogDebug("All available parent tabs for workspace {WorkspaceID}", SampleWorkspace_ID);
foreach (ParentTabResponse tab in response)
{
_logger.LogDebug("{Name} - {ArtifactID}", tab.ObjectIdentifier.Name, tab.ObjectIdentifier.ArtifactID);
}
success = true;
}
catch (Exception ex)
{
_logger.LogError("Get all available parents failed - {message}", ex.Message);
throw;
}
}
return success;
}
You can retrieve workspace-level metadata about admin and system tabs. This metadata includes fields that can't be updated and those that aren't supported for a specific tab. In general, the following guidelines apply to this metadata:
Call the GetMetaAsync() method by passing -1 to indicate the admin-level context. See Admin-level context.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
public bool GetMeta(IHelper helper)
{
bool success = false;
using (ITabManager proxy = helper.GetServicesManager().CreateProxy<ITabManager>(ExecutionIdentity.System))
{
try
{
Meta response = proxy.GetMetaAsync(SampleWorkspace_ID).GetAwaiter().GetResult();
_logger.LogDebug("Tab Meta for workspace {WorkspaceID}", SampleWorkspace_ID);
foreach (String unsupportedMeta in response.Unsupported)
{
_logger.LogDebug("Unsupported - {UnsupportedMeta}", unsupportedMeta);
}
foreach (String readOnlyMeta in response.ReadOnly)
{
_logger.LogDebug("ReadOnly - {ReadOnlyMeta}", readOnlyMeta);
}
success = true;
}
catch (Exception ex)
{
_logger.LogError("Get workspace level metadata failed - {message}", ex.Message);
throw;
}
}
return success;
}
The order assigned to a tab determines its position in the Relativity UI. Tabs with a lower order number are displayed on the left, while those with higher order numbers are displayed on the right. For more information, see Tabs on the Relativity
Use the GetViewOrderList() method to retrieve the current order for tabs in a specific workspace. Call this method with the Artifact ID of a workspace. For the order of system or admin tabs, pass -1 instead of an Artifact ID. See Admin-level context.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
public bool GetViewOrderList(IHelper helper)
{
bool success = false;
using (ITabManager proxy = helper.GetServicesManager().CreateProxy<ITabManager>(ExecutionIdentity.System))
{
try
{
List<TabViewOrder> response = proxy.GetViewOrderListAsync(SampleWorkspace_ID).GetAwaiter().GetResult();
_logger.LogDebug("List of all tabs and their view order for workspace {WorkspaceID}", SampleWorkspace_ID);
foreach (TabViewOrder viewOrder in response)
{
_logger.LogDebug("{Name} - {ArtifactID} - {Order}", viewOrder.ObjectIdentifier.Name, viewOrder.ObjectIdentifier.ArtifactID, viewOrder.Order);
}
success = true;
}
catch (Exception ex)
{
_logger.LogError("Get view order list failed - {message}", ex.Message);
throw;
}
}
return success;
}
Use the GetAllNavigationTabs() method to retrieve basic information about each tab the calling user can navigate to in a specific workspace. This method returns a URL for navigating to each tab and tab metadata like the tab's name, order, visibility, parent, and other properties.
Call the GetAllNavigationTabs() method by passing the Artifact ID of the workspace.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
public bool GetAllNavigationTabs(IHelper helper)
{
bool success = false;
using (ITabManager proxy = helper.GetServicesManager().CreateProxy<ITabManager>(ExecutionIdentity.System))
{
try
{
List<NavigationTabResponse> response = proxy.GetAllNavigationTabsAsync(SampleWorkspace_ID).GetAwaiter().GetResult();
foreach (NavigationTabResponse navigationTabResponse in response)
{
_logger.LogDebug("{Name} - {Order} - {URL}", navigationTabResponse.ObjectIdentifier.Name, navigationTabResponse.Order, navigationTabResponse.Url);
}
success = true;
}
catch (Exception ex)
{
_logger.LogError("GetAllNavigationTabs failed - {message}", ex.Message);
throw;
}
}
return success;
}
On this page
Why was this not helpful?
Check one that applies.
Thank you for your feedback.
Want to tell us more?
Great!
Additional Resources |
|||
DevHelp Community | GitHub | Release Notes | NuGet |