Last date modified: 2026-Jun-03
Samples types and structure
There are two types of sample applications that demonstrate the use of Export Service API features:
- RelConsole - .NET console application (.NET 6, C#, Kepler Client).
- Powershell - Powershell scripts (REST)
List of samples:
| Sample Name | .NET & Kepler | Powershell |
|---|---|---|
| Export_FromFolder_NativeFiles | Sample 1 | Sample 1 |
| Export_FromFolder_Images | Sample 2 | Sample 2 |
| Export_FromFolder_PDF | Sample 3 | Sample 3 |
| Export_FromFolder_FullText | Sample 4 | Sample 4 |
| Export_FromFolder_All | Sample 5 | Sample 5 |
| Export_FromSavedSearch_NativeFiles | Sample 6 | Sample 6 |
| Export_FromSavedSearch_Images | Sample 7 | Sample 7 |
| Export_FromSavedSearch_PDF | Sample 8 | Sample 8 |
| Export_FromSavedSearch_FullText | Sample 9 | Sample 9 |
| Export_FromSavedSearch_All | Sample 10 | Sample 10 |
| Export_FromProduction_NativeFiles | Sample 11 | Sample 11 |
| Export_FromProduction_Images | Sample 12 | Sample 12 |
| Export_FromProduction_PDF | Sample 13 | Sample 13 |
| Export_FromProduction_Fulltext | Sample 14 | Sample 14 |
| Export_FromProduction_All | Sample 15 | Sample 15 |
| Export_RDO | Sample 16 | Sample 16 |
| Job_ListExportJobs | Sample 17 | Sample 17 |
| Job_StartAllRunnableJobs | Sample 18 | Sample 18 |
| Job_GetSettings | Sample 19 | Sample 19 |
| Job_Cancel | Sample 20 | Sample 20 |
KeplerClient Code Samples
To run a sample code, complete the following steps:
- Replace the variables with your url and credentials in Program.cs
-
- Replace the required variables within the samples.
-
Run the sample via dotnet run {selectedSampleID} command with the following arguments:
-
{selectedSampleID} - ID of the sample to run.
-
-json - appends additional json details to the sample output.
-
-noui - disables some UI elements on the initial screen.
-
Copy
using System.Text;
using Relativity.Export.Samples.RelConsole.Helpers;
System.Console.OutputEncoding = Encoding.UTF8;
System.Console.InputEncoding = Encoding.UTF8;
// Replace with your Relativity instance url
string relativityUrl = "http://host/";
// Replace with your Relativity credentials
string username = "username";
string password = "password";
await OutputHelper.StartAsync(args, relativityUrl, username, password);
On this page