Relativity Services API (RSAPI) DTOs have been deprecated and are no longer supported. For more information and alternative APIs, see RSAPI deprecation process.

Relativity Dynamic Object (RDO)

A Relativity Dynamic Object (RDO) resource represents a custom object defined by a system admin or third-party developer. It is a workspace-level object.

This page contains the following information:

GET method

You can use the GET method to retrieve a single RDO or a collection of RDOs. You can also use this method when downloading a file from an RDO. For more information, see Retrieve resources and Download files from Relativity Dynamic Objects.

Retrieve an RDO

When you retrieve a single RDO, you must supply a unique identifier (such as a GUID or ArtifactID) for the resource.

Sample URL

The URL contains the identifier for an RDO resource. You don't need to provide a body with a GET request.

/localhost/Relativity.REST/Workspace/1015349/Example%20RDO/1041611
        

Code sample

//Set up the client.
            
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("http://localhost/");
 
//Set the required headers.
httpClient.DefaultRequestHeaders.Add("X-CSRF-Header", "-");
httpClient.DefaultRequestHeaders.Add("Authorization", "Basic c2FtcGxlYWRtaW5AcmVsYXRpdml0eS5yZXN0OlMwbTNwQHNzdzByZA==");
 
//Call the GET method on an RDO. It is named "Example RDO" in this sample.
string url = "Relativity.REST/Workspace/1015349/Example%20RDO/1041611";
HttpResponseMessage response = httpClient.GetAsync(url).Result;
string result = response.Content.ReadAsStringAsync().Result;
bool success = HttpStatusCode.OK == response.StatusCode;
 
//Parse the result with Json.NET.
JObject resultObject = JObject.Parse(result);
        

Response

Retrieve a collection of RDOs

You can retrieve a collection of RDOs with the GET method.

Sample URL

The URL indicates that you are retrieving a collection of RDO resources. You don't need to provide a body with this GET request.

/localhost/Relativity.REST/Workspace/1015349/Example%20RDO
        

Code sample

//Set up the client.
            
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("http://localhost/");
 
//Set the required headers.
            
httpClient.DefaultRequestHeaders.Add("X-CSRF-Header", "-");
httpClient.DefaultRequestHeaders.Add("Authorization", "Basic c2FtcGxlYWRtaW5AcmVsYXRpdml0eS5yZXN0OlMwbTNwQHNzdzByZA==");
 
//Call the GET method on an RDO collection. It is named "Example RDO" in this sample.
            
string url = "Relativity.REST/Workspace/1015349/Example%20RDO";
HttpResponseMessage response = httpClient.GetAsync(url).Result;
string result = response.Content.ReadAsStringAsync().Result;
bool success = HttpStatusCode.OK == response.StatusCode;
 
//Parse the result with Json.NET.
            
JObject resultObject = JObject.Parse(result);
        

Response

POST method

You can use the POST method to perform complex queries or to create resources. For more information, see Perform queries and Create resources.

Query for an RDO resource

You can set conditions used to query for an RDO resource.

Sample URL

/localhost/Relativity.REST/Workspace/1017860/Custom%20Object/QueryResult?pagesize=2
        

Code sample

//Set up the client.
            
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("http://localhost/");
 
//Set the required headers.
httpClient.DefaultRequestHeaders.Add("X-CSRF-Header", "-");
httpClient.DefaultRequestHeaders.Add("Authorization", "Basic c2FtcGxlYWRtaW5AcmVsYXRpdml0eS5yZXN0OlMwbTNwQHNzdzByZA== ");
 
//Calling query on a RDO.
//This sample query uses paging when more than two items are in the results set.
string url = string.Format("/Relativity.REST/Workspace/{0}/Custom%20Object/QueryResult?pagesize=2", 1017860);
StringContent content = new StringContent(QueryInputJSON);
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
HttpResponseMessage response = httpClient.PostAsync(url, content).Result;
string result = response.Content.ReadAsStringAsync().Result;
bool success = HttpStatusCode.Created == response.StatusCode;
 
//Parse the result with Json.NET.
JObject resultObject = JObject.Parse(result);
 
//Pull back the next page of results.
string nextPageUrl = (string) resultObject["NextPage"];
response = httpClient.GetAsync(nextPageUrl).Result;
string nextPageResult = response.Content.ReadAsStringAsync().Result;
bool successOnNextPage = HttpStatusCode.OK == response.StatusCode;
        

Request

Response

Create an RDO resource

You can create an RDO with the POST method. A Workspace is the parent object of the RDO created in this example. For more information, see Create resources and Create an RDO with a non-workspace parent object.

Sample URL

/localhost/Relativity.REST/Workspace/1015349/Example%20RDO
        

Sample code

//Set up the client.
            
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("http://localhost/");
 
//Set the required headers.
            
httpClient.DefaultRequestHeaders.Add("X-CSRF-Header", "-");
httpClient.DefaultRequestHeaders.Add("Authorization", "Basic c2FtcGxlYWRtaW5AcmVsYXRpdml0eS5yZXN0OlMwbTNwQHNzdzByZA==");
 
//Call the POST method on an RDO. It is named "Example RDO" in this sample.
string url = "Relativity.REST/Workspace/1015349/Example%20RDO";
StringContent content = new StringContent(CreateInputJSON, Encoding.UTF8, "application/json");
HttpResponseMessage response = httpClient.PostAsync(url, content).Result;
string result = response.Content.ReadAsStringAsync().Result;
bool success = HttpStatusCode.Created == response.StatusCode;
 
//Parse the result with Json.NET.
            
JObject resultObject = JObject.Parse(result);
        

Request

Response

Create an RDO with a non-Workspace parent object

You can create RDOs with parent objects of other types than workspace. The JSON representation must include the Parent Artifact and the Artifact Type properties (that is the identifier for the parent object type). These properties must set to Artifact ID of the parent object. This example illustrates how to create an RDO called MyChild with a parent object of type MyParent. For more information, see Create resources and Create an RDO resource.

Sample URL

/localhost/Relativity.REST/Workspace/1017675/MyChild
        

Sample code

The sample code is the same as that used for creating a RDO with a parent object of Workspace. See Create an RDO resource.

Request

Response

PUT method

You can use the PUT method to update properties on an RDO. For more information, see Create and update resources.

Note: When updating a dynamic object, parent ArtifactID must be specified in the request. Parent ArtifactID is not required when updating a document object.

Sample URL

/localhost/Relativity.REST/Workspace/1015349/Example%20RDO/1041611
        

Code sample

//Set up the client.
            
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("http://localhost/");
 
//Set the required headers.
httpClient.DefaultRequestHeaders.Add("X-CSRF-Header", "-");
httpClient.DefaultRequestHeaders.Add("Authorization", "Basic c2FtcGxlYWRtaW5AcmVsYXRpdml0eS5yZXN0OlMwbTNwQHNzdzByZA==");
 
//Call the PUT method on an RDO. It is named "Example RDO" in this sample.
string url = "Relativity.REST/Workspace/1015349/Example%20RDO/1041611";
StringContent content = new StringContent(UpdateInputJSON, Encoding.UTF8, "application/json");
HttpResponseMessage response = httpClient.PutAsync(url, content).Result;
string result = response.Content.ReadAsStringAsync().Result;
bool success = HttpStatusCode.OK == response.StatusCode;
 
//Parse the result with Json.NET.
JObject resultObject = JObject.Parse(result);
        

Request

Response

DELETE method

You can use the Delete method to remove an RDO from the database. You don't need to provide a body with a DELETE request.

Sample URL

/localhost/Relativity.REST/Workspace/1015349/Example%20RDO/1041611
        

Code sample

//Set up the client.
            
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("http://localhost/");
 
//Set the required headers.
httpClient.DefaultRequestHeaders.Add("X-CSRF-Header", "-");
httpClient.DefaultRequestHeaders.Add("Authorization", "Basic c2FtcGxlYWRtaW5AcmVsYXRpdml0eS5yZXN0OlMwbTNwQHNzdzByZA==");
 
//Call the DELETE method on an RDO. It is named "Example RDO" in this sample.
            
string url = "Relativity.REST/Workspace/1015349/Example%20RDO/1041611";
HttpResponseMessage response = httpClient.DeleteAsync(url).Result;
string result = response.Content.ReadAsStringAsync().Result;
bool success = HttpStatusCode.OK == response.StatusCode;
 
//Parse the result with Json.NET.
            
JObject resultObject = JObject.Parse(result);        

Response