Mass Operation Manager (REST)

You can add mass operations to object types to further customize their behavior. When a user interacts with a mass operation, you can display a custom page or execute an event handler with specialized functionality. For general information about mass operations, see Adding a custom mass operation.

The Mass Operation Manager service includes endpoints for creating, reading, updating, and deleting mass operations. It also includes helper endpoints for retrieving information about object types that be associated with a mass operation, and available event handlers and layouts for use with mass operations.

You can also work with this service through .NET. For more information, see Mass Operation Manager (.NET).

Postman sample files

You can use the Postman sample files to become familiar with making calls to endpoints on the services. To download the sample files, click {versionNumber}MassOperationsPostmanFiles.zip.

Client code sample

To use the Mass Operations Manager service, send requests by making calls with the required HTTP methods. See the following base URL for this service:

Copy
<host>/Relativity.Rest/api/relativity-extensibility/{versionNumber}/workspaces/{workspaceID}/mass-operations

Fundamentals for Mass Operation Manager

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.
  • 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.

Review the following guidelines for working with this service:

Note: Mass operations aren't available in the admin-level context, so you must specify a workspace ID.

Create a mass operation

You can a create a mass operation that displays a custom page or that executes a custom event handler when a user interacts with it. For general information about mass operations, see Adding a custom mass operation.

Click the following drop-down links to view URLs and sample requests for mass operations that use a custom page or an event handler. For the URLs in these examples, set the {WorkspaceID} variable to the Artifact ID of a workspace.

When a custom page or event handler mass operation is successfully created, the response contains the Artifact ID of the mass operation, such as 1042616. It also returns a status code of 200.

Read a mass operation

You can retrieve basic information about a mass operation or extended information, which also includes operations that you have permissions to perform on the mass operation.

  • Retrieve basic metadata for a mass operation - send a GET request with a URL in the following general format:
    Copy
    <host>/Relativity.Rest/api/relativity-extensibility/{versionNumber}/workspaces/{workspaceID}/mass-operations/{massOperationID}
  • Retrieve extended metadata for a mass operation - send a GET request with a URL in the following general format:
    Copy
    <host>/Relativity.Rest/api/relativity-extensibility/{versionNumber}/workspaces/{workspaceID}/mass-operations/{massOperationID}/true/true

For both requests, set the {WorkspaceID} variable to the Artifact ID of a workspace. Set the {massOperationId} variable to the Artifact ID of the mass operation that you want to read, and leave the body of the request empty.

A successful request will return information about the specified mass operation.

Update a mass operation

You can update a mass operation by sending a PUT request to the endpoint for a custom page or event handler mass operation.

Click the following drop-down links to view URLs and sample requests for custom page and event handler mass operations.

For the URLs in these examples, set the {WorkspaceID} variable to the Artifact ID of a workspace. Set the {massOperationId} variable to the Artifact ID of the mass operation.

Delete a mass operation

To remove a mass operation, send a DELETE request to the following URL:

Copy
<host>/Relativity.Rest/api/relativity-extensibility/{versionNumber}/workspaces/{workspaceID}/mass-operations/{massOperationID}

Set the {WorkspaceID} variable to the Artifact ID of a workspace. Set the {massOperationId} variable to the Artifact ID of the mass operation. The body of the request is empty. When the mass operation is successfully deleted, the response is a status code of 200.

Retrieve available object types for a mass operation

You can customize your object types with additional functionality by creating mass operations for them.

To retrieve a list of object types available in a workspace, send a GET request to the following URL:

Copy
<host>/Relativity.Rest/api/relativity-extensibility/{versionNumber}/workspaces/{workspaceID}/mass-operations/available-object-types

Set the {WorkspaceID} variable to the Artifact ID of a workspace.

The body of the request is empty.

Retrieve available event handlers for a mass operation

You can add an event handler for a mass operation to an object type. This event handler executes when the user executes the mass operation through the Relativity UI.

To retrieve a list of available event handlers, send a GET request to the following URL:

Copy
<host>/Relativity.Rest/api/relativity-extensibility/{versionNumber}/workspaces/{workspaceID}/mass-operations/available-event-handlers

Set the {WorkspaceID} variable to the Artifact ID of a workspace.

The body of the request is empty.

Retrieve available layouts for a mass operation

When you add a mass operation that uses an event handler to an object type, you must select a layout that displays after the user initiates the operation in the Relativity UI.

To retrieve a list of available layouts, send a POST request to the following URL:

Copy
<host>/Relativity.Rest/api/relativity-extensibility/{versionNumber}/workspaces/{workspaceID}/mass-operations/get-available-layouts

Set the {WorkspaceID} variable to the Artifact ID of a workspace.