Object Manager service

The Object Manager service exposes multiple operations designed to facilitate working with Document objects and all types of Relativity Dynamic Objects (RDOs). You can perform the following operations with this service:

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 API.

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 on the Relativity 9.5 Developers site.

This page contains the following information:

See this related page:

Client code sample

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;
}

Create an RDO and its specified fields

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:

The response contains the following fields:

Mass create RDOs

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:

The response contains the following fields:

Retrieve field values for a Document object or RDO

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:

The sample responses contains the following fields:

Update fields on a Document object or RDO

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:

Click a field type in the following list to view sample JSON and information about the field values.

The response contains the following fields:

{
   "EventHandlerStatuses":[
      {
         "Success":true
      },
      {
         "Success":true
      }
   ]
}

Update a long text field using an input stream

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.

Mass update Document objects or RDOs

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 response contains the following fields:

Retrieve a list of object dependencies

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
   }
]

Delete a Document object or RDO

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"
         }
      ]
   }
}

Mass delete Document objects or RDOs

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 response contains the following fields:

Query for Relativity objects

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:

In the body of the request, the following fields are required unless specifically identified as optional:

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.

Export API

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:

Set up an export job

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:

{
  "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
}

Retrieve objects

Call one of the following endpoints to retrieve document fields from the export job:

Review the following considerations for these endpoints:

Retrieve the next block of records

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#"
    ]
  }
]

Retrieve a specific block of records

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:

{
   "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"
    ]
  }
]

Stream text

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 or RetrieveResultsBlockFromExport endpoint. Send a POST request to the following URL:

<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