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

{ "Artifact ID": 1041611, "Guids": null, "Artifact Type ID": 1000046, "Artifact Type Name": "Example RDO", "Artifact Type Guids": null, "Parent Artifact": { "Artifact ID": 1003663, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null }, "__Location": "http://localhost/Relativity.REST/Workspace/1015349/Example%20RDO/1041611", "System Created On": "2013-03-25T14:14:51.19", "System Last Modified On": "2013-03-25T21:45:31.27", "System Created By": { "Artifact ID": 9, "Guids": null, "Artifact Type ID": 2, "Artifact Type Name": "User", "Artifact Type Guids": null, "Full Name": "_DO_NOT_USE_OR_MODIFY_ME, DO_NOT_USE_OR_MODIFY_ME", "__Location": "http://localhost/Relativity.REST/Relativity/User/9" }, "System Last Modified By": { "Artifact ID": 9, "Guids": null, "Artifact Type ID": 2, "Artifact Type Name": "User", "Artifact Type Guids": null, "Full Name": "_DO_NOT_USE_OR_MODIFY_ME, DO_NOT_USE_OR_MODIFY_ME", "__Location": "http://localhost/Relativity.REST/Relativity/User/9" }, "Name": "Example RDO ONE Modified", "Multiple Object Field": [ { "Artifact ID": 1041305, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null }, { "Artifact ID": 1041306, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null } ], "Single Object Field": { "Artifact ID": 1041302, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null }, "File Field": null, "File Field File Icon": null, "File Field File Size": null, "File Field Text": null, "User Field": { "Artifact ID": 1015314, "Guids": null, "Artifact Type ID": 2, "Artifact Type Name": "User", "Artifact Type Guids": null, "Full Name": "SomeLastName, uAdam", "__Location": "http://localhost/Relativity.REST/Relativity/User/1015314" }, "Multiple Choice Field": [ { "Artifact ID": 1041603, "Guids": null, "Artifact Type ID": 7, "Artifact Type Name": "Choice", "Artifact Type Guids": null, "Name": "MChoice SIX", "__Location": "http://localhost/Relativity.REST/Workspace/1015349/Choice/1041603" }, { "Artifact ID": 1041604, "Guids": null, "Artifact Type ID": 7, "Artifact Type Name": "Choice", "Artifact Type Guids": null, "Name": "MChoice SEVEN", "__Location": "http://localhost/Relativity.REST/Workspace/1015349/Choice/1041604" } ], "Single Choice Field": { "Artifact ID": 1041609, "Guids": null, "Artifact Type ID": 7, "Artifact Type Name": "Choice", "Artifact Type Guids": null, "Name": "SChoice FIVE", "__Location": "http://localhost/Relativity.REST/Workspace/1015349/Choice/1041609" }, "Yes No Field": false, "Currency Field": 789.1, "Decimal Field": 109.87, "Whole Number Field": 987, "Date Field": "1970-01-01T00:00:00", "Long Text Field": "dleif txet gnol zyxwvutsrqponmlkjihgfedcba 9876543210 dleiF txeT gnoL ZYXWVUTSRQPONMLKJIHGFEDCBA", "Fixed-Length Text Field 16": "QWERTYUIOPASDFGH", "Relativity Text Identifier": "Example RDO ONE Modified", "__Fields": [ { "Name": "System Created On", "Field Type": "Date", "Field Guids": null, "Field Artifact ID": 1041570 }, { "Name": "System Last Modified On", "Field Type": "Date", "Field Guids": null, "Field Artifact ID": 1041571 }, { "Name": "System Created By", "Field Type": "FixedLengthText", "Field Guids": null, "Field Artifact ID": 1041572 }, { "Name": "System Last Modified By", "Field Type": "FixedLengthText", "Field Guids": null, "Field Artifact ID": 1041573 }, { "Name": "Name", "Field Type": "FixedLengthText", "Field Guids": null, "Field Artifact ID": 1041575 }, { "Name": "Multiple Object Field", "Field Type": "MultipleObject", "Field Guids": null, "Field Artifact ID": 1041580 }, { "Name": "Single Object Field", "Field Type": "SingleObject", "Field Guids": null, "Field Artifact ID": 1041582 }, { "Name": "File Field", "Field Type": "File", "Field Guids": null, "Field Artifact ID": 1041583 }, { "Name": "File Field File Icon", "Field Type": "File", "Field Guids": null, "Field Artifact ID": 1041584 }, { "Name": "File Field File Size", "Field Type": "WholeNumber", "Field Guids": null, "Field Artifact ID": 1041585 }, { "Name": "File Field Text", "Field Type": "LongText", "Field Guids": null, "Field Artifact ID": 1041586 }, { "Name": "User Field", "Field Type": "User", "Field Guids": null, "Field Artifact ID": 1041587 }, { "Name": "Multiple Choice Field", "Field Type": "MultipleChoice", "Field Guids": null, "Field Artifact ID": 1041588 }, { "Name": "Single Choice Field", "Field Type": "SingleChoice", "Field Guids": null, "Field Artifact ID": 1041589 }, { "Name": "Yes No Field", "Field Type": "YesNo", "Field Guids": null, "Field Artifact ID": 1041590 }, { "Name": "Currency Field", "Field Type": "Currency", "Field Guids": null, "Field Artifact ID": 1041591 }, { "Name": "Decimal Field", "Field Type": "Decimal", "Field Guids": null, "Field Artifact ID": 1041592 }, { "Name": "Whole Number Field", "Field Type": "WholeNumber", "Field Guids": null, "Field Artifact ID": 1041593 }, { "Name": "Date Field", "Field Type": "Date", "Field Guids": null, "Field Artifact ID": 1041594 }, { "Name": "Long Text Field", "Field Type": "LongText", "Field Guids": null, "Field Artifact ID": 1041595 }, { "Name": "Fixed-Length Text Field 16", "Field Type": "FixedLengthText", "Field Guids": null, "Field Artifact ID": 1041596 }, { "Name": "Relativity Text Identifier", "Field Type": "FixedLengthText", "Field Guids": null, "Field Artifact ID": 0 } ] }
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

{ "TotalResultCount": 2, "ResultCount": 2, "Results": [ { "Artifact ID": 1041611, "Guids": null, "Artifact Type ID": 1000046, "Artifact Type Name": "Example RDO", "Artifact Type Guids": null, "Parent Artifact": { "Artifact ID": 1003663, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null }, "__Location": "http://localhost/Relativity.REST/Workspace/1015349/Example%20RDO/1041611", "Relativity Text Identifier": "Example RDO ONE Modified", "__Fields": [ { "Name": "Relativity Text Identifier", "Field Type": "FixedLengthText", "Field Guids": null, "Field Artifact ID": 0 } ] }, { "Artifact ID": 1041612, "Guids": null, "Artifact Type ID": 1000046, "Artifact Type Name": "Example RDO", "Artifact Type Guids": null, "Parent Artifact": { "Artifact ID": 1003663, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null }, "__Location": "http://localhost/Relativity.REST/Workspace/1015349/Example%20RDO/1041612", "Relativity Text Identifier": "Example RDO TWO", "__Fields": [ { "Name": "Relativity Text Identifier", "Field Type": "FixedLengthText", "Field Guids": null, "Field Artifact ID": 0 } ] } ], "NextPage": null, "PreviousPage": null, "QueryToken": null }
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

//Input JSON representation of a RDO query. { "condition":" 'Artifact ID' > 1000000", "fields":["*"] }
Response

//Output JSON representation of results from a RDO query. { "TotalResultCount": 3, "ResultCount": 2, "Results": [ { "Artifact ID": 1038108, "Guids": [ "59379232-c0cd-4584-b94d-9d8844449ea5" ], "Artifact Type ID": 1000028, "Artifact Type Name": "Custom Object", "Artifact Type Guids": [ "96193532-6b5f-4d23-a4a9-bc6218f29636", "b3be850e-bbf2-425a-84b9-df054b421427" ], "Parent Artifact": { "Artifact ID": 1003663, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null }, "__Location": "http://localhost/Relativity.REST/Workspace/1017860/Custom%20Object/1038108", "System Created On": "2013-01-10T20:12:09.097", "System Last Modified On": "2013-01-18T21:56:08.96", "System Created By": { "Artifact ID": 1017726, "Guids": null, "Artifact Type ID": 2, "Artifact Type Name": "User", "Artifact Type Guids": null, "Full Name": "Smith, James", "__Location": "http://localhost/Relativity.REST/Relativity/User/1017726" }, "System Last Modified By": { "Artifact ID": 1017726, "Guids": null, "Artifact Type ID": 2, "Artifact Type Name": "User", "Artifact Type Guids": null, "Full Name": " Smith, James", "__Location": "http://localhost/Relativity.REST/Relativity/User/1017726" }, "Name": "Object With All Fields Populated 1", "Custom Object Field 1": null, "Whole Number Field": 1, "Date Field": "2013-01-19T12:00:00", "Boolean Field": true, "Decimal Field": 1.01, "File Field": "kCura.Relativity.DataReaderClient.png", "File Field File Icon": "kCura.Relativity.DataReaderClient.png", "File Field File Size": 241140, "File Field Text": "\n", "Fixed Length Text Field": "this is some text", "Long Text FIeld": "this is some long text", "Single Object Field": { "Artifact ID": 1038082, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null }, "Multi Object Field": [ { "Artifact ID": 1038083, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null }, { "Artifact ID": 1038082, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null } ], "Single Choice Field": { "Artifact ID": 1038137, "Guids": null, "Artifact Type ID": 7, "Artifact Type Name": "Choice", "Artifact Type Guids": null, "Name": "Single Choice Custom Object 1", "__Location": "http://localhost/Relativity.REST/Workspace/1017860/Choice/1038137" }, "Multi Choice Field": [ { "Artifact ID": 1038134, "Guids": null, "Artifact Type ID": 7, "Artifact Type Name": "Choice", "Artifact Type Guids": null, "Name": "Multi Choice Custom Object 1", "__Location": "http://localhost/Relativity.REST/Workspace/1017860/Choice/1038134" } ], "User Field": { "Artifact ID": 1017726, "Guids": null, "Artifact Type ID": 2, "Artifact Type Name": "User", "Artifact Type Guids": null, "Full Name": "Lutteke, Jared", "__Location": "http://localhost/Relativity.REST/Relativity/User/1017726" }, "Currency Field": 1.01, "Relativity Text Identifier": "Object With All Fields Populated 1", "__Fields": [ { "Name": "System Created On", "Field Type": "Date", "Field Guids": [ "108789aa-cf6b-45e4-99d6-fdb41274a781" ], "Field Artifact ID": 1038098 }, { "Name": "System Last Modified On", "Field Type": "Date", "Field Guids": [ "50ca6b25-e1cb-42de-8d33-76f750140ce6" ], "Field Artifact ID": 1038099 }, { "Name": "System Created By", "Field Type": "FixedLengthText", "Field Guids": [ "287e1ff9-9b6a-4e19-b3cb-11d142e845ae" ], "Field Artifact ID": 1038100 }, { "Name": "System Last Modified By", "Field Type": "FixedLengthText", "Field Guids": [ "7d9330d8-accb-412d-9440-de250ba984fa" ], "Field Artifact ID": 1038101 }, { "Name": "Name", "Field Type": "FixedLengthText", "Field Guids": [ "f9acc5fe-d4cd-4a98-a488-fdca11dd16ef" ], "Field Artifact ID": 1038103 }, { "Name": "Custom Object Field 1", "Field Type": "FixedLengthText", "Field Guids": [ "da8f2eea-925e-40b4-803b-32a71a6976d3" ], "Field Artifact ID": 1038113 }, { "Name": "Whole Number Field", "Field Type": "WholeNumber", "Field Guids": [ "144ab1ee-bb3c-4772-8bc5-efefa34dfd13" ], "Field Artifact ID": 1038116 }, { "Name": "Date Field", "Field Type": "Date", "Field Guids": [ "232b1cb0-4c5f-4c93-b0a6-681ae5f72416" ], "Field Artifact ID": 1038117 }, { "Name": "Boolean Field", "Field Type": "YesNo", "Field Guids": [ "93e8fa26-ac76-42ae-80d4-7b2faf6110f5" ], "Field Artifact ID": 1038118 }, { "Name": "Decimal Field", "Field Type": "Decimal", "Field Guids": [ "95f6a53e-dc30-4031-adc0-fbdf37e03654" ], "Field Artifact ID": 1038119 }, { "Name": "File Field", "Field Type": "File", "Field Guids": [ "1f338a08-5f8e-4d8c-8e41-04612ed62c71" ], "Field Artifact ID": 1038120 }, { "Name": "File Field File Icon", "Field Type": "File", "Field Guids": [ "0937c88b-0ab5-456e-97c3-b7c9496a14bc" ], "Field Artifact ID": 1038121 }, { "Name": "File Field File Size", "Field Type": "WholeNumber", "Field Guids": [ "a852c776-5f5f-4fe4-aa73-5e5ed6636636" ], "Field Artifact ID": 1038122 }, { "Name": "File Field Text", "Field Type": "LongText", "Field Guids": [ "d009488d-e7c2-4fdf-b07e-ad611fa2a7d6" ], "Field Artifact ID": 1038123 }, { "Name": "Fixed Length Text Field", "Field Type": "FixedLengthText", "Field Guids": [ "86c03612-f8cb-4014-b7be-b28f58d24d78" ], "Field Artifact ID": 1038124 }, { "Name": "Long Text FIeld", "Field Type": "LongText", "Field Guids": [ "71138b14-0b3b-4d04-b8ca-68017d13c246" ], "Field Artifact ID": 1038125 }, { "Name": "Single Object Field", "Field Type": "SingleObject", "Field Guids": [ "24ad8bc4-f1d8-4c8b-834f-a44e55bf470f" ], "Field Artifact ID": 1038126 }, { "Name": "Multi Object Field", "Field Type": "MultipleObject", "Field Guids": [ "18ecbcbf-4337-4ec4-bedd-b73b67927f93" ], "Field Artifact ID": 1038127 }, { "Name": "Single Choice Field", "Field Type": "SingleChoice", "Field Guids": [ "397db32a-1029-4254-aff3-f661a4daa72b" ], "Field Artifact ID": 1038130 }, { "Name": "Multi Choice Field", "Field Type": "MultipleChoice", "Field Guids": [ "63048a2d-c987-43fb-a184-466157983efb" ], "Field Artifact ID": 1038131 }, { "Name": "User Field", "Field Type": "User", "Field Guids": [ "5eedc5b4-07c4-4d8f-8652-58ef21d0c4d1" ], "Field Artifact ID": 1038132 }, { "Name": "Currency Field", "Field Type": "Currency", "Field Guids": [ "d68df3d6-bef5-4e51-8e20-c068569e9548" ], "Field Artifact ID": 1038133 }, { "Name": "Relativity Text Identifier", "Field Type": "FixedLengthText", "Field Guids": null, "Field Artifact ID": 0 } ] }, { "Artifact ID": 1038140, "Guids": [ "bb3c1dc4-1aa9-4432-8041-7572366cecd6" ], "Artifact Type ID": 1000028, "Artifact Type Name": "Custom Object", "Artifact Type Guids": [ "96193532-6b5f-4d23-a4a9-bc6218f29636", "b3be850e-bbf2-425a-84b9-df054b421427" ], "Parent Artifact": { "Artifact ID": 1003663, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null }, "__Location": "http://localhost/Relativity.REST/Workspace/1017860/Custom%20Object/1038140", "System Created On": "2013-01-18T17:56:57.783", "System Last Modified On": "2013-01-18T21:06:48.857", "System Created By": { "Artifact ID": 9, "Guids": null, "Artifact Type ID": 2, "Artifact Type Name": "User", "Artifact Type Guids": null, "Full Name": "Admin, Relativity", "__Location": "http://localhost/Relativity.REST/Relativity/User/9" }, "System Last Modified By": { "Artifact ID": 1017726, "Guids": null, "Artifact Type ID": 2, "Artifact Type Name": "User", "Artifact Type Guids": null, "Full Name": "Smith, James", "__Location": "http://localhost/Relativity.REST/Relativity/User/1017726" }, "Name": "Object With All Fields Populated 2", "Custom Object Field 1": null, "Whole Number Field": 2, "Date Field": "2013-01-18T12:00:00", "Boolean Field": false, "Decimal Field": 10.05, "File Field": "kCura.Relativity.DataReaderClientSmall.png", "File Field File Icon": "kCura.Relativity.DataReaderClientSmall.png", "File Field File Size": 2891, "File Field Text": "\n", "Fixed Length Text Field": "fixed length text which is fixed", "Long Text FIeld": "this is my long text", "Single Object Field": { "Artifact ID": 1038085, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null }, "Multi Object Field": [ { "Artifact ID": 1038085, "Guids": null, "Artifact Type ID": null, "Artifact Type Name": null, "Artifact Type Guids": null, "__Location": null } ], "Single Choice Field": { "Artifact ID": 1038138, "Guids": null, "Artifact Type ID": 7, "Artifact Type Name": "Choice", "Artifact Type Guids": null, "Name": "Single Choice Custom Object 2", "__Location": "http://localhost/Relativity.REST/Workspace/1017860/Choice/1038138" }, "Multi Choice Field": [ { "Artifact ID": 1038135, "Guids": null, "Artifact Type ID": 7, "Artifact Type Name": "Choice", "Artifact Type Guids": null, "Name": "Multi Choice Custom Object 2", "__Location": "http://localhost/Relativity.REST/Workspace/1017860/Choice/1038135" }, { "Artifact ID": 1038136, "Guids": null, "Artifact Type ID": 7, "Artifact Type Name": "Choice", "Artifact Type Guids": null, "Name": "Multi Choice Custom Object 3", "__Location": "http://localhost/Relativity.REST/Workspace/1017860/Choice/1038136" } ], "User Field": { "Artifact ID": 1016571, "Guids": null, "Artifact Type ID": 2, "Artifact Type Name": "User", "Artifact Type Guids": null, "Full Name": "Smith, James", "__Location": "http://localhost/Relativity.REST/Relativity/User/1016571" }, "Currency Field": 10.05, "Relativity Text Identifier": "Object With All Fields Populated 2", "__Fields": [ { "Name": "System Created On", "Field Type": "Date", "Field Guids": [ "108789aa-cf6b-45e4-99d6-fdb41274a781" ], "Field Artifact ID": 1038098 }, { "Name": "System Last Modified On", "Field Type": "Date", "Field Guids": [ "50ca6b25-e1cb-42de-8d33-76f750140ce6" ], "Field Artifact ID": 1038099 }, { "Name": "System Created By", "Field Type": "FixedLengthText", "Field Guids": [ "287e1ff9-9b6a-4e19-b3cb-11d142e845ae" ], "Field Artifact ID": 1038100 }, { "Name": "System Last Modified By", "Field Type": "FixedLengthText", "Field Guids": [ "7d9330d8-accb-412d-9440-de250ba984fa" ], "Field Artifact ID": 1038101 }, { "Name": "Name", "Field Type": "FixedLengthText", "Field Guids": [ "f9acc5fe-d4cd-4a98-a488-fdca11dd16ef" ], "Field Artifact ID": 1038103 }, { "Name": "Custom Object Field 1", "Field Type": "FixedLengthText", "Field Guids": [ "da8f2eea-925e-40b4-803b-32a71a6976d3" ], "Field Artifact ID": 1038113 }, { "Name": "Whole Number Field", "Field Type": "WholeNumber", "Field Guids": [ "144ab1ee-bb3c-4772-8bc5-efefa34dfd13" ], "Field Artifact ID": 1038116 }, { "Name": "Date Field", "Field Type": "Date", "Field Guids": [ "232b1cb0-4c5f-4c93-b0a6-681ae5f72416" ], "Field Artifact ID": 1038117 }, { "Name": "Boolean Field", "Field Type": "YesNo", "Field Guids": [ "93e8fa26-ac76-42ae-80d4-7b2faf6110f5" ], "Field Artifact ID": 1038118 }, { "Name": "Decimal Field", "Field Type": "Decimal", "Field Guids": [ "95f6a53e-dc30-4031-adc0-fbdf37e03654" ], "Field Artifact ID": 1038119 }, { "Name": "File Field", "Field Type": "File", "Field Guids": [ "1f338a08-5f8e-4d8c-8e41-04612ed62c71" ], "Field Artifact ID": 1038120 }, { "Name": "File Field File Icon", "Field Type": "File", "Field Guids": [ "0937c88b-0ab5-456e-97c3-b7c9496a14bc" ], "Field Artifact ID": 1038121 }, { "Name": "File Field File Size", "Field Type": "WholeNumber", "Field Guids": [ "a852c776-5f5f-4fe4-aa73-5e5ed6636636" ], "Field Artifact ID": 1038122 }, { "Name": "File Field Text", "Field Type": "LongText", "Field Guids": [ "d009488d-e7c2-4fdf-b07e-ad611fa2a7d6" ], "Field Artifact ID": 1038123 }, { "Name": "Fixed Length Text Field", "Field Type": "FixedLengthText", "Field Guids": [ "86c03612-f8cb-4014-b7be-b28f58d24d78" ], "Field Artifact ID": 1038124 }, { "Name": "Long Text FIeld", "Field Type": "LongText", "Field Guids": [ "71138b14-0b3b-4d04-b8ca-68017d13c246" ], "Field Artifact ID": 1038125 }, { "Name": "Single Object Field", "Field Type": "SingleObject", "Field Guids": [ "24ad8bc4-f1d8-4c8b-834f-a44e55bf470f" ], "Field Artifact ID": 1038126 }, { "Name": "Multi Object Field", "Field Type": "MultipleObject", "Field Guids": [ "18ecbcbf-4337-4ec4-bedd-b73b67927f93" ], "Field Artifact ID": 1038127 }, { "Name": "Single Choice Field", "Field Type": "SingleChoice", "Field Guids": [ "397db32a-1029-4254-aff3-f661a4daa72b" ], "Field Artifact ID": 1038130 }, { "Name": "Multi Choice Field", "Field Type": "MultipleChoice", "Field Guids": [ "63048a2d-c987-43fb-a184-466157983efb" ], "Field Artifact ID": 1038131 }, { "Name": "User Field", "Field Type": "User", "Field Guids": [ "5eedc5b4-07c4-4d8f-8652-58ef21d0c4d1" ], "Field Artifact ID": 1038132 }, { "Name": "Currency Field", "Field Type": "Currency", "Field Guids": [ "d68df3d6-bef5-4e51-8e20-c068569e9548" ], "Field Artifact ID": 1038133 }, { "Name": "Relativity Text Identifier", "Field Type": "FixedLengthText", "Field Guids": null, "Field Artifact ID": 0 } ] } ], "NextPage": "http://localhost/Relativity.REST/Workspace/1017860/Custom%20Object/QueryResult/64f4068f-bcc1-4771-b457-ba7b0c20de37?start=3&pageSize=2", "PreviousPage": null, "QueryToken": "64f4068f-bcc1-4771-b457-ba7b0c20de37" }
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

As illustrated in this example, the JSON for this request must contain the following minimal input.
{ "Artifact Type Name": "Example RDO", "Name": "Example 001", "Parent Artifact": { "Artifact ID": 1003663 } }
Response

{ "Results": [ { "StatusCode": 201, "Success": true, "Message": "1041649 created successfully.", "ArtifactID": 1041649, "ArtifactGuids": null } ], "Message": "Creation succeeded.", "ErroredResultCount": 0, "TotalResultCount": 1 }
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

This JSON contains the Parent Artifact property set to the Artifact ID of the parent object. It also contains the Artifact Type of the parent object (that is MyParent) set to its Artifact ID.
{ "Artifact Type Name": "MyChild", "Name": "Child 1", "Parent Artifact": { "Artifact ID": 1040715 }, "MyParent": { "Artifact ID": 1040715 } }
Response

{ "Results": [ { "StatusCode": 201, "Success": true, "Message": "1040718 created successfully.", "ArtifactID": 1040718, "ArtifactGuids": null, "__Location": "http://localhost/relativity.REST/Workspace/1017675/MyChild/1040718" } ], "Message": "Creation succeeded.", "ErroredResultCount": 0, "TotalResultCount": 1 }
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

The following JSON representation of an RDO includes all the available Relativity field types except File, which is not currently supported.
//Input JSON representation of an RDO. { "Artifact ID": 1041611, "Artifact Type Name": "Example RDO", "Name": "Example RDO ONE Modified", "Currency Field": 789.1, "Date Field": "1970-01-01T00:00:00", "Decimal Field": 109.87, "Fixed-Length Text Field 16": "QWERTYUIOPASDFGH", "Long Text Field": "dleif txet gnol zyxwvutsrqponmlkjihgfedcba 9876543210 dleiF txeT gnoL ZYXWVUTSRQPONMLKJIHGFEDCBA", "Parent Artifact": {"Artifact ID": 1015349}, "Multiple Choice Field": [ { "Artifact ID": 1041604, "Artifact Type ID": 7 }, { "Artifact ID": 1041603, "Artifact Type ID": 7 } ], "Multiple Object Field": [ { "Artifact ID": 1041305 }, { "Artifact ID": 1041306 } ], "Single Choice Field": { "Artifact ID": 1041609, "Artifact Type ID": 7 }, "Single Object Field": { "Artifact ID": 1041302 }, "User Field": { "Artifact ID": 1015314 }, "Whole Number Field": 987, "Yes No Field": false }
Response

//Output JSON representation of an RDO. { "Results": [ { "StatusCode": 200, "Success": true, "Message": "1041611 updated successfully.", "ArtifactID": 1041611, "ArtifactGuids": null } ], "Message": "Update succeeded.", "ErroredResultCount": 0, "TotalResultCount": 1 }
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

{ "Results": [ { "StatusCode": 200, "Success": true, "Message": "1041611 deleted successfully.", "ArtifactID": 1041611, "ArtifactGuids": null, "__Location": null } ], "Message": "Deletion succeeded.", "ErroredResultCount": 0, "TotalResultCount": 1 }