Workspace Manager (.NET)

In Relativity, a workspace acts as a secure data repository for documents. It supports customized views, layouts, fields, choices, and security settings. For more information, see Workspaces on the RelativityOne Documentation site.

The Workspace Manager API supports the following functionality:

  • CRUD operations on workspaces.
  • Helper methods for retrieving lists of available resources, such as matters, clients, and others.
  • Helper methods for retrieving information about advanced settings, such as workspace statuses, full text languages for the SQL Server, and others.
  • Helper methods for retrieving Azure credentials.

As a sample use case, you can simplify setting up reviews by using the Workspace Manager API to programmatically create multiple workspaces rather than manually adding them through the Relativity UI.

You can also use the Workspace Manager API through REST. For more information, see Workspace Manager service.

Fundamentals for the Workspace Manager API

The Workspace Manager API contains the following methods and classes as described in this section.

Methods

The Workspace Manager API exposes the following methods on the IWorkspaceManager interface in the Relativity.Environment.<VersionNumber>.Workspace namespace.

Note: 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.

Classes

The Workspace Manager API exposes the following classes available in the Relativity.Environment.<VersionNumber>.Workspace.Models namespace:

  • WorkspaceRequest class - represents a request for creating or updating a workspace.
  • WorkspaceResponse class - represents the results of a read operation on a workspace.
  • SqlFullTextLanguageOptions class - represents the available full text language options for the SQL Server associated with a workspace.
  • WorkspaceSummary class - represents the statistics for a workspace.

Guidelines for the Workspace Manager API

Review the following guidelines for working with the Workspace Manager API.

NuGet package

The NuGet package called Relativity.Environment.SDK is required to use the endpoints exposed in the Workspace Manager API. For more information, see SDK and Nuget Compatibility.

Create a proxy

You must use a proxy to interact with the Workspace Manager API. To set up a proxy, call the CreateProxy() method on the object returned by the GetServiceManager() method.

Field permissions

Review the following information about how field permissions are used by Workspace Manager API:

  • Secured fields - A user interacting with the Workspace Manager API may be given access to read and write to only select fields in the workspace. You can control this access by using the Securable<T> object types. Objects of this type have the following properties: Secured (bool) and Value (T). When the Secured property is set to true, the user doesn't have read or write access to the contents of the fields set for the Value property.

  • Read-only fields - A user may have permission to view a field but not update or delete it. In this case, the field name is included in the read-only list in the metadata. The following fields are examples: client, matter, and workspace admin group.

Cancellation and progress

The Workspace Manager API provides overloaded methods for create, update, and query operations, which support cancellation and progress functionality. For more information, see Cancellation and progress.

Create a workspace

Use the CreateAsync() method to add a new workspace to Relativity. This method takes a WorkspaceRequest object and returns a WorkspaceResponse object. All WorkspaceRequest properties related to the infrastructure details (DownloadHandlerUrl, Resource Pool, DefaultFileRepository, DataGridFileRepository, DefaultCacheLocation, SqlServer) are optional. If the infrastructure details are not explicitly specified in the request, they are automatically selected by the algorithm.

Create operation helper methods

The following helper methods provide functionality to support the create operation.

Retrieve unsupported fields for a create operation

Use the GetMetaAsync() method to retrieve a list of unsupported WorkspaceRequest fields for a create operation.

Retry failed create event handlers

Use the RetryFailedCreateEventHandlersAsync() method to retry failed create event handlers for a workspace. This method takes the Artifact ID of the workspace as an argument.

Retrieve a workspace

Use the ReadAsync() method to retrieve a workspace. This method takes the Artifact ID of a workspace and returns a WorkspaceResponse object.

Update a workspace

Use the UpdateAsync() method to modify the properties of a workspace. This method takes the Artifact ID of the workspace and a WorkspaceRequest object. It returns a WorkspaceResponse object.

Delete a workspace

Use the DeleteAsync() method to remove a workspace from Relativity. This method takes the Artifact ID of the workspace.

Retrieve workspace statistics

Use the GetWorkspaceSummaryAsync() method to retrieve a summary of workspace statistics. This method takes the Artifact ID of the workspace as an argument and returns a WorkspaceSummary object.

Retrieve workspaces associated with a group

Use the QueryWorkspaceByGroupAsync() method to retrieve workspaces associated with a group. This method takes a QueryRequest object, a start index, the number of groups to include in the results, and the Artifact ID of a group. It returns a QueryResultSlim object. For more information about QueryResultSlim objects, see Query for Relativity objects.

Resource information helper methods

The following helper methods correspond to the fields that you can set in the Resource Information section of the Workspace form in the Relativity UI. For more information, see Workspaces on the RelativityOne Documentation site.

Retrieve matters

Use the QueryEligibleMattersAsync() method to retrieve a list of matters. This method takes a QueryRequest object, a start index, and the number of matters to include in the results. It returns a QueryResultSlim object with a list of available matters. Use this method when setting the Matter property on a workspace. For more information about QueryResultSlim objects, see Query for Relativity objects.

Retrieve clients

Use the QueryEligibleClientsAsync() method to retrieve a list of clients available for this workspace. This method takes a QueryRequest object, a start index, and the number of clients to include in the results. It returns a QueryResultSlim object with a list of available clients. Use this method when setting the Client property on a workspace. For more information about QueryResultSlim objects, see Query for Relativity objects.

Retrieve workspaces for use as templates

Use the QueryEligibleTemplatesAsync() method to retrieve a list of workspaces for use as templates when creating a new workspace. This method takes a QueryRequest object, a start index, and the number of templates to include in the results. It returns a QueryResultSlim object with a list of available templates. Use this method when setting the Template property on a workspace. For more information about QueryResultSlim objects, see Query for Relativity objects.

Retrieve resource pools

Use the GetEligibleResourcePoolsAsync() method to retrieve a list of resource pools. This method returns a list of DisplayableObjectIdentifier objects, which identify available resource pools. Use this method when setting the ResourcePool property for a workspace.

Retrieve SQL Servers

Use the GetEligibleSqlServersAsync() method to retrieve a list of SQL servers available for the workspace. This method takes the Artifact ID of a resource pool and returns a list of DisplayableObjectIdentifier objects, which identify available SQL servers. Use this method when setting the SqlServer property for a workspace.

Retrieve file repository servers

Use the GetEligibleFileRepositoriesAsync() method to retrieve a list of available file repository servers. This method takes the Artifact ID of a resource pool and returns a list of DisplayableObjectIdentifier objects, which identify available servers. Use this method when setting the DefaultFileRepository and DataGridRepository properties for a workspace.

Retrieve cache location servers

Use the GetEligibleCacheLocationsAsync() method to retrieve a list of available cache location servers. This method takes the Artifact ID of a resource pool and returns a list of DisplayableObjectIdentifier objects, which identify available cache locations. Use this method when setting the DefaultCacheLocation property for a workspace.

Retrieve the URL for the default download handler

Use the GetDefaultDownloadHandlerURLAsync() method to retrieve the URL for the default download handler. This method returns a URL.

This endpoint doesn't require any specific permissions.

Advanced settings helper methods

The following helper methods correspond to the fields that you can set in the Advanced settings section of the Workspace form in the Relativity UI. For more information, see Workspaces on the RelativityOne Documentation site.

Retrieve available statuses for a workspace

Use the GetEligibleStatusesAsync() method to retrieve a list of available statuses for a workspace. This method returns a list of DisplayableObjectIdentifier objects, which contain the Artifact ID, Name, and GUIDs identifying each status. Use this method when setting the Status property on a workspace.

Retrieve full text languages for SQL Server

Use the GetEligibleSqlFullTextLanguagesAsync() method to retrieve a list of available full text languages for the SQL Server assigned to a workspace. This method returns a list of SqlFullTextLanguageOptions objects, which describe the available and default languages. Use this method when setting the SqlFullTextLanguage property on a workspace.

Retrieve groups for workspace membership

Use the QueryEligibleGroupsAsync() method to retrieve a list of groups available for workspace membership. This method takes a QueryRequest object, a start index, and the number of groups to include in the results. It returns a QueryResultSlim object with a list of available groups. For more information about QueryResultSlim objects, see Query for Relativity objects.

Retrieve saved searches for production restrictions

Use the QueryEligibleSavedSearchesAsync() method to retrieve saved searches for use with production restrictions. For more information, see Adding and editing production restrictions on the RelativityOne Documentation site.

This method takes a QueryRequest object, a start index, and the number of saved searches to include in the results. It returns a QueryResultSlim object with a list of available saved searches. Use this method when setting the ProductionRestrictions property on a workspace. For more information about QueryResultSlim objects, see Query for Relativity objects.

Azure credentials helper methods

Use the following methods to retrieve Azure credentials associated with a resource pool. For more information, see Workspaces on the RelativityOne Documentation site.

Retrieve Azure credentials

Use the GetEligibleAzureCredentialsAsync() method to retrieve a list of available Azure credentials for the workspace. This method takes the Artifact ID of a resource pool and returns a list of DisplayableObjectIdentifier objects, which identify available credentials. Use this method when setting the AzureCredentials property on a workspace.

Retrieve Azure file system credentials

Use the GetEligibleAzureFileSystemCredentialsAsync() method to retrieve a list of available Azure file system credentials. This method takes the Artifact ID of a resource pool and returns a list of DisplayableObjectIdentifier objects, which identify available credentials. Use this method when setting the AzureFileSystemCredentials property on a workspace.