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

Workspace

A workspace resource represents a secure data repository for documents and applications developed with Dynamic Objects. It is an admin-level object.

Note: You can't create, update, or delete Workspaces through the REST API. The PUT, and DELETE methods are not supported for these operations respectively.

This page contains the following information:

GET method

You can use the GET method to retrieve a single Workspace or a collection of Workspaces. You can find a general overview of this functionality in Retrieve resources.

Retrieve a Workspace

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

Sample URL

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

Copy

/localhost/Relativity.REST/Relativity/Workspace/1015349

Code sample

Copy
<![CDATA[
//Set up the client.
            
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("http://localhost/");
 
//Set the required headers.
httpClient.DefaultRequestHeaders.Add("X-CSRF-Header", string.Empty);
httpClient.DefaultRequestHeaders.Add("Authorization", "Basic c2FtcGxlYWRtaW5AcmVsYXRpdml0eS5yZXN0OlMwbTNwQHNzdzByZA==");
 
//Call the GET method on a Workspace.
string url = "Relativity.REST/Relativity/Workspace/1015349";
HttpResponseMessage response = httpClient.GetAsync(url).Result;
string result = response.Content.ReadAsStringAsync().Result;
bool success = HttpStatusCode.OK == response.StatusCode;
 
//Parse the result with Json.NET.
            
JObject resultObject = JObject.Parse(result);
        ]]>

Response

Retrieve a collection of Workspaces

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

Sample URL

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

Copy

http://localhost/Relativity.REST/Relativity/Workspace

Code sample

Copy

//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 the Workspace collection.
            
string url = "Relativity.REST/Relativity/Workspace";
HttpResponseMessage response = httpClient.GetAsync(url).Result;
string result = response.Content.ReadAsStringAsync().Result;
bool success = HttpStatusCode.OK == response.StatusCode;
 
//Parse the result with Json.NET.
            
JObject resultObject = JObject.Parse(result);

Response

POST method

You can use the POST method to perform complex queries on Workspaces. For more information, see Retrieve resources.

Query for a Workspace resource

You can set conditions used to query for a Workspace resource.

Sample URL

Copy

/localhost/Relativity.REST/Relativity/Workspace/QueryResult

Sample code

Copy
<![CDATA[
//Set up the client.
            
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("http://localhost/");
 
//Set the required headers.
            
httpClient.DefaultRequestHeaders.Add("X-CSRF-Header", string.Empty);
httpClient.DefaultRequestHeaders.Add("Authorization", "Basic c2FtcGxlYWRtaW5AcmVsYXRpdml0eS5yZXN0OlMwbTNwQHNzdzByZA==");
 
//Call Query on a Workspace.
            
string url = "Relativity.REST/Relativity/Workspace/QueryResult";
StringContent content = new StringContent(QueryInputJSON, Encoding.UTF8, "application/json");
HttpResponseMessage response = httpClient.PostAsync(url, content).Result;
string result = response.Content.ReadAsStringAsync().Result;
bool success = HttpStatusCode.Created == response.StatusCode;
 
//Parse the result with Json.NET.
            
JObject resultObject = JObject.Parse(result);
        ]]>

Request

Response