Analytics Classification Index (REST)

A classification index is a type of index used by Relativity Analytics. This index type uses coded examples to build a Support Vector Machine (SVM) to predict the relevance of a document. It learns how terms are related to categories based on the contents of your documents and coding decisions made within the Active Learning project. This index type is used solely by the Active Learning application. For general information, see on the Relativity Documentation site.

The Analytics Classification Index service supports programmatically managing classification indexes in Relativity Analytics. It includes the following features:

  • Supports CRUD operations on classification indexes.
  • Provides helper endpoints that simplify working with index jobs. You can use these endpoints to submit and cancel jobs, and to check on their statuses. These jobs can populate new data, build new indexes, and activate indexes for use.

As a sample use case, you might use this service in an application to programmatically operate on a classification index.

You can also use the Classification Index service through .NET. For more information, see Analytics Classification Index (.NET).

Guidelines for using the Classification Index service

Review the following guidelines for working with the Classification Index service. For additional information, see Analytics Classification Index (.NET).

URLs

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

  • Set the {versionNumber} placeholder to the version of the REST API that you want to use, using the format lowercase v and the version number, for example v1 or v2
  • Set other path parameters in the URLs to the Artifact ID of a given entity, for example setting {workspaceID} to the Artifact ID of a workspace.
  • Note: To indicate the admin-level context, set the {workspaceID} path parameter to -1.

For example, you can use the following URL to retrieve a classification index:

Copy
<host>/Relativity.REST/API/classification-analytics/{versionNumber}/workspaces/{workspaceID}/indexes/{indexID}

Set the path parameters as follows:

  • {versionNumber} to the version of the service, such as v1.
  • {workspaceID} to the Artifact ID of the workspace that contains the index.
  • {indexID} to the Artifact ID of a specific index.

Postman sample file

You can use the Postman sample file to become familiar with making calls to endpoints on the Classification Index service. To download the sample file, click Classification Index Postman file.

To get started with Postman, complete these steps:

  1. Obtain access to a Relativity environment. You need a username and password to make calls to your environment.
  2. Install Postman.
  3. Import the Postman sample file for the service. For more information, see Working with data files on the Postman web site.
  4. Select an endpoint. Update the URL with the domain for your Relativity environment and any other variables.
  5. In the Authorization tab, set the Type to Basic Auth, enter your Relativity credentials, and click Update Request.
  6. See the following sections on this page for more information on setting required fields for a request.
  7. Click Send to make a request.

Create a classification index

To create an index, send a POST request to a URL with the following format:

Copy
<host>/Relativity.REST/API/classification-analytics/{versionNumber}/workspaces/{workspaceID}/indexes

When the index is successfully created, the response returns the status code of 201 and the Artifact ID of the index object.

Retrieve a classification index

To read an index, send a GET request to a URL with the following format:

Copy
<host>/Relativity.REST/API/classification-analytics/{versionNumber}/workspaces/{workspaceID}/indexes/{indexID}

The body of the request is empty.

Update a classification index

To update an index, send a PUT request to a URL with the following format:

Copy
<host>/Relativity.REST/API/classification-analytics/{versionNumber}/workspaces/{workspaceID}/indexes/{indexID}

The request for an update operation contains the same fields as those for a create request. See the field descriptions for the request in Create a classification index.

When the index is successfully updated, the response returns the status code of 201.

Delete a classification index

To delete an index, send a DELETE request to a URL with the following format:

Copy
<host>/Relativity.REST/API/classification-analytics/{versionNumber}/workspaces/{workspaceID}/indexes/{indexID}

The body of the request is empty.

When the index is successfully deleted, the response returns the status code of 200.

Helper endpoints for classification index jobs

Use the following endpoints for managing jobs related to classification indexes.

Submit a classification index job

To submit an index job, send a POST request to a URL with the following format:

Copy
<host>/Relativity.REST/API/classification-analytics/{versionNumber}/workspaces/{workspaceID}/indexes/{indexID}/job

When the job is successfully submitted, the response returns the status code of 200.

Retrieve the status of a job

To get an index status, send a GET request to a URL with the following format:

Copy
<host>/Relativity.REST/API/classification-analytics/{versionNumber}/workspaces/{workspaceID}/indexes/{indexID}/status

The body of the request is empty.

Cancel a job

To cancel a running index job, send a DELETE request to a URL with the following format:

Copy
<host>/Relativity.REST/API/classification-analytics/{versionNumber}/workspaces/{workspaceID}/indexes/{indexID}/job

The body of the request is empty.

When the job is successfully canceled, the response returns the status code of 200.