View Manager (.NET)

You can use the View Manager API to create, read, and update Relativity views. It also includes helper methods for retrieving the following information:

  • A user's permissions on a view and the fields used in the search conditions on the view.
  • A list of workspace users who can be assigned ownership of a view.
  • A list of object types in a workspace. When creating a view, you can use this list to assign an object type to a view based on the objects that you want displayed in it.

As a sample use case, you could use the View Manager API to add or modify views used in a custom application or through the Relativity UI. For example, you might want to create a view that uses a specific set of search criteria to display custom objects in an application.

You can also use the View Manager API through REST. For more information, see View Manager (REST).

This page contains the following information:

The Relativity.DataVisualization.SDK contains this API. For compatibility and package installation instructions, see Download the SDKs and NuGet packages.

Fundamentals for the View Manager API

The View Manager API contains the following methods and classes.

Create a view in a workspace

Use the CreateAsync() method to add a new view to a Relativity workspace. When calling this method, pass the Artifact ID of the workspace where you want to create the view, and a ViewRequest object. This method returns the Artifact ID of the newly created view.

Retrieve information about a view

Use the ReadAsync() method to retrieve information about a view. When calling this method, pass the Artifact ID of the workspace containing the view, and the Artifact ID of the view. This method returns a ViewResponse object.

Update the properties of a view

Use the UpdateAsync() method to modify the properties of a view. When calling this method, pass Artifact ID of the workspace containing the view and a ViewRequest object. It returns a ViewResponse object, which contains information about the updated view.

Retrieve the access status of a user

Use the GetAccessStatusAsync() method to determine whether a user has View permissions to a view and the fields used in the criteria for search conditions on the view.

When calling this method, pass the Artifact ID of the workspace containing the view, and the Artifact ID of the view that you want to check for user access status.

It returns ViewAccessStatus object that contains information about the user's ability to access the view. This object has the CanView and CanViewCriteriaFields properties on it.

Retrieve users for view ownership

Use the GetViewOwnersAsync() method to retrieve a list of users in a workspace. You can then use this list to assign owners to a view. To be designated as an owner, a user must have View permissions for views. For more information, see Security and Permissions on the RelativityOne Documentation site.

Pass the Artifact ID of a workspace containing the view to this method. It returns a list of DisplayableObjectIdentifier objects, representing users who can be assigned ownership of a view.

Retrieve a list of object types in the workspace

Use the GetObjectTypesAsync() method to return a list of object types that the workspace contains. You can select an object type that is then used for populating the ObjectType property on the View object.

Call this method by passing Artifact ID of the workspace containing the view. It returns a list of ObjectTypeRef objects.

Additional Resources

DevHelp Community GitHub Release Notes NuGet

Share knowledge with the Relativity developer community.

Access tools and resources to build an application.

Review the most recent product release notes.

Create .NET Apps faster with NuGet.