View Manager service

In the REST API, the View Manager service provides endpoints for creating, reading, and updating views. It also provides endpoints for retrieving the following information:

You can use the View Manager service 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.

The Relativity Services API also provides functionality for managing views. For more information, see View Manager API.

This page contains the following information:

Client code sample

You can use the View Manager service by sending an HTTP request that makes a POST method call. See the following base URL for this service:

<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/

You can use the following .NET code as a REST client for making calls with the View Manager service. This code illustrates how to perform the following tasks:

For information about running this code sample, see Relativity SDK samples.

Create a view in a workspace

Use the CreateSingleAsync endpoint to add a new view to a workspace. Send a request to this URL for the View Manager service:

<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/CreateSingleAsync

The JSON request includes fields for a user-friendly name, fields to be included in the view, sorting information, and other properties required to create a view.

The response contains the Artifact ID of the newly created view.

Retrieve information about a view

Use the ReadSingleAsync endpoint to retrieve information about a view. Send a request to this URL for the View Manager service:

<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/ReadSingleAsync

The request must include the following fields:

{
   "workspaceArtifactID":1021106,
   "viewArtifactID":1042993
}

The JSON response for the ReadSingleAsync endpoint includes information about the object type assigned to the view, the owner, search criteria associated with it, sorting, and other data.

Retrieve each view in a workspace

You can retrieve each view in a workspace for a specific Artifact ID by making a call with the RetrieveViewsByContextArtifactIDAsync endpoint. To learn more, visit Views. Send a request to this URL for the View Manager service:

<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/RetrieveViewsByContextArtifactIDAsync

The JSON request includes the Artifact ID of the workspace which contains the view and the Artifact ID of the view.

Retrieve the views in a saved search

You can retrieve each view that is associated with a saved search in a workspace by making a call with the RetrieveViewsByContextArtifactIDForSearchAsync endpoint. To learn more, visit Saved Search. Send a request to this URL for the View Manager service:

<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/RetrieveViewsByContextArtifactIDForSearchAsync

The JSON request includes the Artifact ID of the workspace which contains the saved search(es).

JSON response contains an array of SearchViewResponse objects. Each of them represents properties of a single View for Search in a specified Workspace.

There is a number of fields that do not show up in JSON response if their value is null. These fields are: "Order", "SearchProviderID", "ThreadMethod", "PayloadFieldArtifactID", "GroupDefinitionArtifactID" and "DashboardArtifactID"

Update the properties of a view

You can update the properties of a view by making a call with the UpdateSingleAsync endpoint. Send a request to this URL for the View Manager service:

<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/UpdateSingleAsync

The JSON request includes fields for the workspace Artifact ID, the Artifact ID of the view, and other properties that you can update on the view.

The response returns a status code of 200 when the service successfully updates a view.

Retrieve the access status of a user

You can use the GetAccessStatusAsync endpoint to determine whether a user has View permissions to a view, and to the fields used in the criteria for search conditions on the view. Send a request to this URL for the View Manager service:

<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/GetAccessStatusAsync

The request must include the following fields:

{
   "workspaceArtifactID":1021106,
   "artifactID":1041929
}

The response returns the following fields:

{
   "Exists":true,
   "CanView":true,
   "CanViewCriteriaFields":true
}

Retrieve users for assigning view ownership

Use the GetViewOwnersAsync endpoint 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 Relativity 9.6 Documentation site.

To retrieve a list of users, send a request to this URL for the View Manager service:

<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/GetViewOwnersAsync

The request must contain the Artifact ID of the workspace that contains the view. When the owner is set to Public, all users with View permissions can see the view.

{
   "workspaceArtifactID":1028991
}

The response is an array of UserRef objects. Each object contains the ArtifactID and the name of a user.

[
   {
      "ArtifactID":0,
      "Name":"Public"
   },
   {
      "ArtifactID":9,
      "Name":"Admin, Relativity"
   },
   {
      "ArtifactID":777,
      "Name":"Service Account, Relativity"
   }
]

Retrieve a list of object types in a workspace

Use the GetObjectTypesAsync endpoint to retrieve a list of object types in a workspace. You can select an object type from this list that is used for populating the ObjectType field for the View object. Send a request to this URL for the View Manager service:

<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/GetObjectTypesAsync

The request must contain the Artifact ID of the workspace that contains the view.

{
   "workspaceArtifactID":1028991
}

The response is an array of ObjectTypeRef objects that contain the DescriptorArtifactTypeID, Guids, Name, and ArtifactID for the object type.

Community Updates

Aero Developer FAQ Evolving the Platform Most recent release notes
Learn more Learn more Learn more

Additional Resources

   
Access Third-Party Tools with GitHub     Create .NET Apps Faster with NuGet
Visit github     visit nuget