Export (REST)
Through the REST API, the Export API allows clients to export applications as a RAP file or schema file.
Client code sample
To use the Export service, send requests by making calls with the required HTTP methods. See the following base URL for this service:
<host>/Relativity.REST/API/relativity-application/v1/workspaces/{workspaceID}/applications/

public async Task<IKeplerStream> ExportApplication(int applicationID, int workspaceID, string hostUrl, string adminUsername, string adminPassword)
{
IKeplerStream response = null;
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-CSRF-Header", string.Empty);
client.DefaultRequestHeaders.Add("Authorization", "Basic " + Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes($"{adminUsername}:{adminPassword}")));
client.DefaultRequestHeaders.Add("X-Kepler-Version", "2.0");
client.BaseAddress = new Uri(hostUrl);
string url = $"/Relativity.REST/API/relativity-application/v1/workspaces/{workspaceID}/applications/{applicationID}/rapfile";
System.Net.Http.HttpResponseMessage httpResponse = await client.GetAsync(url);
httpResponse.EnsureSuccessStatusCode();
string content = await httpResponse.Content.ReadAsStringAsync();
response = JsonConvert.DeserializeObject<IKeplerStream>(content);
}
return response;
}
ExportAsync
Note: You must be a System Admin to call this endpoint.
To export an application as a RAP file, send a GET request for one of the following URLs:
https://<host>/Relativity.REST/API/relativity-application/v1/workspaces/{workspaceID:int}/applications/{applicationID:int}/rapfile
https://<host>/Relativity.REST/API/relativity-application/v1/workspaces/{workspaceID:int}/applications/{applicationGUID:guid}/rapfile
The raw JSON response will not be human-readable.
ExportSchemaAsync
Note: You must be a System Admin to call this endpoint.
To export an application as a RAP file, send a GET request for one of the following URLs:
https://<host>/Relativity.REST/API/relativity-application/v1/workspaces/{workspaceID:int}/applications/{applicationID:int}/schema
https://<host>/Relativity.REST/API/relativity-application/v1/workspaces/{workspaceID:int}/applications/{applicationGUID:guid}/schema
The raw JSON response will not be human-readable.