Import API migration

Beginning with the RelativityOne Goatsbeard release, you must migrate any existing Import API applications to the new NuGet package called Relativity.DataExchange.Client.SDK. The RelativityOne SDK published in the Community will no longer include the Import API. In addition, the Relativity.Import.Client NuGet package has been deprecated.

The following information outlines how to migrate an existing Import API application to the new NuGet package.

Note: You must migrate to the Relativity.DataExchange.Client.SDK package to ensure that your custom applications continue to function properly. If you don't migrate your applications to the new package, they will fail.

This page contains the following information:

See this related page:

NuGet package overview

Review the following information about the Relativity.DataExchange.Client.SDK package published to NuGet Gallery:

Note: After migrating to the new NuGet package and successfully compiling your solution, you need to upload your custom Import API application to Relativity. You also need to deploy certain package dependencies. For detailed information about this process, see ADS deployment considerations.

Migrate to the NuGet package

Before you install the new Relativity.DataExchange.Client.SDK to an existing Visual Studio project, complete the following steps to remove legacy references to the Import API added from the RelativityOne SDK MSI file, or the Relativity.Import.Client NuGet package.

Step 1: Remove legacy references

To upgrade your Import API applications, you need to remove the legacy Import API .NET assemblies added from the RelativityOne SDK MSI file or references to the Relativity.Import.Client NuGet package.

Depending on how you added your Import API .NET assemblies, perform one of the following tasks:

Note: In your existing Visual Studio projects, remove only the .NET assemblies or uninstall only the package listed in the following sections.

Uninstall Relativity.Import.Client Nuget package

As of the Goatsbeard release, the Relativity.Import.Client Nuget package has been deprecated. If you added this package to your Visual Studio project, run the following command from the Package Manager Console to uninstall it:

Uninstall-Package Relativity.Import.Client -RemoveDependencies
Dependencies error message

If the Package Manager Console displays a message indicating that it can't uninstall the Relativity.Import.Client Nuget package due to other dependencies, run the following command from the Package Manager Console:

Uninstall-Package Relativity.Import.Client -RemoveDependencies -Force

Remove .NET assemblies and native binaries from the RelativityOne SDK MSI

If you added Import API from the RelativityOne SDK MSI file, remove the following files from all C# or VB.NET projects:

RelativityOne SDK DLLs
Relativity.Transfer.Client DLLs
Outside In DLLs

Step 2: Add a reference to the new NuGet package

To install the new Relativity.DataExchange.Client.SDK package, run the following command from the Package Manager Console:

Install-Package Relativity.DataExchange.Client.SDK

Step 3: Build the solution

Build the solution and verify that all projects compiled successfully.

If your build fails, complete the steps in the following sections as necessary:

Note: After migrating to the new NuGet package and successfully compiling your solution, you need to upload your custom Import API application to Relativity. You also need to deploy certain package dependencies. For detailed information about this process, see ADS deployment considerations.

Identify files with the File Identification API

Use the File Identification API in Relativity.DataExchange.Io API namespace to identify file types. See the following code sample:

IFileTypeInfo fileTypeInfo1 = Relativity.DataExchange.Io.FileTypeIdentifierService.Instance.Identify()(@"C:\VOL00001\NATIVES\NATIVE00001\AZIPPER_0008560.xls");
int fileId = fileTypeInfo1.Id;
string fileType = fileTypeInfo1.Description;

Update any legacy code that uses the kCura.OI.FileID assembly to identify files types. The following code sample illustrates legacy code that must be updated to use the new File Identification API:

FileIDData fileIdData1 = kCura.OI.FileID.Manager.Instance.GetFileIDDataByFilePath(@"C:\VOL00001\NATIVES\NATIVE00001\AZIPPER_0008560.xls");
int fileId = fileIdData1.FileID;
string fileType = fileIdData1.FileType;

Add a reference to Relativity.Other package

If your Import API application uses objects from the kCura or Relativity .NET assemblies, add a reference to the Relativity.Other package to continue using these components.

Catch the RelativityNotSupportedException

Beginning with the Goatsbeard release, the RelativityNotSupportedException is thrown when the API isn't compatible with the import or export API services provided by Relativity. See the following code sample:

try {
 ImportAPI iapi = new ImportAPI(relativityUserName, relativityPassword, relativityWebAPIUrl);
} catch (RelativityNotSupportedException) {
 // This SDK version isn't supported by the import/export API services provided by Relativity!
}

Update any legacy code that throws the RelativityVersionMismatchException from the ImportAPI class constructor when the .NET assembly for the Import API didn’t match the Relativity version. The following code sample illustrates legacy code that must be updated with the new exception:

try {
 ImportAPI iapi = new ImportAPI(relativityUserName, relativityPassword, relativityWebAPIUrl);
} catch (RelativityVersionMismatchException) {
 // This API assembly version doesn't match the Relativity assembly version!
}

Reference Relativity.DataExchange section in app.config file

As part of the Goatsbeard release, the app.config file now includes a single section called Relativity.DataExchange. This section contains all the configuration setting available for use with the Import API. If your Import API projects currently reference the config.app file, we recommend that you migrate them to the newly formatted version of it.

Note: The Goatsbeard release will continue to support the older version of the app.config file with the kCura.WinEDDS, kCura.Utility, and other sections, but you should plan to migrate to the newly formatted version of the file containing the Relativity.DataExchange section.

For more information, see the following pages;

ADS deployment considerations

After completing the migration process, you need to add your updated application to Relativity. For information on this process, see Deploy Import API applications.

Community Updates

Aero Developer FAQ Evolving the Platform Most recent release notes
Learn more Learn more Learn more

Additional Resources

   
Access Third-Party Tools with GitHub     Create .NET Apps Faster with NuGet
Visit github     visit nuget