Persistent Highlight Service (REST)

In Relativity, you use persistent highlight sets to configure and apply term highlighting as part of the document review process in the viewer. You can identity terms in a document to highlight and then configure the color used to highlight them. You can also apply multiple highlights set to a single document. For more information, see Persistent highlight sets.

The Persistent Highlight Service provides the following functionality for programmatically working with these sets:

  • Retrieve information about the persistent highlight sets and terms used in a specific document or workspace.
  • Set terms or highlight sets as active or inactive.
  • Add new terms to a persistent highlight set

As a sample use case, you might create a custom viewer that displays and reads persistent highlight sets and terms.

You can also use the Persistent Highlight Service through .NET. For more information, see Persistent Highlight Service (.NET).

Guidelines for using the Persistent Highlight Service

Review the following guidelines for working with the Persistent Highlight Service.

URLs

The URLs for REST endpoints contain path parameters that you need to set before making a call:

  • Set {versionNumber} to the version of the API, using the format lowercase v and the version number, such as v2.
  • Set other path parameters in the URLs to the Artifact ID of a given entity, such as {workspaceID} to the Artifact ID of a workspace.

For example, you can use the following URL to retrieve persistent highlight sets for a specific workspace:

Copy
<host>Relativity.REST/api/relativity-documentViewer/{versionNumber}/workspaces/{workspaceID}/highlight-sets

Set the path parameter as follows:

  • {versionNumber} to the version of the service, such as v2.
  • {workspaceID} to the Artifact ID of the workspace containing the persistent highlight sets to retrieve.

Retrieve persistent highlight sets

To retrieve persistent highlight sets, send a GET request to one of the following URLs:

  • Retrieve persistent highlight sets and terms in a specific workspace:
  • Copy
    <host>Relativity.REST/api/relativity-documentViewer/{versionNumber}/workspaces/{workspaceID}/highlight-sets
  • Retrieve persistent highlight sets and terms for a specific document:
  • Copy
    <host>Relativity.REST/api/relativity-documentViewer/{versionNumber}/workspaces/{workspaceID}/documents/{documentID}/highlight-sets

The request body is empty.

Change the state of a persistent highlight set

To change the state of a persistent highlight set or make the terms or set inactive, send a POST request with a URL in the following format:

Copy
<host>Relativity.REST/api/relativity-documentViewer/{versionNumber}/workspaces/{workspaceID}/highlights/{persistentHighlightSetID}/state

Add new terms to a persistent highlight set

To add new terms to a persistent highlight set, send a POST request with a URL in the following format:

Copy
<host>Relativity.REST/api/relativity-documentViewer/{versionNumber}/workspaces/{workspaceID}/highlights/{persistentHighlightSetID}/add-terms