Getting started
Import Service is built as a standard Relativity Kepler Service. It provides sets of endpoints that must be called sequentially in order to execute an import.
On GitHub, you can find can comprehensive samples illustrating how to import native documents, images, objects, and productions. For additional code samples, see the Import API samples repository.
Prerequisites
Please have the following actions completed before using the Import Service API:
-
Ensure the following Relativity applications are installed:
Application name |
Application Guid |
Installed |
Import |
21F65FDC-3016-4F2B-9698-DE151A6186A2 |
workspace |
DataTransfer.Legacy |
9f9d45ff-5dcd-462d-996d-b9033ea8cfce |
instance |
- Ensure the appropriate user permissions are set.
- Place the load and source files, such as native documents, images, and text files, in the destination fileshare location accessible to the workspace. You can use the Transfer API to upload all files to the destination location.
- Install the following packages in the client application:
Required only when Kepler .NET client is used.
Authorization
The following section describes the authentication methods available for the Import Service API:
HTTP clients— Import 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 import features provided in Import Service API.
Object Security section |
Permission |
Document |
View, Add, Edit |
Relativity Import Job |
View, Add, Edit |
Relativity Import datasource |
View, Add, Edit |
Admin Operation |
Allow Import |
Make calls to import service
The following section outlines how to make calls to Import Service API.
HTTP clients
You can make calls to a import 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.
Copy
1
2
3
4
5
6
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("X-CSRF-Header", "-");
createImportJobUri = $"{host}/Relativity.REST/api/import.service/v1....
var response = await httpClient.PostAsJsonAsync(createImportJobUri, payload);
If using .NET client, the Relativity.Import.Models.SDK package containing contract models would be used.
For additional code samples, see Import Service API samples.
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 import services and credentials. Then use .NET proxy to interact with a import 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 import service are exposed in Relativity.Import.SDK package.
Copy
1
2
3
4
5
6
7
8
9
10
using (Relativity.Import.V1.Services.IImportJobController importJobController =_serviceFactory.CreateProxy<Relativity.Import.V1.Services.IImportJobController>())
{
// Create import job.
Response response = await importJobController.CreateAsync(
importJobID: importId,
workspaceID: workspaceId,
applicationName: "Import-service-sample-app",
correlationID: "Sample-job-0001");
}
}
For additional code samples, see Import Service API samples.