Last date modified: 2026-Sep-09

Processing Filter Manager (REST) v2

Processing filters provide functionality to view and select processed documents before publishing them to Relativity. The Processing Filter Manager service exposes endpoints for programmatically creating, updating, and deleting filters. It supports applying these filters to data and retrieving the filtered data. Additionally, this service exposes helper endpoints for retrieving filters associated with a data source or available in a specific workspace. For more general information, see Filtering data.

As a sample use case, you may want to implement a simplified processing workflow by programmatically adding complex criteria to filters applied to processing jobs in Relativity. This approach eliminates the need to manually enter filter criteria through the UI, which may be time consuming and error prone. Similarly, you can also use the Processing Filter Manager service to modify the settings on these or other complex filters implemented in your environment.

The Processing Filter Manager service also supports the same functionality through .NET. For more information, see Processing Filter Manager (.NET) v2.

Client code sample

To use the Processing Filter Manager service, send an HTTP request to the target URL. Use PostAsync() for POST requests, GetAsync() for GET requests, and PutAsync() for PUT requests. You specify query conditions in the body of the request. See the base URL for this service:

Copy
<host>/Relativity.Rest/API/relativity-processing/v2/workspaces/{your workspace id}/

Guidelines for the Processing Filter Manager service

Review the following guidelines for working with this service.

Access rights

Verify that you have access to the workspace where you want make calls to the Processing Filter Manager service.

Filter expressions

To create or update a processing filter, use the expression types, operators, and properties supported by the Processing Filter Manager service for this purpose. For more information on objects used to build expressions, see Processing Filter Manager (.NET) v2.

Expression types

The following types of expressions are supported:

  • Composite expression - several shorter expressions that are combined by using the AND and OR operators. See Operators.
  • Conditional expression - expressions that use Boolean conditions for evaluation. See Operators.
  • Empty expression - an empty expression object used to create expressions.

Operators

The following operators are supported in expressions:

  • Constraint operators - Is, IsNot, IsIn, and IsNotIn.
  • Composite operators - AND and OR.

Properties

Click the following drop-down link to view a list of properties supported for use in expressions.

  • ContainerExtension
  • ContainerFileId
  • ContainerName
  • DocumentError
  • FileExtension
  • FileName
  • FileType
  • IsDeleted
  • OriginalPath
  • ParentDocumentId
  • LogicalID
  • ProcessingFolderPath
  • SourcePath
  • StorageError
  • StorageId
  • TextExtractionMethod
  • VirtualPath

Apply a processing filter

To apply a filter to the documents in a data set, send a POST request to the following URL. The value for {your filter Artifact ID} is the identifier assigned to a processing filter. You obtain the identifier for a filter by calling the GetFilterByDataSourceAsync or GetFiltersAsync endpoints. See Processing Filter Manager (REST) v2 or Processing Filter Manager (REST) v2.

Copy
<host>/Relativity.Rest/API/relativity-processing/v2/workspaces/{your workspace id}/filters/{your filter Artifact ID}/apply

The body of the request must contain the following fields unless specifically identified as optional:

  • request - represents a request to apply a specific filter to a data set:
    • Priority - an integer value indicating the precedence of the filtering job. Jobs with the lowest values are processed first.
Copy
{
    "request":
    {
        "Priority" : 100
    }
}

When the request is successful, the response contains a value of type long, which is the ID for the job that was executed.

Copy
{
    13242 
}

Retrieve discovered documents

After you apply a processing filter, you can use the documents endpoint to retrieve the filtered discovered documents. Send a POST request to the following URL:

Copy
<host>/Relativity.Rest/API/relativity-processing/v2/workspaces/{your workspace id}/filters/documents

The body of the request must contain the following fields unless specifically identified as optional:

  • request - represents a request to retrieve filtered discovered documents. It contains the following fields:
    • StartingPointOfResult - the index of the first row in the result set to return. The result set uses a zero-based index.
    • NumberOfResults - the total number of rows in the result set to return. The value in the StartingPointOfResult field indicates the first row of the result set to return.
    • Expression - the criteria used to select a subset of documents. The documents are filtered by this criteria. In this field, you set the type of expression, as indicated by \"Type\" : \"ConditionalExpression\". See Filter expressions.
      Click the following drop-down link to view a table of constraint values supported based on data type.
    • SortingOptions - the priority of sorting applied after retrieval of discovered documents. The array contains the following fields:
      • Property - represents a sortable property of discovered documents. Available property values are listed in the constraint values table.
      • Order - the method of sorting applied to discovered documents. The value can be Ascending or Descending.
    • IncludeDuplicateHash - Include the calculated processing duplicate hash (PDH) in the response, typically used for deduplication. The value is true/false. If set to false, the PDH will not be included in the response data.
      Including the PDH may impact performance. Set this value to false, unless you specifically need to retrieve the ProcessingDuplicateHash value.
Copy
{
    "request":
    {
        "StartingPointOfResult": 0,
        "NumberOfResults": 10, "Expression":"{\"Type\":\"CompositeExpression\",\"Expressions\":[{\"Type\":\"ConditionalExpression\",\"Property\":\"IsDeleted\",\"Constraint\":\"Is\",\"Value\":false},{\"Type\":\"ConditionalExpression\",\"Property\":\"LogicalID\",\"Constraint\":\"Is\",\"Value\":\"123\"}],\"Operator\":\"And\"}",
        "ExcludeTotalCount":false,
        "SortingOptions":[],
        "IncludeDuplicateHash":true
    }
}

Retrieve filtered data

After you apply a processing filter, you can send a GET request to the following URL to retrieve the filtered data. The value for {your filter Artifact ID} is the identifier assigned to a processing filter. You obtain the identifier for a filter by calling the GetFilterByDataSourceAsync or GetFiltersAsync endpoints. See Processing Filter Manager (REST) v2 or Processing Filter Manager (REST) v2.

Copy
<host>/Relativity.Rest/API/relativity-processing/v2/workspaces/{your workspace id}/filters/results/{your filter Artifact ID}?skip=0&top=10

Pivot on discovered documents

After you apply a processing filter, you can use the pivot-discovered-documents endpoint to retrieve filtered discovered documents on pivot. Send a POST request to the following URL:

Copy
<host>/Relativity.Rest/API/relativity-processing/v2/workspaces/{your workspace id}/filters/pivot-discovered-documents

The body of the request must contain the following fields unless specifically identified as optional:

  • request - represents a request to retrieve processing filters for a data source. It contains the following fields:
    • Expression - the criteria used to select a subset of documents. The documents are filtered by this criteria. In this field, you set the type of expression, as indicated by \"Type\" : \"ConditionalExpression\". See Filter expressions. Click the following drop-down link to view a table of constraint values supported based on data type.
    • PivotOnOption - the total number of rows in the result set to return. The value in the StartingPointOfResult field indicates the first row of the result set to return.
      • GroupByProperty - the name of the property to perform group by on.
      • GroupByCount - the integer value used to select the number of top or bottom rows to group by. The default value is 0.
      • PivotOnProperty - (optional) the string representation of the property to perform pivot on.
      • PivotOnCount - (optional) the number of pivot results. The default value is 0.

When the request is successful, the response will return a List of GetDiscoveredDocumentsWithPivotOnResponse objects.

The response contains the following fields:

  • GroupByIdentifier - the value of the property that is being grouped by.
  • PivotOnIdentifier - the value of the property that is being pivoted on.
  • ResultCount - the total of each property.

Get discovered documents IDs

You can retrieve discovered document IDs by sending a POST request to the following URL:

Copy
<host>/Relativity.Rest/API/relativity-processing/v2/workspaces/{your workspace id}/filters/document-ids

Request Body Sample

Copy
{
    "request":
    {
        "StartingPointOfResult": 0,
        "NumberOfResults": 10, "Expression":"{\"Type\":\"CompositeExpression\",\"Expressions\":[{\"Type\":\"ConditionalExpression\",\"Property\":\"IsDeleted\",\"Constraint\":\"Is\",\"Value\":false},{\"Type\":\"ConditionalExpression\",\"Property\":\"LogicalID\",\"Constraint\":\"Is\",\"Value\":\"123\"}],\"Operator\":\"And\"}",
        "ExcludeTotalCount":false,
        "SortingOptions":[]
    }
}

Download discovered documents list

Download discovered documents list by sending a POST request to the following URL:

Copy
<host>/Relativity.Rest/API/relativity-processing/v2/workspaces/{your workspace id}/filters/csvs

Request Body Sample

Copy
{
  "request": {
    "Expression": "{\"Type\":\"ConditionalExpression\",\"Property\":\"IsDeleted\",\"Constraint\":\"Is\",\"Value\":false}",
    "SortingOptions": [],
    "Columns": [
      {
        "Header": "File ID",
        "Property": 1
      },
      {
        "Header": "File Name",
        "Property": 9
      },
      {
        "Header": "File Type",
        "Property": 11
      }
    ],
    "LogicalIDs": []
  }
}
The LogicalIDs array takes precedence over Expression. If both are specified, then LogicalIDs array is used.

Download NISTed documents list for a processing set

Download a NISTed documents list for a specific processing set by sending a GET request to the following URL:

Copy
<host>Relativity.Rest/API/relativity-processing/v2/workspaces/{your workspace id}/filters/get-nisted-documents?processingSetId={processing set id}

When the request is successful, this downloads a CSV file containing data for each NISTed file in the specified processing set.

The CSV file contains the following for each NISTed file:

  • FileName—the file name of the file that was deNISTed.
  • NistFileName—the name of NIST file that the native was deNISTed against. This name will match the FileName on the NIST table in the Invariant database.
  • FileSize—the size of the native file that was deNISTed. This should match the filesize of the file in the NIST table of the Invariant database.
  • SHA1—the SHA1 hash of the native file that was deNISTed. This should match the SHA1 hash of the file in the NIST table of the Invariant database.

If the NISTed file has a parent, it also contains:

  • ParentFileName—the filename of the parent file that was deNISTed.
  • ParentLevel—the depth of the native file within nested containers at the time of deNISTing. A value of 1 represents a file directly contained within a single parent container, with higher values indicating deeper levels of nesting.
  • ParentVirtualPath—the virtual path showing the hierarchical location of the native file within its parent structure.
  • ParentContainerName—the name of the container file (such as a ZIP, PST, or EML) that directly contained the native file when it was deNISTed.
  • ParentSourcePath—the original source path of the parent container from which the native file was extracted. This reflects the container’s location at the time of processing.

Path information is not available for any NISTed files that do not have a parent.

Feedback