REST API overview
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.
See this related page:
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 create, 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 concepts
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:
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 – The REST API requires clients to page through all search results. When you initially make a request, the number of resources that will be returned can’t be immediately determined, so all lists of data must be paged to support large result sets.
- Specify additional fields to return – The REST API returns only the default set of fields for a resource unless you provide a query string that specifies additional fields or all fields on the object. You can improve performance by retrieving only default fields or those additional fields that you need.
- Use queries to filter data – You can filter a list of resources by performing a query, which is a request that uses the POST method and contains conditions in a JSON representation. After the REST API returns the search result resource, you can page through the list of resources returned in it. You can’t use a query string to filter a collection of resources. See Query for resources.
- Provide required headers – You must include authentication credentials and an empty CSRF header in every request that you make to the REST API. See HTTP headers.