A RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. … REST technology is generally preferred to the more robust Simple Object Access Protocol (SOAP) technology because REST leverages less bandwidth, making it more suitable for internet usage.

REST API

The REST API simplifies development by supporting standard HTTP methods, error handling, and other RESTful conventions. It also exposes resources through template URLs. You can use this lightweight platform provided by the REST API to take your software projects to the next level with the development of mobile applications that support common user interactions with Relativity.

REST API features

The RelativityREST API exposes the same functionality available through the Services API, offering a rich feature set that includes:

  • Functionality for retrieving files from File fields in RelativityDynamic Objects (RDOs).
  • Support for creating, read, update, delete, and query operations on workspaces, saved searches, documents, RDOs, and other object types.
  • Secure access to resources using flexible authentication methods, such as HTTPS and Active Directory.
  • Language independence made possible by adherence to RESTful architectural standards, providing you with the option to choose a programming language based on application requirements.
  • Implementation of standard HTTP methods and JSON resource representations.

RESTful

The Relativity REST API conforms to standard architectural principles defined by Representational State Transfer (REST). It supports these key architectural concepts common to RESTful services:

  • Uses stateless interactions – The Relativity REST service doesn’t use login sessions or store other state information on the server. Instead, the client maintains this information about each resource, which makes the REST service easier to use across load-balanced servers.
  • Communicates over HTTP – The REST service uses common HTTP methods following standard RESTful principles:
  • GET – reads data and doesn’t change application state
  • POST – creates resources and queries for data using conditions
  • PUT – updates resources
  • DELETE – removes resources from the database

Supported HTTP methods.

  • Uses standard HTTP status codes – These status codes represent the results of operations that you perform against the REST service.
  • Manipulates resources – The REST service represents the objects exposed in Relativity as resources. A unique URL identifies each resource so that you can manipulate it with standard HTTP methods. Other entities not generally identified as objects are also represented as resources.
  • Provides a hypermedia-driven API – The REST API returns responses that include links to resources available in Relativity. For example, the response for a workspace query returns a list of each matching workspaces. It represents each workspace in a simplified format that contains a link to further details about the resource.

Unique implementation details

The REST API accommodates the data model and scaling requirements of Relativity, while also supporting common RESTful principles. When consuming the REST API, you need to consider the following requirements that are unique to its implementation:

  • Use paged lists of data
  • Specify additional fields to return 
  • Use queries to filter data 
  • Provide required headers