File Field Manager service

The File Field Manager service includes endpoints for uploading and downloading files linked to file fields. As a sample use case, you might leverage this service to create a custom page with links for downloading files from Relativity.

The Relativity Services API also provides functionality for downloading and uploading files linked to file fields. It also supports the use of progress indicators and cancellation tokens through .NET. For more information, see File Field Manager API.

This page contains the following information:

Sample workflow for working with file fields

The sample workflow outlines how you might use the Object Manager API in conjunction to the File Field Manager API to add files to Relativity:

  1. Create a Relativity object with field of type File. For example, you could use the Object Manager API to create an RDO with a File field. See Create an RDO and its specified fields.
  2. Upload a file as the value for the File field created in step 1. Use the File Field Manager API to upload this file. See Uploading files to file fields.
  3. Save the updated RDO. Use the Object Manager API to update RDO. See Update fields on a Document object or RDO.

After you upload a file to Relativity via the File Field Manager API, it is added to temporary storage on the server until the RDO with the File field is saved. If the RDO with the File field and associated file aren’t saved, the server deletes it after about twenty-four hours.

Uploading files to file fields

To upload a file to a file field, use a URL with following general format:

<host>/Relativity.Rest/API/Relativity.FileField/workspace/{workspaceId}/file/upload

Note: Set the {workspaceId} to -1 to indicate the admin-level context.

The following URL contains sample data:

<host>/Relativity.Rest/API/Relativity.FileField/workspace/1016847/file/upload

The request must include the following fields:

The request content is a bit stream representing the file that you are uploading. See the following sample JSON:

{
   "field":{
      "ArtifactID":1098145
   },
   "objectRef":{
      "ArtifactID":1001637
   },
   "fileName":"Sample File"
},

The response contains the following fields:

{
   "UploadedFileGuid":"8bb7059c-07cc-453a-8b84-981296d7263d",
   "Filename":"Sample File"
}

Downloading files from file fields

To download a file from a file field, use a URL with following general format:

<host>/Relativity.Rest/API/Relativity.FileField/workspace/{workspaceId}/file/download

Note: Set the {workspaceId} to -1 to indicate the admin-level context.

The following URL contains sample data:

<host>/Relativity.Rest/API/Relativity.FileField/workspace/1016847/file/download

The request must include the following fields:

{
   "field":{
      "ArtifactID":1035345
   },
   "objectRef":{
      "ArtifactID":1037898
   }
}

The response is a bit stream representing the file that you are downloading.

Community Updates

Aero Developer FAQ Evolving the Platform Most recent release notes
Learn more Learn more Learn more

Additional Resources

   
Access Third-Party Tools with GitHub     Create .NET Apps Faster with NuGet
Visit github     visit nuget