Resource File (REST)

The Resource File API allows clients to manage resource files for the Relativity applications in their environment. It includes support for the following features:

  • Create, read, update, delete, and download of resource files.
  • Update and upload of file content and metadata.
  • Helper services for the client, including retrieving all available applications.

This page contains the following information:

Guidelines for the Resource File service

Review the following guidelines for working with this service.

URLs

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.

For example, you can use the following URL to retrieve a resource file:

<host>/relativity.rest/api/relativity-environment/{versionNumber}/workspaces/-1/resource-files/{resourceFileID}

Set the path parameters as follows:

  • {versionNumber} to the version of the API, such as v1.
  • {resourceFileID} to the Artifact ID of a specific resource file.

Client code sample

To use the Resource File service, send requests by making calls with the required HTTP methods. See the following base URL for this service:

<host>/Relativity.REST/API/relativity-environment/{versionNumber}/workspaces/-1/resource-files/{applicationID}/

Create a resource file

To create a resource file, send a POST request with a URL in the following format:

<host>/relativity.rest/api/relativity-environment/{versionNumber}/workspaces/-1/resource-files

The newly created artifact ID of the resource file will be returned in the response.

Read a resouce file

To read a resource sile, send a POST request with a URL in one of the following formats:

<host>/relativity.rest/api/relativity-environment/{versionNumber}/workspaces/-1/resource-files/{resourceFileID}
<host>/relativity.rest/api/relativity-environment/{versionNumber}/workspaces/-1/resource-files/{resourceFileID}/{includeMetadata}/{IncludeActions}

Update a resource file

To read a resource sile, send a POST request with a URL in one of the following formats:

<host>/relativity.rest/api/relativity-environment/{versionNumber}/workspaces/-1/resource-files/{resourceFileID}
<host>/relativity.rest/api/relativity-environment/{versionNumber}/workspaces/-1/resource-files/{resourceFileID}/contents/{contentsKey}

Delete a resource file

To delete a resource file, send a DELETE request with a URL in the following format:

<host>/relativity.rest/api/relativity-environment/{versionNumber}/workspaces/-1/resource-files/{resourceFileID}

Download the contents of a resource file

To downloads the contents associated with a resource file, send a GET request with a URL in the following format:

<host>/relativity.rest/api/relativity-environment/{versionNumber}/workspaces/-1/resource-files/{resourceFileID}/contents/

Upload the contents of a resource file

To upload the contents associated with a resource file, send a POST request with a URL in the following format:

<host>/relativity.rest/api/relativity-environment/{versionNumber}/workspaces/-1/resource-files/contents/

Create or update a resource file

To create or update a resource file, send a PATCH request with a URL in the following format:

<host>/relativity.rest/api/relativity-environment/{versionNumber}/workspaces/-1/resource-files/

Retrieve available applications

To retrieve a list of eligible applications, send a GET request with a URL in the following format:

<host>/Relativity.REST/api/relativity-environment/{versionNumber}/workspaces/-1/resource-files/eligible-applications

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.