Document File Manager (REST)

Through the REST API, the Document File Manager API exposes endpoints for downloading native, image, and produced image files associated with documents in Relativity. You can download a file by specifying its GUID, or you can download a native file by specifying the Artifact ID of the document associated with it. The Document File Manager API also supports retrieving information about these files, such as GUID, name, type, size, and others.

Sample use cases for the Document File Manager API include the implementing the following functionality:

  • A custom agent that downloads native audio files, transcribes them, and writes the text back to Relativity.
  • A custom page that displays the names, sizes, and types for a subset of documents.

The Document File Manager API supports the same functionality for this service as available through the REST API. For more information, see Document File Manager (.NET).

This page contains the following information:

Guidelines for the Document File Manager service

Review the following guidelines for working with this service.

The URLs for REST endpoints contain path parameters that you need to set before making a call:

  • Set {versionNumber} to the version of the API, using the format lowercase v and the version number, such as v1.
  • Set other path parameters in the URLs to the Artifact ID of a given entity, such as {workspaceID} to the Artifact ID of a workspace.
  • Note: To indicate the admin-level context, set the {workspaceID} path parameter to -1.

Client code sample

You can use the following .NET code as a sample client for downloading a native file. This code illustrates how to perform the following tasks:

  • Instantiate an HttpClient object for sending requests to the Document File Manager service.
  • Set the required headers for the request.
  • Initialize variables with the values for the workspace and document Artifact IDs.
  • Set the url variable to the URL for downloading a native file.
  • Use the GetAsync() method to send a GET request.
  • Return the results of the request as a Stream object.
  • Save the file on disk using the file name specified in the ContentDisposition header.

Retrieve document file information

You can retrieve information about the files associated with a document, including the file name, GUID, page orientation and others.

Note: To retrieve the file information for a document, you must have rights to view it in the workspace. Additionally, you must have access rights to view a production for its associated files to be include in the results.

Download files

You can download native, image, and produced image files associated with documents in Relativity using the following endpoints:

These endpoints return the binary data of a file. The response contains these headers with the following settings:

  • Transfer-Encoding - this heading is set to chunked.
  • Content-Type - the extension of the file determines the value of this header.
  • Content-Disposition - the name of the file as defined within Relativity determines the filename in attachment; filename=.

Note: For native and image files, you must have permissions to the document in the workspace. For produced image files, you must have permissions to both the document and the production that includes the produced images.

Download a file by GUID

You can download a native, image, or produced image file by specifying its GUID in a call to the DownloadFile endpoint. To obtain the GUID of a file for download, use the GetFileInfo endpoint. See Retrieve document file information.

Download a native file by Document Artifact ID

You can download a native file by specifying the Artifact ID of the document associated with it. This convenience endpoint functions similarly to calling the DownloadFile endpoint with the GUID for a native file, except that you specify the Artifact ID of a document.

Additional Resources

DevHelp Community GitHub Release Notes NuGet

Share knowledge with the Relativity developer community.

Access tools and resources to build an application.

Review the most recent product release notes.

Create .NET Apps faster with NuGet.