Sample use cases for the Object Manager service include:
The Relativity Services API supports the same functionality for this service as available through the REST API. Additionally, it supports the use of progress indicators and cancellation tokens for queries. For more information, see Object Manager (.NET).
Note: The Object Manager service has undergone extensive enhancements as of the RelatvityOne - February 3, 2018, and the Relativity February 28, 2018 releases. The content on this page addresses these changes. For information about working with older Relativity versions, see Deprecated content for Object Manager with REST
This page contains the following information:
See this related page:
You interact with the Object Manager service by sending an HTTP request that uses the POST method. See the following base URL for this service:
<host>/Relativity.REST/api/Relativity.Objects/workspace/{workspaceID}/object/
You can use the following .NET code as the REST client for making calls with the Object Manager service. This sample code illustrates how to perform the following tasks for an update operation:
public async Task<UpdateResult> UpdateExample() { UpdateResult result = null; using(HttpClient client = new HttpClient()) { client.DefaultRequestHeaders.Add("X-CSRF-Header", "-"); client.DefaultRequestHeaders.Add("Authorization", "Basic " + Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes("test@test.com:SomePassword"))); client.DefaultRequestHeaders.Add("X-Kepler-Version", "2.0"); client.BaseAddress = new Uri("https://localhost/Relativity.REST/api/Relativity.Objects/"); var workspaceId = 1016847; var objectArtifactID = 1039331; var fieldArtifactID = 1039320; var valueToUpdate = "New Value"; string inputJSON = $"{{\"request\":{{\"Object\":{\"{artifactId\":{objectArtifactID}}},\"FieldValues\":[{{\"Field\":{{\"ArtifactID\":{fieldArtifactID}}},\"Value\":\"{valueToUpdate}\"}}]}}}}}}"; var url = $"workspace/{workspaceId}/object/update"; var response = await client.PostAsync(url, new StringContent(inputJSON, Encoding.UTF8, "application/json")); response.EnsureSuccessStatusCode(); var content = await response.Content.ReadAsStringAsync(); result = JsonConvert.DeserializeObject<UpdateResult>(content); } return result; }
To create an RDO with a specific set of fields, use the POST method and send a request with the following URL format:
<host>/Relativity.REST/api/Relativity.Objects/workspace/{workspaceID}/object/create
The body of the request for creating an RDO must contain the following fields:
Note: If you don't specify a parent object, Relativity defaults to the System object as the parent.
{ "request":{ "ObjectType":{ "ArtifactTypeID":1000042 }, "ParentObject":{ "ArtifactID":1049257 }, "FieldValues":[ { "Field":{ "ArtifactID":1039343 }, "Value":"Third" }, { "Field":{ "ArtifactID":1039338 }, "Value":{ "ArtifactID":1039441 } }, { "Field":{ "ArtifactID":1039345 }, "Value":[ { "ArtifactID":1039346 }, { "ArtifactID":1039347 }, { "ArtifactID":1039350 } ] } ] } }
The response contains the following fields:
{ "Object":{ "ParentObject":{ "ArtifactID":1003663 }, "FieldValues":[ { "Field":{ "ArtifactID":1039343, "FieldCategory":"Generic", "FieldType":"FixedLengthText", "Guids":[ ], "Name":"FixedLengthTextField", "ViewFieldID":0 }, "Value":"Third" }, { "Field":{ "ArtifactID":1039338, "FieldCategory":"Generic", "FieldType":"SingleObject", "Guids":[ ], "Name":"SingleObjectField", "ViewFieldID":0 }, "Value":{ "ArtifactID":1039441, "Guids":[ ], "Name":"Custom Object 1" } }, { "Field":{ "ArtifactID":1039345, "FieldCategory":"Generic", "FieldType":"MultipleChoice", "Guids":[ ], "Name":"MultiChoiceField", "ViewFieldID":0 }, "Value":[ { "ArtifactID":1039346, "Guids":[ ], "Name":"MultiChoiceField_Choice1" }, { "ArtifactID":1039347, "Guids":[ ], "Name":"MultiChoiceField_Choice2" }, { "ArtifactID":1039350, "Guids":[ ], "Name":"MultiChoiceField_Choice3" } ] } ], "ArtifactID":1039443, "Guids":[ ] }, "EventHandlerStatuses":[ ] }
You can mass create multiple RDOs of the same type, and you can specify the values set on the fields that they contain. Use the POST method and send a request with the following URL:
<host>/Relativity.REST/api/Relativity.Objects/workspace/{workspaceID}/object/create
Note: If you specify an identifier that’s already in the database, an exception won't be thrown. Instead, the Success field in the JSON response is set to false. Always check the value of the Success field in the JSON response as a best practice.
In the JSON request for a mass create operation, the following fields are required:
Note: If you don't specify a parent object, Relativity defaults to the System object as the parent.
{ "massRequest":{ "ParentObject":{ "ArtifactID":1003663 }, "ObjectType":{ "ArtifactTypeID":1000043 }, "Fields":[ { "ArtifactID":1040132 }, { "ArtifactID":1041596 }, { "ArtifactID":1041597 }, { "ArtifactID":1041598 } ], "ValueLists":[ [ "Identifier field value 0", "dummy value 0", 25, { "ArtifactID":1253334 } ], [ "Identifier field value 1", "dummy value 0", 56, { "ArtifactID":1253324 } ], [ "Identifier field value 2", "dummy value 0", 90, { "ArtifactID":1253335 } ], [ "Identifier field value 3", "dummy value 0", 14, { "ArtifactID":1253330 } ], [ "Identifier field value 4", "dummy value 0", 7, { "ArtifactID":1253322 } ], [ "Identifier field value 5", "dummy value 0", 23, { "ArtifactID":1253315 } ] ] } }
The response contains the following fields:
{ "Success":true, "Message":"Created 5 objects.", "Objects":[ { "ArtifactID":1238950 }, { "ArtifactID":1238951 }, { "ArtifactID":1238952 }, { "ArtifactID":1238953 }, { "ArtifactID":1238954 } ] }
To read a specified subset of field values on a Document object or an RDO, use the POST method and send a request with the following URL format:
<host>/Relativity.REST/api/Relativity.Objects/workspace/{workspaceID}/object/read
The body of the request for reading a subset of field values on a Document object or RDO must contain the following unless specifically identified as optional:
Note: Before implementing the query operation on a long text field, review the following best practices in Use tokens with long text fields.
{ "Request":{ "Object":{ "ArtifactID":1038163 }, "Fields":[ { "ArtifactID":1003667 }, { "ArtifactID":1003668 }, { "ArtifactID":1003669 }, { "ArtifactID":1003671 }, { "ArtifactID":1003672 } ] } }
{ "Request":{ "Object":{ "ArtifactID":1038163 }, "Fields":[ { "Name":"Nonrequired Fixed Length" } ] } }
{ "Request":{ "Object":{ "ArtifactID":1040284 }, "Fields":[ { "ArtifactID":1040299 }, { "ArtifactID":1040286 } ] }, "ReadOptions":{ "FieldTypesToReturnAsString":[ "Decimal", "Currency" ] } }
The sample responses contains the following fields:
{ "Message":"", "Object":{ "ParentObject":{ "ArtifactID":1038155 }, "FieldValues":[ { "Field":{ "ArtifactID":1003667, "FieldCategory":"Generic", "FieldType":"FixedLengthText", "Guids":[ "2a3f1212-c8ca-4fa9-ad6b-f76c97f05438" ], "Name":"Control Number", "ViewFieldID":0 }, "Value":"AZIPPER_0007300" }, { "Field":{ "ArtifactID":1003668, "FieldCategory":"Generic", "FieldType":"LongText", "Guids":[ "58d35076-1b1d-43b4-bff4-d6c089de51b2" ], "Name":"Extracted Text", "ViewFieldID":0 }, "Value":"From: Piper Greg <Greg.Piper@ENRON.com>\r\nSent: Monday, May 21, 2001 8:25 PM\r\nTo: Zipper Andy <Andy.Zipper@ENRON.com>\r\nSubject: RE: EOL Team Connection to Operations\r\n\r\nI am confident this will work out.\r\n\r\nThanks.\r\n\r\nGP\r\n\r\n -----Original Message-----\r\nFrom: \tZipper, Andy \r\nSent:\tMonday, May 21, 2001 5:54 PM\r\nTo:\tPiper, Greg\r\nSubject:\tFW: EOL Team Connection to Operations\r\n\r\n\r\nFYI\r\n -----Original Message-----\r\nFrom: \tBeck, Sally \r\nSent:\tMonday, May 21, 2001 5:39 PM\r\nTo:\tZipper, Andy\r\nSubject:\tEOL Team Connection to Operations\r\n\r\nI left you a couple of messages with two different assistants today for you to call - am sure that it is a busy Monday. I will send this note so that I don't forget the purpose. With Savita assuming the role previously played by Sheri with regard to the Product Control group, I wanted to underscore the importance of a free flow of information between the EOL team and my operations team. One of the roles that Sheri's team fulfilled was keeping my risk and operations teams apprised of any changes within EOL that can have an impact on bridging to our legacy systems. I may have met Savita once in passing. I checked with Jeff Gossett and Stacey White, risk leads over gas and power, respectively, and neither one has heard of or met Savita. Although Jennifer Denney will play an active role, I know that she will be out on maternity leave soon, so it is important for Savita to know the right players on the operations team and for them to know her. I will contact Savita directly to make the appropriate introductions. I just wanted your support and encouragement for Savita in making the right connections within operations. --Sally \r\n\r\nagree\r\n\r\ncontracts\r\n\r\n***********\r\n\r\n***********" }, { "Field":{ "ArtifactID":1003669, "FieldCategory":"Generic", "FieldType":"FixedLengthText", "Guids":[ "a426bc5e-3420-47b4-a293-4c4848a237d7" ], "Name":"MD5 Hash", "ViewFieldID":0 }, "Value":"5D53A6828FDA554B7E756396E3E54533" }, { "Field":{ "ArtifactID":1003671, "FieldCategory":"Generic", "FieldType":"FixedLengthText", "Guids":[ "1f036749-a691-4aa8-8cf7-5eeb80c36caf" ], "Name":"Group Identifier", "ViewFieldID":0 }, "Value":"AZIPPER_0007300" }, { "Field":{ "ArtifactID":1003672, "FieldCategory":"Generic", "FieldType":"SingleChoice", "Guids":[ "2baaca72-790c-4b87-a7d8-c18c45cac63d" ], "Name":"Has Images", "ViewFieldID":0 }, "Value":{ "ArtifactID":1034244, "Guids":[ ], "Name":"No" } } ], "ArtifactID":1038166, "Guids":[ ] }, "ObjectType":{ "ArtifactID":1035231, "Name":"Document", "Guids":[ "15c36703-74ea-4ff8-9dfb-ad30ece7530d" ], "ArtifactTypeID":10 } }
{ "Object":{ "ParentObject":{ "ArtifactID":1003663, "Guid":"00000000-0000-0000-0000-000000000000" }, "Name":"Test", "FieldValues":[ { "Field":{ "ArtifactID":1040286, "FieldCategory":"Generic", "FieldType":"Decimal", "Guids":[ ], "Name":"Decimal", "ViewFieldID":0 }, "Value":"123456789.99" }, { "Field":{ "ArtifactID":1040299, "FieldCategory":"Generic", "FieldType":"Currency", "Guids":[ ], "Name":"Currency", "ViewFieldID":0 }, "Value":"123456789.99" } ], "ArtifactID":1040284, "Guids":[ ] }, "ObjectType":{ "ArtifactID":1040282, "Name":"RDO", "Guids":[ ], "ArtifactTypeID":1000046 }, "ObjectVersionToken":"636806505690930000" }
To update field values on a Document object or RDO, use the POST method and send a request with the following URL format:
<host>/Relativity.REST/api/Relativity.Objects/workspace/{workspaceID}/object/update
The body of the request for updating field values on a Document object or RDO must contain the following fields:
Note: You can set the callingContext field to null if your event handlers don't need any context information, but you must include it in the JSON request. Your event handlers must then implement the ICanExecuteWithLimitedContext interface available in the Event Handlers API.
Click a field type in the following list to view sample JSON and information about the field values.
For currency fields, the value may contain commas and two decimal places. Currently, the currency field supports only the culture English (United States).
{ "request":{ "Object":{ "artifactId":1037989 }, "FieldValues":[ { "Field":{ "ArtifactID":1039465 }, "Value":"5,025.30" } ] }, "OperationOptions":{ "CallingContext":{ "Layout":{ "ArtifactID":1042963 } } } }
For date fields, the values must contain dates in the ISO 8601 format listed in the following JSON sample. When you don't explicitly provide an offset, date fields are saved in the database with an offset relative to server location.
{ "request":{ "Object":{ "artifactId":1037989 }, "FieldValues":[ { "Field":{ "ArtifactID":1039477 }, "Value":"2017-01-22T18:00:00-07:00" } ] }, "OperationOptions":{ "CallingContext":{ "Layout":{ "ArtifactID":1042963 } } } }
For decimal fields, the values are rounded to the nearest hundredth of a number. Currently, the decimal field supports only the culture English (United States).
{ "request":{ "Object":{ "artifactId":1037989 }, "FieldValues":[ { "Field":{ "ArtifactID":1039489 }, "Value":1.05 } ] }, "OperationOptions":{ "CallingContext":{ "Layout":{ "ArtifactID":1042963 } } } }
The request must include following fields:
{ "field":{ "ArtifactID":1098145 }, "objectRef":{ "ArtifactID":1001637 }, "fileName":"Sample File" },
Note: If you need to update a long text field that exceeds the length limits of an HTTP request, use the updatelongtextfromstream endpoint. For more information, see Update a long text field using an input stream.
{ "request": { "Object": { "artifactId": 1037989 }, "FieldValues": [{ "Field": { "ArtifactID": 1039519 }, "Value": "Hello World!" }] }, "OperationOptions": { "CallingContext" { "Layout": { "ArtifactID": 1042963 } } } }
When you update a child choice field, its ancestors are also updated. The Behavior field indicates whether you are merging or replacing choices as follows:
If you don't set the Behavior field, the service throws a ValidationException when attempting an update operation.
Note: The update operation for field values on a multiple object works the same way on a multiple choice field.
{ "request":{ "Object":{ "artifactId":1037989 }, "FieldValues":[ { "Field":{ "ArtifactID":1039527 }, "Value":[ { "ArtifactID":1068132 }, { "ArtifactID":1068137 } ] } ] }, "OperationOptions":{ "UpdateBehavior":"Replace", "CallingContext":{ "Layout":{ "ArtifactID":1042963 } } } }
You can either merge or replace multiple objects. The Behavior field indicates whether you are merging or replacing the object field as follows:
If you don't set the Behavior field, the service throws a ValidationException when attempting an update operation.
Note: The update operation for field values on a multiple object works the same way on a multiple choice field.
{ "request":{ "Object":{ "artifactId":1037989 }, "FieldValues":[ { "Field":{ "ArtifactID":1042109 }, "Value":[ { "ArtifactID":1041033 }, { "ArtifactID":1041034 } ] } ] }, "OperationOptions":{ "UpdateBehavior":"Replace", "CallingContext":{ "Layout":{ "ArtifactID":1042963 } } } }
For a single choice field, the value may be defined by an Artifact ID or GUID. It may also be null.
{ "request":{ "Object":{ "artifactId":1037989 }, "FieldValues":[ { "Field":{ "ArtifactID":1041044 }, "Value":{ "ArtifactID":1041033 } } ] }, "OperationOptions":{ "CallingContext":{ "Layout":{ "ArtifactID":1042963 } } } }
For a single object field, the value may be defined by an Artifact ID or GUID. It may also be null.
{ "request":{ "Object":{ "artifactId":1037989 }, "FieldValues":[ { "Field":{ "ArtifactID":1041044 }, "Value":{ "ArtifactID":1041033 } } ] }, "OperationOptions":{ "CallingContext":{ "Layout":{ "ArtifactID":1042963 } } } }
{ "request":{ "Object":{ "artifactId":1037989 }, "FieldValues":[ { "Field":{ "ArtifactID":1042069 }, "Value":{ "ArtifactID":1018788 } } ] }, "OperationOptions":{ "CallingContext":{ "Layout":{ "ArtifactID":1042963 } } } }
For a whole number field, the value can't contain decimal places.
{ "request":{ "Object":{ "artifactId":1037989 }, "FieldValues":[ { "Field":{ "ArtifactID":1041044 }, "Value":1 } ] }, "OperationOptions":{ "CallingContext":{ "Layout":{ "ArtifactID":1042963 } } } }
For a Yes/No field, the value may be true, false, or null.
{ "request":{ "Object":{ "artifactId":1037989 }, "FieldValues":[ { "Field":{ "ArtifactID":1041044 }, "Value":true } ] }, "OperationOptions":{ "CallingContext":{ "Layout":{ "ArtifactID":1042963 } } } }
The response contains the following fields:
{ "EventHandlerStatuses":[ { "Success":true }, { "Success":true } ] }
You can use the updatelongtextfromstream endpoint to update a single long text field that exceeds the length limits of an HTTP request. This endpoint uses multi-part message for the request, which includes a JSON payload, and a Stream form input. For C# code used to make this request, see Update a long text field using an input stream in .NET.
To call the updatelongtextfromstream endpoint, send a POST request to a URL with the following format:
<host>/relativity.rest/api/Relativity.Objects/workspace/{workspaceID}/object/updatelongtextfromstream
<host>/relativity.rest/api/Relativity.Objects/workspace/{workspaceID}/object/updatelongtextfromstream
The JSON request must include the following fields:
{ "updateLongTextFromStreamRequest":{ "Object":{ "ArtifactID":1039314 }, "Field":{ "ArtifactID":0, "Guid":"", "Name":"Extracted Text", "ViewFieldID":0 } } }
When the long text field is successfully updated, the response returns the status code of 200.
You can specify the Document objects or RDOs that you want to mass update in the following ways:
Review the following best practices for mass update operations:
To execute a mass operation, use the POST method and send a request with the following URL:
<host>/Relativity.REST/api/Relativity.Objects/workspace/{workspaceID}/object/update
Click one of the following options to view sample JSON and field descriptions for a mass update operation. For JSON samples showing how to update a specific field type, see Update fields on a Document object or RDO.
The JSON request requires the following fields:
Note: For a mass update operation, all the objects must be the same type.
{ "massRequestByCriteria":{ "ObjectIdentificationCriteria":{ "ObjectType":{ "ArtifactTypeID":1000043 }, "Condition":"'ArtifactID' >= 1041396 And 'ArtifactID' < 1041496 " }, "FieldValues":[ { "Field":{ "ArtifactID":1041227 }, "Value":23 } ] } }
The JSON request requires the following fields:
Note: For a mass update operation, all the objects must be the same type.
{ "massRequestByObjectIdentifiers":{ "Objects":[ { "ArtifactID":1043610 }, { "ArtifactID":1043611 }, { "ArtifactID":1043612 }, { "ArtifactID":1043613 }, { "ArtifactID":1043614 } ], "FieldValues":[ { "Field":{ "ArtifactID":1041596 }, "Value":"Text field update" }, { "Field":{ "ArtifactID":1041597 }, "Value":23 }, { "Field":{ "ArtifactID":1041598 }, "Value":{ "ArtifactID":1052345 } } ] } }
The JSON request requires the following fields:
Note: For a mass update operation, all the objects must be the same type. Make sure that you specify the values in the same order as the Field objects listed in the Fields array.
{ "massRequestPerObjects":{ "Fields":[ { "ArtifactID":1041596 }, { "ArtifactID":1041597 }, { "ArtifactID":1041598 } ], "ObjectValues":[ { "object":{ "ArtifactID":1043610 }, "values":[ "This is Responsive.", 14, { "ArtifactID":1234678 } ] }, { "object":{ "ArtifactID":1043611 }, "values":[ "Witness statement", 91, { "ArtifactID":1234672 } ] }, { "object":{ "ArtifactID":1043612 }, "values":[ "Smoking gun", 75, { "ArtifactID":1234670 } ] }, { "object":{ "ArtifactID":1043613 }, "values":[ "Further review", 13, { "ArtifactID":1234668 } ] }, { "object":{ "ArtifactID":1043614 }, "values":[ "This is Responsive.", 2, { "ArtifactID":1234655 } ] } ] } }
The response contains the following fields:
{ "TotalObjectsUpdated":5, "Success":true, "Message":"" }
The dependencylist endpoint retrieves information about Relativity objects dependent on one or more specific objects selected for deletion. It returns information such as the relationship between the objects, and whether a dependent object would be deleted or unlinked. For more information on the dependency report available through the Relativity UI, see Deleting object dependencies.
Sample use cases for this endpoint include:
Use these guidelines for calling the dependencylist endpoint:
To call the dependencylist endpoint, send a POST request to the URL with the following format:
<host>/Relativity.REST/api/Relativity.Objects/workspace/{workspaceID}/object/dependencylist
The request must include the following fields:
{ request: { Objects: [ { ArtifactID: 1234567 }, { ArtifactID: 1234568 } ] } }
The response contains the following fields:
[ { "ObjectType":{ "Secured":false, "Value":"Parent Object Type" }, "Action":"Delete", "Count":{ "Secured":false, "Value":2 }, "Connection":{ "Secured":false, "Value":"Parent" }, "HierarchicLevel":0 }, { "ObjectType":{ "Secured":false, "Value":"Child Object Type" }, "Action":"Delete", "Count":{ "Secured":false, "Value":3 }, "Connection":{ "Secured":false, "Value":"Child of: Parent Object Type" }, "HierarchicLevel":0 } ]
The following .NET code sample illustrates how to make a call to the dependencylist endpoint. Also ,see Client code sample.
public async Task<List<Relativity.Services.Interfaces.Shared.Dependency>> GetDependencies() { Task<List<Relativity.Services.Interfaces.Shared.Dependency>> result = null; int workspaceArtifactId = 1234567; List<Relativity.Services.Objects.DataContracts.RelativityObjectRef> objectsToCheck = new List<Relativity.Services.Objects.DataContracts.RelativityObjectRef> { new Relativity.Services.Objects.DataContracts.RelativityObjectRef { ArtifactID = 2345678 }, new Relativity.Services.Objects.DataContracts.RelativityObjectRef { ArtifactID = 3456789 }, new Relativity.Services.Objects.DataContracts.RelativityObjectRef { ArtifactID = 4567890 } }; using (HttpClient httpClient = new HttpClient()) { httpClient.BaseAddress = new Uri($"https://localhost/relativity.rest/api/Relativity.Objects/workspace/{workspaceArtifactId}/object/"); // Set the required headers. httpClient.DefaultRequestHeaders.Add("X-CSRF-Header", "-"); httpClient.DefaultRequestHeaders.Add("Authorization", "Basic c2FtcGxlYWRtaW5AcmVsYXRpdml0eS5yZXN0OlMwbTNwQHNzdzByZA=="); string url = "dependencylist"; var dependencyListRequest = new Relativity.Services.Objects.DataContracts.DependencyListByObjectIdentifiersRequest { Objects = objectsToCheck }; string serializedDependencyListRequestt = Newtonsoft.Json.JsonConvert.SerializeObject(dependencyListRequest); string payload = $"{{ \"request\" : {serializedRequest} }}"; result = await httpClient.PostAsJsonAsync(url, payload); } }
You can delete a Document object and all its associated files, or an RDO. Use the POST method and send a request with the following URL format:
<host>/Relativity.REST/api/Relativity.Objects/workspace/{workspaceID}/object/delete
The body of the request for deleting Documents and RDOs must include the following fields:
{ "Request":{ "Object":{ "ArtifactID":1051263 } } }
The response contains the following fields:
{ "Report":{ "DeletedItems":[ { "ObjectTypeName":"Custom Object", "Action":"Delete", "Count":1, "Connection":"Parent" } ] } }
You can specify the Document objects or RDOs that you want to mass delete in the following ways:
Use the POST method and send a request with the following URL for a mass delete operation:
<host>/Relativity.REST/api/Relativity.Objects/workspace/{workspaceID}/object/delete
Click one of the following options to view sample JSON and field descriptions:
The JSON request requires the following fields:
Note: For a mass delete operation, all the objects must be the same type.
{ "massRequestByCriteria":{ "ObjectIdentificationCriteria":{ "ObjectType":{ "ArtifactTypeID":1000043 }, "Condition":"'ArtifactID' >= 1041396 And 'ArtifactID' < 1041496" } } }
The JSON request requires the following fields:
Objects - an array containing the Artifact IDs of Document objects or RDOs for deletion. The ArtifactID field contains the identifier of an object that you want to delete. You can also use GUIDs for this purpose.
Note: For a mass delete operation, all the objects must be the same type.
{ "massRequestByObjectIdentifiers":{ "Objects":[ { "ArtifactID":1042610 }, { "ArtifactID":1042611 }, { "ArtifactID":1042612 }, { "ArtifactID":1042613 }, { "ArtifactID":1042614 } ] } }
The response contains the following fields:
{ "Success":true, "Message":"", "Report":{ "DeletedItems":[ { "ObjectTypeName":"Custom Object", "Action":"Delete", "Count":5, "Connection":"Parent" } ] } }
With the Object Manager service, you can query for Workspaces, Documents, RDOs, and system types. This service includes the Query endpoint, which returns detailed information about the field-value pairs returned by the query. The QuerySlim endpoint returns a smaller payload, which saves bandwidth. This endpoint is useful for mobile devices and for displaying tabular data.
To execute a query, use a POST method and send a request with one of the following URL formats:
<host>/Relativity.REST/api/Relativity.Objects/workspace/{workspaceID}/object/query
<host>/Relativity.REST/api/Relativity.Objects/workspace/{workspaceID}/object/queryslim
In the body of the request, the following fields are required unless specifically identified as optional:
Name - a user-friendly name for the field.
Example:
"fields": {"Name":"*"}
Note: Before implementing the query operation on a long text field, review the following best practices in Use tokens with long text fields.
{ "Request":{ "ObjectType":{ "Guid":"2f816b1d-332d-4eb4-b7c0-2d45c3e12dab" }, "fields":[ { "Guid":"6c84e3ee-f3e3-46f6-80c3-28060c2d5eaf" }, { "Guid":"5d78c2c7-5a3a-4a62-b192-d4d8b9005ada" }, { "Guid":"dd049386-21c1-47de-966c-ba804982e2ca" } ], "condition":"'Single Choice Field' ISSET OR 'Relativity Native Type' LIKE 'Email'", "sorts":[ ] }, "start":0, "length":100 }
The response for a query includes information about the number of results returned, the start index in the result set, and the object type that was queried. The information in the response depends on whether you executed the search using the Query or QuerySlim endpoint. See the following JSON examples.
{ "TotalCount":7, "Objects":[ { "ParentObject":{ "ArtifactID":1003663 }, "FieldValues":[ { "Field":{ "ArtifactID":1039421, "FieldCategory":"Generic", "FieldType":"FixedLengthText", "Guids":[ ], "Name":"FixedLengthTextField", "ViewFieldID":1001625 }, "Value":"object 1" }, { "Field":{ "ArtifactID":1038851, "FieldCategory":"Generic", "FieldType":"SingleChoice", "Guids":[ ], "Name":"Single Choice Field", "ViewFieldID":1001385 }, "Value":{ "ArtifactID":1038858, "Guids":[ ], "Name":"Choice 1" } } ], "ArtifactID":1039443, "Guids":[ ] }, { "ParentObject":{ "ArtifactID":1003663 }, "FieldValues":[ { "Field":{ "ArtifactID":1039421, "FieldCategory":"Generic", "FieldType":"FixedLengthText", "Guids":[ ], "Name":"FixedLengthTextField", "ViewFieldID":1001625 }, "Value":"object 2" }, { "Field":{ "ArtifactID":1038851, "FieldCategory":"Generic", "FieldType":"SingleChoice", "Guids":[ ], "Name":"Single Choice Field", "ViewFieldID":1001385 }, "Value":{ "ArtifactID":1038859, "Guids":[ ], "Name":"Choice 2" } } ], "ArtifactID":1039444, "Guids":[ ] } ], "CurrentStartIndex":1, "ResultCount":2, "ObjectType":{ "ArtifactID":1039409, "Name":"Custom Object Type", "Guids":[ ], "ArtifactTypeID":1000043 } }
{ "TotalCount":7, "Objects":[ { "ArtifactID":1039443, "Values":[ "object 1", { "ArtifactID":1038858, "Guids":[ ], "Name":"Choice 1" } ] }, { "ArtifactID":1039444, "Values":[ "object 2", { "ArtifactID":1038859, "Guids":[ ], "Name":"Choice 2" } ] } ], "CurrentStartIndex":1, "ResultCount":2, "ObjectType":{ "ArtifactID":1039409, "Name":"Custom Object Type", "Guids":[ ], "ArtifactTypeID":1000043 }, "Fields":[ { "ArtifactID":1039421, "FieldCategory":"Generic", "FieldType":"FixedLengthText", "Guids":[ ], "Name":"FixedLengthTextField", "ViewFieldID":1001625 }, { "ArtifactID":1038851, "FieldCategory":"Generic", "FieldType":"SingleChoice", "Guids":[ ], "Name":"Single Choice Field", "ViewFieldID":1001385 } ] }
The Object Manager service supports exporting document fields, including complete long text fields such as extracted text, via the Export API. The Export API uses a multistep workflow with several endpoints:
Use the initializeexport endpoint to set up the export of documents from a workspace based on a query. Send a POST request to the following URL:
<host>/Relativity.REST/api/Relativity.Objects/workspace/<workspace artifact id>/object/initializeexport
<host>/Relativity.REST/api/Relativity.Objects/workspace/<workspace artifact id>/object/initializeexport
The body of the request must include the following fields:
Note: You can use the MaxCharactersForLongTextValues field of the queryRequest object to override the number limit set by the MaximumLongTextSizeForExportInCell instance setting. For more information, see Set up the export job in .NET, and Instance setting descriptions on the Relativity 9.6 Documentation site.
{ "queryRequest": { "ObjectType": {"ArtifactTypeID":10}, "fields":[ { "ArtifactID":1003668 } ], "condition":"'Extracted Text' ISSET " }, "start":0 }
The response contains the following fields:
{ "RunID": "60b6d8c2-9475-4fda-80bb-339f4dcad504", "RecordCount": 100000 }
Call one of the following endpoints to retrieve document fields from the export job:
Review the following considerations for these endpoints:
Use the retrievenextresultsblockfromexport endpoint to get the next block of records from an in-progress export job. Send a POST request to the following URL:
<host>/Relativity.REST/api/Relativity.Objects/workspace/<workspace artifact id>
/object/retrievenextresultsblockfromexport
The body of the request must include the following fields:
{ "runID": "1f485684-e28c-4204-a795-f11dc91c0f3a", "batchSize":5 }
The response contains a collection of objects with the following fields:
[ { "ArtifactID": 1048512, "Values": [ "Test CHINA CLEANS UP FISCAL & TAXATION PREFERENTIAL POLICIES from AsiaInfo Services\r\n\r\nBEIJING, Jun 26, 2002 (AsiaPort via COMTEX) -- Chinese government continues theefforts to clean up completely all kinds of fiscal and taxationpreferential policies and fiscal subsidy policies, abolish fiscaland taxation preferential policies for a few enterprises and areas,and abolish fiscal subsidy styles that do not accord with Chinesegovernment' s commitment and the WTO regulations.\r\n\r\nOn the basis of seriously cleaning up fiscal and taxation laws, rules and systems, Chinese government will continue to revise the contents that do not in accordance with Chinese\r\n" ] }, { "ArtifactID": 1048513, "Values": [ "Sally International affairs\r\nOvertaxed.\r\n\r\nWorkout Chinese rural taxation in the context of government regulation.\r\nSharing and Collaboration Policies within Government Agencies.\r\nCorporate Sector: Surtax\r\n\r\n" ] }, { "ArtifactID": 1048519, "Values": [ "Are Government Policies More Important Than Taxation in Attracting FDI?\r\n\r\nThis paper attempts to broaden the existing empirical literature on foreign direct investment by incorporating government expenditure policies, such as investment in infrastructure, and institutional factors that may impact business investment, such as corruption, along with other conventional determinants such as taxes, location factors, and agglomeration effects. We do so in an unbalanced panel data setting, where we use fixed effects to control for country specific idiosyncrasies and also year dummies in some specifications. Our data include both developing and developed countries in different regions of the world. The regression results indicate that better infrastructure and lower taxes attract FDI, with weaker evidence suggesting lower corruption also increases FDI. These results are robust and hold after controlling for fixed country effects, common year effects of FDI, and agglomeration effects. The magnitude of the response of FDI to infrastructure changes is similar to that of taxes in elasticity terms. The results add evidence to previous cross-sectional results and emphasize the importance of a range of government policies in addition to taxation in attracting foreign direct investment." ] }, { "ArtifactID": 1048520, "Values": [ "Foreign Affairs:\r\n\r\nInternational relations (IR) represents the study of foreign affairs and global issues among states within the international system, including the roles of states, inter-governmental organizations (IGOs), non-governmental organizations (NGOs), and multinational corporations (MNCs). It is both an academic and public policy field, and can be either positive or normative as it both seeks to analyze as well as formulate the foreign policy of particular states. It is often considered a branch of political science.\r\n\r\nApart from political science, IR draws upon such diverse fields as economics, history, law, philosophy, geography, sociology, anthropology, psychology, and cultural studies. It involves a diverse range of issues including but not limited to: globalization, state sovereignty, ecological sustainability, nuclear proliferation, nationalism, economic development, terrorism, organized crime, human security, foreign interventionism and human rights.\r\n" ] } ]
The following JSON response contains the #KCURA99DF2F0FEB88420388879F1282A55760# token instead of the text.
[ { "ArtifactID": 1048512, "Values": [ "#KCURA99DF2F0FEB88420388879F1282A55760#" ] }, { "ArtifactID": 1048513, "Values": [ "#KCURA99DF2F0FEB88420388879F1282A55760#" ] }, { "ArtifactID": 1048515, "Values": [ "#KCURA99DF2F0FEB88420388879F1282A55760#" ] }, { "ArtifactID": 1048517, "Values": [ "#KCURA99DF2F0FEB88420388879F1282A55760#" ] }, { "ArtifactID": 1048518, "Values": [ "#KCURA99DF2F0FEB88420388879F1282A55760#" ] } ]
Use the RetrieveResultsBlockFromExport endpoint to get a specific block of records from an in-progress export job. Send a POST request to the following URL:
<host>/Relativity.REST/api/Relativity.Objects/workspace/<workspace artifact id>
/object/RetrieveResultsBlockFromExport
The body of the request must include the following fields:
Note: The actual number of results returned may be less than the maximum number requested.
{ "runID":"310a6c13-3619-45fd-8723-bfaad86dfa45", "resultsBlockSize":4, "exportIndexID":0 }
The response contains a collection of objects with the following fields:
[ { "ArtifactID": 1048512, "Values": [ "Test CHINA CLEANS UP FISCAL & TAXATION PREFERENTIAL POLICIES from AsiaInfo Services\r\n\r\nBEIJING, Jun 26, 2002 (AsiaPort via COMTEX) -- Chinese government continues theefforts to clean up completely all kinds of fiscal and taxationpreferential policies and fiscal subsidy policies, abolish fiscaland taxation preferential policies for a few enterprises and areas,and abolish fiscal subsidy styles that do not accord with Chinesegovernment' s commitment and the WTO regulations.\r\n\r\nOn the basis of seriously cleaning up fiscal and taxation laws, rules and systems, Chinese government will continue to revise the contents that do not in accordance with Chinese\r\n" ] }, { "ArtifactID": 1048513, "Values": [ "Sally International affairs\r\nOvertaxed.\r\n\r\nWorkout Chinese rural taxation in the context of government regulation.\r\nSharing and Collaboration Policies within Government Agencies.\r\nCorporate Sector: Surtax\r\n\r\n" ] }, { "ArtifactID": 1048519, "Values": [ "Are Government Policies More Important Than Taxation in Attracting FDI?\r\n\r\nThis paper attempts to broaden the existing empirical literature on foreign direct investment by incorporating government expenditure policies, such as investment in infrastructure, and institutional factors that may impact business investment, such as corruption, along with other conventional determinants such as taxes, location factors, and agglomeration effects. We do so in an unbalanced panel data setting, where we use fixed effects to control for country specific idiosyncrasies and also year dummies in some specifications. Our data include both developing and developed countries in different regions of the world. The regression results indicate that better infrastructure and lower taxes attract FDI, with weaker evidence suggesting lower corruption also increases FDI. These results are robust and hold after controlling for fixed country effects, common year effects of FDI, and agglomeration effects. The magnitude of the response of FDI to infrastructure changes is similar to that of taxes in elasticity terms. The results add evidence to previous cross-sectional results and emphasize the importance of a range of government policies in addition to taxation in attracting foreign direct investment." ] }, { "ArtifactID": 1048520, "Values": [ "Foreign Affairs:\r\n\r\nInternational relations (IR) represents the study of foreign affairs and global issues among states within the international system, including the roles of states, inter-governmental organizations (IGOs), non-governmental organizations (NGOs), and multinational corporations (MNCs). It is both an academic and public policy field, and can be either positive or normative as it both seeks to analyze as well as formulate the foreign policy of particular states. It is often considered a branch of political science.\r\n\r\nApart from political science, IR draws upon such diverse fields as economics, history, law, philosophy, geography, sociology, anthropology, psychology, and cultural studies. It involves a diverse range of issues including but not limited to: globalization, state sovereignty, ecological sustainability, nuclear proliferation, nationalism, economic development, terrorism, organized crime, human security, foreign interventionism and human rights.\r\n" ] } ]
Use streamlongtext endpoint to retrieve a stream of text for long text fields marked as exceeding exceeds the size limit for the data returned by the RetrieveNextResultsBlockFromExport
<host>/Relativity.REST/api/Relativity.Objects/workspace/<workspace artifact id>
/object/streamlongtext
The body of the request must include the following fields:
{ "exportObject": { "ArtifactID": 1048519 }, "longTextField": { "ArtifactID": 1003668 } }
The response is a text stream of the content from a specific field. For unicode-enabled fields, the stream is encoded as UTF-16.
Community Updates |
|||
Aero Developer FAQ | Evolving the Platform | Most recent release notes | |
Learn more | Learn more | Learn more |
Additional Resources |
|||
![]() |
![]() |
||
Access Third-Party Tools with GitHub | Create .NET Apps Faster with NuGet | ||
Visit github | visit nuget |