Last date modified: 2025-Jun-17
Getting started
Export Service is built as a standard Relativity Kepler Service. It provides sets of endpoints that must be called sequentially in order to execute an export.
On GitHub, you can find can comprehensive samples illustrating how to export native documents, images, objects, and productions. For additional code samples, see the Export API samples repository.
Prerequisites
Please have the following actions completed before using the Export Service API:
-
Ensure the following Relativity applications are installed:
Application name Application Guid Installed Export 4abc11b0-b3c7-4508-87f8-308185423caf workspace DataTransfer.Legacy 9f9d45ff-5dcd-462d-996d-b9033ea8cfce instance - Ensure the appropriate user permissions are set.
- Install the following packages in the client application:
Authorization
The following section describes the authentication methods available for the Import Service API:
HTTP clients— Export Service API conforms to the same authentication rules as other Relativity REST APIs. For more information, see REST API authentication.
Kepler .NET client— the Kepler framework uses a proxy to handle client requests. For more information, see Proxies and authentication.
Permissions
The following permissions are required to use export features provided in Export Service API.
| Object Security section | Permission |
|---|---|
| Production | View |
| Relativity Export Service Job | View, Add, Edit |
| Tab Visibility |
|---|
| Documents |
| Admin Operation |
|---|
| Allow Export |
Make calls to export service
The following section outlines how to make calls to Export Service API.
HTTP clients
You can make calls to a export service using any standard REST or HTTP client. All Keplers APIs are exposed over the HTTP protocol, you need to set the required X-CSRF-Header. For more information, see Client-side interactions with a Kepler service.
1
2
3
4
5
6
7
8
9
10
11
12
string usernamePassword = string.Format("{0}:{1}", username, password);
string base64usernamePassword = Convert.ToBase64String(Encoding.ASCII.GetBytes(usernamePassword));
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("X-CSRF-Header", "-");
// Basic authentication
client.DefaultRequestHeaders.Add("Authorization", "Basic " + base64usernamePassword);
var createExportUri = $"{relativityUrl}/export/v1/workspaces/{workspaceId}/jobs/{jobId}";
var response = await httpClient.PostAsJsonAsync(createExportUri, payload);
Kepler .NET client
You can access Kepler service from any .NET language using the client library provided as part of the Kepler framework. It exposes a factory class that you can use to create the client proxy by passing URLs to export services and credentials. Then use .NET proxy to interact with a export service as a set of .NET objects. When you call a member method, the proxy makes a corresponding HTTP request to the respective service endpoint. For more information, see Client-side interactions with a Kepler service.
Kepler contract for export service are exposed in Relativity.Export.SDK package.
1
2
3
4
5
6
7
8
9
10
public IServiceFactory GetServiceFactory()
{
Uri relativityRestUri = new Uri($"{this._host}relativity.rest/api");
Credentials credentials = new UsernamePasswordCredentials(this._username, this._password);
ServiceFactorySettings settings = new ServiceFactorySettings(relativityRestUri, credentials);
// Create proxy factory.
return new ServiceFactory(settings);
}