This DTO has been removed as part of the Relativity Services API (RSAPI) Deprecation and is no longer supported. For more information and alternative APIs, see RSAPI deprecation process.

Matter

Relativity REST API supports operations with the Matter objects though the Matter Manager service. The operations available through the service are equivalent to the asynchronous methods for interacting with the Matter objects in the Relativity Services API. For more information, see Matter in the Services API documentation.

Note: You can only use the POST method when interacting with the service.

This page contains the following information:

Client code sample

The following is an example of .NET REST code for creating a Matter. The code can be used for all Matter Manager service operations with different endpoint URLs and input JSON values.

//Set up the REST 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 Create for a Matter.
            
string url = "Relativity.REST/api/Relativity.Services.Matter.IMatterModule/Matter%20Manager/CreateSingleAsync";
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);        

Create

Use this Matter Manager service URL to create a Matter:

<host>/Relativity.REST/api/Relativity.Services.Matter.IMatterModule/Matter%20Manager/CreateSingleAsync

The request must include a valid JSON representation of a Matter DTO. The required properties include Name, Number, Status, and Client.

Note: You can only use the ArtifactID of the Choice to set the Matter status value.

The response is an ArtifactID of the created Matter.

Read

Use this Matter Manager service URL to read a Matter:

<host>/Relativity.REST/api/Relativity.Services.Matter.IMatterModule/Matter%20Manager/ReadSingleAsync   

The request must include the Matter ArtifactID.

{
  "matterArtifactID": 13759952
}  

The response returns a JSON representation of a Matter DTO.

Update

Use this Matter Manager service URL to update a Matter:

<host>/Relativity.REST/api/Relativity.Services.Matter.IMatterModule/Matter%20Manager/UpdateSingleAsync

The request must include a valid JSON representation of a Matter DTO.

Note: You must include all DTO field information in the update. You cannot update individual fields because fields left empty will be cleared on the update. All DTO fields are required except for system/user created by/created on.

The following JSON sample illustrates how to change the Name and Number properties of the Matter created in a previous example.

{
  "matterDTO": {
    "Number": "No12345PE",
    "Status": {
      "ArtifactID": 671,
      "Name": "Active",
      "Guids": null
    },
    "Keywords": "",
    "Notes": "",
    "ArtifactID": 13761061,
    "Name": "Tuchman vs Marsh - archived"
  }
}

The response does not contain any data. Success or failure are indicated by the HTTP status code. For more information, see HTTP status codes.

Delete

Use this Matter Manager service URL to delete a Matter:

<host>/Relativity.REST/api/Relativity.Services.Matter.IMatterModule/Matter%20Manager/DeleteSingleAsync   

The request must include the Matter ArtifactID.

{
  "clientArtifactID": 13761061
}  

The response does not contain any data. Success or failure are indicated by the HTTP status code. For more information, see HTTP status codes.

Query

The Matter Manager service URL for querying Matter:

<host>/Relativity.REST/api/Relativity.Services.Matter.IMatterModule/Matter%20Manager/QueryAsync

The request must include the query and optionally the number of results to return as the length property. The following is an example of a query for Matter objects with the name starting with "T". The result set is sorted by ArtifactID in descending order.

{
  "query": {
    "Condition": "'Name' STARTSWITH 'T'",
    "Sorts": [
      {
        "FieldIdentifier": {
          "Name": "ArtifactID"
        },
        "Order": 0,
        "Direction": 1
      }
    ]
  },
  "length": 5
}

If more results are available than initially specified in the length property, the query returns a token value that is not null. The results can subsequently be retrieved by a call to the QuerySubsetAsync operation.

<host>/Relativity.REST/api/Relativity.Services.Matter.IMatterModule/Matter%20Manager/QuerySubsetAsync

Note that the QuerySubsetAsync request can specify the starting index of the result subset and the number of results to be returned.

{
  "queryToken": "a5079c32-e080-473d-846e-941ef6a5f086",
  "start": 6,
  "length": 5
}

To return all Clients in a Relativity instance, specify an empty Condition as shown in the JSON example below. When the length parameter is not specified, its value defaults to 0, and the number of returned results defaults to the Instance setting table value of PDVDefaultQueryCacheSize of 10000. For more information, see Search Relativity.

{
  "query":{}
}

The response returns a collection of Matter objects as a ClientQueryResultSet object.

Get clients

Use this Matter Manager service URL for return the available clients that can be associated with the Matter:

<host>/Relativity.REST/api/Relativity.Services.Matter.IMatterModule/Matter%20Manager/GetClientsForMatterAsync

The request does not include any parameters.

The response returns a collection of Client objects.

[
  {
    "ArtifactID": 13759847,
    "Name": "Tuchman and Marsh"
  },
  {
    "ArtifactID": 13759869,
    "Name": "DigitalDreams GmbH"
  },
  {
    "ArtifactID": 13758842,
    "Name": "Sample Client"
  }
]

Get status choices

Use this Matter Manager service URL for return the choices for the Matter status field:

<host>/Relativity.REST/api/Relativity.Services.Matter.IMatterModule/Matter%20Manager/GetStatusChoicesForMatterAsync

The request does not include any parameters.

The response is a collection of Choice objects.

[
  {
    "ArtifactID": 671,
    "Name": "Active",
    "Guids": []
  },
  {
    "ArtifactID": 670,
    "Name": "Inactive",
    "Guids": []
  }
]

Additional Resources

DevHelp Community GitHub Release Notes NuGet

Share knowledge with the Relativity developer community.

Access tools and resources to build an application.

Review the most recent product release notes.

Create .NET Apps faster with NuGet.