Last date modified: 2026-Mar-30

Cold Storage Manager (.NET)

Two Cold Storage API endpoints (CanManageColdStorageAsync and DeleteWorkspaceFromColdStorageAsync) will be removed as part of ongoing platform cleanup and modernization actions. See this post in the developer group for more information.

The Cold Storage Manager service exposes endpoints for programmatically managing workspaces in Relativity cold storage. It includes the following features:

  • Moving workspaces in or out of cold storage
  • Deleting workspaces in cold storage
  • Provides helper endpoints that help to determine:
    • if a given workspace is in cold storage
    • if users have permission to manage cold storage workspaces

As a sample use case, you might use the Cold Storage Manager service to automatically move workspaces in and out of cold storage, or keep track of the workspaces in cold storage in a Relativity application developed for your organization.

You can also access the Cold Storage Manager service through REST. For more information, see Cold Storage Manager (REST).

Fundamentals for the Cold Storage Manager API

The Cold Storage Manager API contains the following methods and classes.

Methods

The Cold Storage Manager API includes the following methods available on the IColdStorageManager interface in the Relativity.ColdStorage.<VersionNumber>namespace:

  • MoveWorkspaceIntoColdStorageAsync - move a workspace into cold storage
  • StartMoveWorkspaceOutOfColdStorageAsync - start the process of moving a workspace out of cold storage
  • GetWorkspaceColdStorageStatusAsync - get the cold storage status for a workspace

Classes and enumerations

The Cold Storage Manager API uses the following classes and enumerations:

  • MoveWorkspaceResponse - represents information about a workspace migration to cold storage state, includes workspace id and status. The StartMoveWorkspaceOutOfColdStorageAsync() and MoveWorkspaceIntoColdStorageAsync() methods return an object of this type.
  • WorkspaceColdStorageStatus enumeration - identifies whether a workspace is in cold storage, or not.
  • WorkspaceColdStorageStatusResponse - indicates the results of a request that attempts to get the cold storage status for a workspace. The GetWorkspaceColdStorageStatusAsync() method returns an object of this type.

Guidelines for the Cold Storage Manager API

You can access the Cold Storage Manager service by creating a client proxy, and then instantiating a ColdStorageManager object.

Copy
Uri keplerEndPoint = new Uri("http://localhost/relativity.rest/api");
Services.ServiceProxy.ServiceFactory serviceFactory = new Services.ServiceProxy.ServiceFactory(new Services.ServiceProxy.ServiceFactorySettings(keplerEndpoint,
  new Services.ServiceProxy.UsernamePasswordCredentials("username", "password")));
Relativity.ColdStorage. < VersionNumber > .IColdStorageManager proxy = serviceFactory.CreateProxy < Relativity.ColdStorage. < VersionNumber > .IColdStorageManager > ();

Move Workspace Into Cold Storage

To move a workspace to cold storage, call the MoveWorkspaceIntoColdStorageAsync() method by passing the Artifact ID of the workspace.

Copy
public bool Create(IHelper helper) {
  bool success = false;
  using (IColdStorageManager proxy = helper.GetServicesManager().CreateProxy < Relativity.ColdStorage. < VersionNumber > .IColdStorageManager > (ExecutionIdentity.System)) {
    try {
      MoveWorkspaceResponse response = proxy.MoveWorkspaceIntoColdStorageAsync(SampleWorkspace_ID).GetAwaiter().GetResult();
      _logger.LogDebug("{WorkspaceID} - {Status}", response.WorkspaceID, response.Status);
    } catch (Exception ex) {
      _logger.LogError("Action failed - {message}", ex.Message);
      throw;
    }
  }
  return success;
}

Move Workspace Out Of Cold Storage

To move a workspace out of cold storage, call the StartMoveWorkspaceOutOfColdStorageAsync() method by passing the Artifact ID of the workspace.

Copy
public bool Create(IHelper helper) {
  bool success = false;
  using (IColdStorageManager proxy = helper.GetServicesManager().CreateProxy < Relativity.ColdStorage. < VersionNumber > .IColdStorageManager > (ExecutionIdentity.System)) {
    try {
      MoveWorkspaceResponse response = proxy.StartMoveWorkspaceOutOfColdStorageAsync(SampleWorkspace_ID).GetAwaiter().GetResult();
      _logger.LogDebug("{WorkspaceID} - {Status}", response.WorkspaceID, response.Status);
    } catch (Exception ex) {
      _logger.LogError("Action failed - {message}", ex.Message);
      throw;
    }
  }
  return success;
}

Get Workspace Cold Storage Status

To get workspace cold storage status, call the GetWorkspaceColdStorageStatusAsync()  method by passing the Artifact ID of the workspace.

Copy
public bool Create(IHelper helper) {
  bool success = false;
  using (IColdStorageManager proxy = helper.GetServicesManager().CreateProxy < Relativity.ColdStorage. < VersionNumber > .IColdStorageManager > (ExecutionIdentity.System)) {
    try {
      WorkspaceColdStorageStatusResponse response = proxy.GetWorkspaceColdStorageStatusAsync(SampleWorkspace_ID).GetAwaiter().GetResult();
      _logger.LogDebug("{WorkspaceID} - {Status}", response.WorkspaceID, response.Status);
    } catch (Exception ex) {
      _logger.LogError("Action failed - {message}", ex.Message);
      throw;
    }
  }
  return success;
}
Return to top of the page
Feedback