View Manager service
In the REST API, the View Manager service provides endpoints for creating, reading, and updating views. It also provides endpoints for retrieving the following information:
- The status of a user's permissions on a view and on fields used in the search conditions on a view.
- A list of workspace users who can be assigned ownership of a view.
- A list of object types in a workspace. When creating a view, you can use this list to assign an object type to a view based on the objects that you want displayed in it.
- A list of each view in a workspace for a specific Artifact ID.
- A list of each view that is associated with a saved search in a workspace.
You can use the View Manager service to add or modify views used in a custom application or through the Relativity UI. For example, you might want to create a view that uses a specific set of search criteria to display custom objects in an application.
The Relativity Services API also provides functionality for managing views. For more information, see View Manager API.
This page contains the following information:
Client code sample
You can use the View Manager service by sending an HTTP request that makes a POST method call. See the following base URL for this service:
<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/
|
You can use the following .NET code as a REST client for making calls with the View Manager service. This code illustrates how to perform the following tasks:
- Use helper classes to create the proxy and select an appropriate authentication type. See Relativity API Helpers.
- Use the logging framework for troubleshooting and debugging purposes. See Log from a Relativity application .
- Instantiate an HttpClient object for sending requests and responses using the URL for the View Manager service.
- Set the required headers for the request.
- Set the url variable to the URL for the operation that you want to perform.
- Set the string represented by payload variable to the JSON input required for your operation.
- Use the PostAsJsonAsync() method to send a post request.
- Return the results of the request.
For information about running this code sample, see Relativity SDK samples.
View client code sample
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | public async Task< bool > ReadSingleAsync(IHelper helper)
{
bool success = false ;
using (IViewManager proxy = helper.GetServicesManager().CreateProxy<IViewManager>(ExecutionIdentity.User))
{
int ? viewToReadArtifactID;
if (ViewHelper.TryCreate(proxy, this .SampleWorkspace_ID, "My View to Read" , out viewToReadArtifactID))
{
Logging.ISampleLogger logger = _logger.ForContext( "MethodName" , new StackFrame(0).GetMethod().Name, false );
string username = ConfigurationManager.AppSettings[ "Username" ].ToString();
string password = ConfigurationManager.AppSettings[ "Password" ].ToString();
string base64header = helper.GetServicesManager().GetBase64Header(username, password);
string baseAddress = ConfigurationManager.AppSettings[ "BaseAddress" ].ToString();
string inputJSON = $ @"{{
""workspaceArtifactID"": {this.SampleWorkspace_ID},
""viewArtifactID"": {viewToReadArtifactID}
}}" ;
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri( string .Format( "{0}/" , baseAddress));
httpClient.DefaultRequestHeaders.Add( "X-CSRF-Header" , "-" );
httpClient.DefaultRequestHeaders.Add( "Authorization" , base64header);
string url = "/Relativity.REST/api/Relativity.Services.View.IViewModule/View%20Manager/ReadSingleAsync" ;
StringContent content = new StringContent(inputJSON, Encoding.UTF8, "application/json" );
HttpResponseMessage response = await httpClient.PostAsync(url, content);
string result = await response.Content.ReadAsStringAsync();
success = HttpStatusCode.OK == response.StatusCode;
if (success)
{
JObject resultObject = JObject.Parse(result);
int artifactID = 0;
string name = string .Empty;
JToken artifactIDToken;
JToken nameToken;
if (resultObject.TryGetValue( "ArtifactID" , StringComparison.InvariantCultureIgnoreCase, out artifactIDToken))
{
artifactID = Convert.ToInt32(artifactIDToken.ToString());
}
if (resultObject.TryGetValue( "Name" , StringComparison.InvariantCultureIgnoreCase, out nameToken))
{
name = Convert.ToString(nameToken.ToString());
}
logger.LogInformation($ "ReadSingleAsync succeeded. View ArtifactID is {artifactID}, Name is {name}" );
}
else
{
logger.LogError($ "ReadSingleAsync failed - {result}" );
}
}
}
return success;
}
|
Create a view in a workspace
Use the CreateSingleAsync endpoint to add a new view to a workspace. Send a request to this URL for the View Manager service:
<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/CreateSingleAsync
|
The JSON request includes fields for a user-friendly name, fields to be included in the view, sorting information, and other properties required to create a view.
View the descriptions of fields required to create a view
The following fields are required unless specifically identified as optional.
- workspaceArtifactID - the Artifact ID of the workspace where you want to create the view.
- viewDTO - a View object that contains properties for a Relativity view. The viewDTO has the following fields:
- ArtifactTypeID - the Artifact Type ID of the object that the view is assigned to. For example, the Artifact Type ID for a view assigned to the Document object is 10.
- Order - the position of the view in the view drop-down list. For more information, see Views on the Relativity Documentation site.
- VisibleInDropdown - a Boolean value indicating whether the view is visible in the view drop-down list.
- QueryHint - a string parameter used to optimize the view. For more information, see Views on the Relativity Documentation site.
- RelativityApplications - the Relativity applications associated with the view.
- Dashboard - a Dashboard object contains properties that include the Artifact ID of the dashboard, its name, and a list of GUIDs associated with it.
- Owner - the user who owns the view. The Owner object has the following fields:
- ArtifactID - the Artifact ID of the user who owns the view. An ArtifactID set to 0 indicates that the view is public.
- Name - the string used to identify the owner.
View the JSON request for creating a view
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | {
"workspaceArtifactID" :1021106,
"viewDTO" :{
"ArtifactTypeID" :10,
"Order" :100,
"VisibleInDropdown" : true ,
"QueryHint" : "" ,
"RelativityApplications" :[
],
"Owner" :{
"ArtifactID" :0,
"Name" : "Public"
},
"Name" : "My View" ,
"Fields" :[
{
"ArtifactID" :1003667,
"Name" : "Control Number" ,
"ViewFieldID" :1000186
},
{
"ArtifactID" :1035375,
"Name" : "File Size" ,
"ViewFieldID" :1000574
}
],
"Sorts" :[
{
"FieldIdentifier" :{
"ViewFieldID" :1000574,
"Name" : "File Size"
},
"Direction" : "Descending" ,
"Order" :10
}
],
"GroupDefinitionFieldArtifactID" : null ,
"SearchCriteria" :{
"Conditions" :[
{
"Condition" :{
"FieldIdentifier" :{
"ArtifactID" :1035375,
"Name" : "File Size"
},
"ConditionType" : "Criteria" ,
"Operator" : "GreaterThan" ,
"NotOperator" : false ,
"Value" :2000
},
"BooleanOperator" : "None"
}
],
"BooleanOperator" : "None"
}
}
}
|
View the JSON request for creating a view
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | {
"workspaceArtifactID" :1021106,
"viewDTO" :{
"ArtifactTypeID" :10,
"Order" :100,
"VisibleInDropdown" : true ,
"QueryHint" : "" ,
"RelativityApplications" :[
],
"Dashboard" :{
"ArtifactID" :1039959,
"Guids" :[
],
"Name" : "My Dashboard"
},
"Owner" :{
"ArtifactID" :0,
"Name" : "Public"
},
"Name" : "My View" ,
"Fields" :[
{
"ArtifactID" :1003667,
"Name" : "Control Number" ,
"ViewFieldID" :1000186
},
{
"ArtifactID" :1035375,
"Name" : "File Size" ,
"ViewFieldID" :1000574
}
],
"Sorts" :[
{
"FieldIdentifier" :{
"ViewFieldID" :1000574,
"Name" : "File Size"
},
"Direction" : "Descending" ,
"Order" :10
}
],
"GroupDefinitionFieldArtifactID" : null ,
"SearchCriteria" :{
"Conditions" :[
{
"Condition" :{
"FieldIdentifier" :{
"ArtifactID" :1035375,
"Name" : "File Size"
},
"ConditionType" : "Criteria" ,
"Operator" : "GreaterThan" ,
"NotOperator" : false ,
"Value" :2000
},
"BooleanOperator" : "None"
}
],
"BooleanOperator" : "None"
}
}
}
|
The response contains the Artifact ID of the newly created view.
Retrieve information about a view
Use the ReadSingleAsync endpoint to retrieve information about a view. Send a request to this URL for the View Manager service:
<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/ReadSingleAsync
|
The request must include the following fields:
- workspaceArtifactID - the Artifact ID of the workspace that contains the view.
- viewArtifactID - the Artifact ID of the view with the information that you want to retrieve.
1 2 3 4 | {
"workspaceArtifactID" :1021106,
"viewArtifactID" :1042993
}
|
The JSON response for the ReadSingleAsync endpoint includes information about the object type assigned to the view, the owner, search criteria associated with it, sorting, and other data.
View the descriptions of JSON response fields
- ArtifactTypeID - the Artifact Type ID of the object that the view is assigned to. For example, the Artifact Type ID for the Document object is 10.
- ObjectType - the Artifact Type information for the object that the view is assigned to. The ObjectType object has the following fields:
- DescriptorArtifactTypeID - the Descriptor Artifact Type ID of the object type artifact. For example, the Descriptor Artifact Type ID for the Document object is 10.
- Guids - a list of GUIDs used to identify an Artifact.
- Name - the string used to identify an object type. For example, Document is the string used to identify an object type.
- ArtifactID - the Artifact ID for the object type.
- Owner - the user who owns the view. The Owner object has the following fields:
- ArtifactID - the Artifact ID of the user who owns the view. An ArtifactID set to 0 indicates that the view is public.
- Name - the string used to identify the owner.
- Order - the position of the view in the view drop-down list. For more information, see Views on the Relativity Documentation site.
- VisibleInDropdown - a Boolean value indicating whether the view is visible in the view drop-down list.
- QueryHint - a string parameter used to optimize the view. For more information, see Views on the Relativity Documentation site.
- RelativityApplications - the Relativity applications associated with the view.
- Dashboard - a Dashboard object contains properties that include the Artifact ID of the dashboard, its name, and a list of GUIDs associated with it.
- SearchCriteria - the search criteria specified as a CriteriaCollection object. This object contains the list of conditions specified in the query. For more information about general query options, see Query for resources.
- Fields - the fields included in the view result set. This fields are specified as a collection of FieldRef objects.
- Sorts - the sort order for view results specified as a collection of Sort objects. This field indicates whether the results are sorted in ascending or descending order, identifies a field by Artifact ID and GUID, and specifies a sort order. See the Sort class in the kCura.Relativity.Client namespace.
- SystemCreatedBy - the user who created the view. The user is identified with a name and Artifact ID.
- SystemCreatedOn - the date and time in UTC when the view was created.
- SystemLastModifiedBy - the user who last modified the view.
- SystemLastModifiedOn - the date and time in UTC when the view was last modified.
- IsVisible - a Boolean value indicating whether the view is visible in the system.
- IsSystemView - a Boolean value indicating whether the view is a system view. Relativity contains system views that are provided as part of the application by default. You can't edit all system views, such as the workspace system view. For more information, see Views on the Relativity Documentation site.
- IsRelationalFieldView - a Boolean value indicating whether the view is used to display relational fields.
- ArtifactID - the Artifact ID of the view.
- Name - a user-friendly name for the view. For example, My View is a descriptive name for a view.
View a JSON response returned when retrieving information about a view
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | {
"ArtifactTypeID" :10,
"ObjectType" :{
"DescriptorArtifactTypeID" :10,
"Guids" :[
],
"Name" : "Document" ,
"ArtifactID" :0
},
"Owner" :{
"ArtifactID" :0,
"Name" : ""
},
"Order" :100,
"VisibleInDropdown" : true ,
"QueryHint" : "" ,
"RelativityApplications" :[
],
"SearchCriteria" :{
"Conditions" :[
{
"Condition" :{
"ConditionType" : "Criteria" ,
"Operator" : "GreaterThan" ,
"FieldIdentifier" :{
"ArtifactID" :1035375,
"Guids" :[
"1287c045-cf79-44b6-8a0a-0c8d7d60d745"
],
"Name" : "File Size" ,
"ViewFieldID" :1000574
},
"NotOperator" : false ,
"Value" :2000.0
},
"BooleanOperator" : "None" ,
"HasPermission" : true
}
],
"BooleanOperator" : "None"
},
"Fields" :[
{
"ArtifactID" :1003667,
"Guids" :[
"2a3f1212-c8ca-4fa9-ad6b-f76c97f05438"
],
"Name" : "Control Number" ,
"ViewFieldID" :1000186
},
{
"ArtifactID" :1035375,
"Guids" :[
"1287c045-cf79-44b6-8a0a-0c8d7d60d745"
],
"Name" : "File Size" ,
"ViewFieldID" :1000574
}
],
"Sorts" :[
{
"Direction" : "Descending" ,
"FieldIdentifier" :{
"ArtifactID" :1035375,
"Guids" :[
"1287c045-cf79-44b6-8a0a-0c8d7d60d745"
],
"Name" : "File Size" ,
"ViewFieldID" :1000574
},
"Order" :0
}
],
"SystemCreatedBy" :{
"ArtifactID" :1027610,
"Name" : "Admin, Admin"
},
"SystemCreatedOn" : "2017-04-04T21:37:42.087" ,
"SystemLastModifiedBy" :{
"ArtifactID" :1027610,
"Name" : "Admin, Admin"
},
"SystemLastModifiedOn" : "2017-04-04T21:37:42.087" ,
"IsVisible" : true ,
"IsSystemView" : false ,
"IsRelationalFieldView" : false ,
"ArtifactID" :1042993,
"Name" : "My View"
}
|
View a JSON response returned when retrieving information about a view
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | {
"ArtifactTypeID" :10,
"ObjectType" :{
"DescriptorArtifactTypeID" :10,
"Guids" :[
],
"Name" : "Document" ,
"ArtifactID" :0
},
"Owner" :{
"ArtifactID" :0,
"Name" : ""
},
"Order" :100,
"VisibleInDropdown" : true ,
"QueryHint" : "" ,
"RelativityApplications" :[
],
"Dashboard" :{
"ArtifactID" :1039959,
"Guids" :[
],
"Name" : "My Dashboard"
},
"SearchCriteria" :{
"Conditions" :[
{
"Condition" :{
"ConditionType" : "Criteria" ,
"Operator" : "GreaterThan" ,
"FieldIdentifier" :{
"ArtifactID" :1035375,
"Guids" :[
"1287c045-cf79-44b6-8a0a-0c8d7d60d745"
],
"Name" : "File Size" ,
"ViewFieldID" :1000574
},
"NotOperator" : false ,
"Value" :2000.0
},
"BooleanOperator" : "None" ,
"HasPermission" : true
}
],
"BooleanOperator" : "None"
},
"Fields" :[
{
"ArtifactID" :1003667,
"Guids" :[
"2a3f1212-c8ca-4fa9-ad6b-f76c97f05438"
],
"Name" : "Control Number" ,
"ViewFieldID" :1000186
},
{
"ArtifactID" :1035375,
"Guids" :[
"1287c045-cf79-44b6-8a0a-0c8d7d60d745"
],
"Name" : "File Size" ,
"ViewFieldID" :1000574
}
],
"Sorts" :[
{
"Direction" : "Descending" ,
"FieldIdentifier" :{
"ArtifactID" :1035375,
"Guids" :[
"1287c045-cf79-44b6-8a0a-0c8d7d60d745"
],
"Name" : "File Size" ,
"ViewFieldID" :1000574
},
"Order" :0
}
],
"SystemCreatedBy" :{
"ArtifactID" :1027610,
"Name" : "Admin, Admin"
},
"SystemCreatedOn" : "2017-04-04T21:37:42.087" ,
"SystemLastModifiedBy" :{
"ArtifactID" :1027610,
"Name" : "Admin, Admin"
},
"SystemLastModifiedOn" : "2017-04-04T21:37:42.087" ,
"IsVisible" : true ,
"IsSystemView" : false ,
"IsRelationalFieldView" : false ,
"ArtifactID" :1042993,
"Name" : "My View"
}
|
Retrieve each view in a workspace
You can retrieve each view in a workspace for a specific Artifact ID by making a call with the RetrieveViewsByContextArtifactIDAsync endpoint. To learn more, visit Views. Send a request to this URL for the View Manager service:
<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/RetrieveViewsByContextArtifactIDAsync
|
The JSON request includes the Artifact ID of the workspace which contains the view and the Artifact ID of the view.
Retrieve the views in a saved search
You can retrieve each view that is associated with a saved search in a workspace by making a call with the RetrieveViewsByContextArtifactIDForSearchAsync endpoint. To learn more, visit Saved Search. Send a request to this URL for the View Manager service:
<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/RetrieveViewsByContextArtifactIDForSearchAsync
|
The JSON request includes the Artifact ID of the workspace which contains the saved search(es).
JSON response contains an array of SearchViewResponse objects. Each of them represents properties of a single View for Search in a specified Workspace.
There is a number of fields that do not show up in JSON response if their value is null. These fields are: "Order", "SearchProviderID", "ThreadMethod", "PayloadFieldArtifactID", "GroupDefinitionArtifactID" and "DashboardArtifactID"
View a JSON request used to retrieve the views in a saved search
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | {
"ArtifactID" : 1039627,
"Name" : "All Documents Search" ,
"ArtifactTypeID" : 10,
"IsVisible" : false ,
"RenderLinks" : true ,
"Type" : "Search" ,
"IsReport" : false ,
"ViewByFamily" : 0,
"QueryHint" : "" ,
"SearchText" : "" ,
"AvailableInObjectTab" : false ,
"VisualizationType" : 0,
"IsManualRerun" : false ,
"ArtifactType" : "Search"
},
{
"ArtifactID" : 1039629,
"Name" : "All Documents With Natives Search" ,
"ArtifactTypeID" : 10,
"IsVisible" : false ,
"RenderLinks" : true ,
"Type" : "Search" ,
"IsReport" : false ,
"ViewByFamily" : 0,
"QueryHint" : "" ,
"SearchText" : ""
"AvailableInObjectTab" : false ,
"VisualizationType" : 0,
"IsManualRerun" : false ,
"ArtifactType" : "Search"
}
]
|
Update the properties of a view
You can update the properties of a view by making a call with the UpdateSingleAsync endpoint. Send a request to this URL for the View Manager service:
<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/UpdateSingleAsync
|
The JSON request includes fields for the workspace Artifact ID, the Artifact ID of the view, and other properties that you can update on the view.
View a JSON request used to update a view
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | {
"workspaceArtifactID" :1021106,
"viewDTO" :{
"ArtifactID" :1029049,
"ArtifactTypeID" :10,
"Order" :100,
"VisibleInDropdown" : true ,
"QueryHint" : "" ,
"RelativityApplications" :[
],
"Owner" :{
"ArtifactID" :0,
"Name" : "Public"
},
"Name" : "My View" ,
"Fields" :[
{
"ArtifactID" :1003667,
"Name" : "Control Number" ,
"ViewFieldID" :1000186
},
{
"ArtifactID" :1035375,
"Name" : "File Size" ,
"ViewFieldID" :1000574
}
],
"Sorts" :[
{
"FieldIdentifier" :{
"ViewFieldID" :1000574,
"Name" : "File Size"
},
"Direction" : "Descending" ,
"Order" :10
}
],
"GroupDefinitionFieldArtifactID" : null ,
"SearchCriteria" :{
"Conditions" :[
{
"Condition" :{
"FieldIdentifier" :{
"ArtifactID" :1035375,
"Name" : "File Size"
},
"ConditionType" : "Criteria" ,
"Operator" : "GreaterThan" ,
"NotOperator" : false ,
"Value" :2000
},
"BooleanOperator" : "None"
}
],
"BooleanOperator" : "None"
}
}
}
|
View a JSON request used to update a view
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | {
"workspaceArtifactID" :1021106,
"viewDTO" :{
"ArtifactID" :1029049,
"ArtifactTypeID" :10,
"Order" :100,
"VisibleInDropdown" : true ,
"QueryHint" : "" ,
"RelativityApplications" :[
],
"Dashboard" :{
"ArtifactID" :1039959,
"Guids" :[
],
"Name" : "My Dashboard"
},
"Owner" :{
"ArtifactID" :0,
"Name" : "Public"
},
"Name" : "My View" ,
"Fields" :[
{
"ArtifactID" :1003667,
"Name" : "Control Number" ,
"ViewFieldID" :1000186
},
{
"ArtifactID" :1035375,
"Name" : "File Size" ,
"ViewFieldID" :1000574
}
],
"Sorts" :[
{
"FieldIdentifier" :{
"ViewFieldID" :1000574,
"Name" : "File Size"
},
"Direction" : "Descending" ,
"Order" :10
}
],
"GroupDefinitionFieldArtifactID" : null ,
"SearchCriteria" :{
"Conditions" :[
{
"Condition" :{
"FieldIdentifier" :{
"ArtifactID" :1035375,
"Name" : "File Size"
},
"ConditionType" : "Criteria" ,
"Operator" : "GreaterThan" ,
"NotOperator" : false ,
"Value" :2000
},
"BooleanOperator" : "None"
}
],
"BooleanOperator" : "None"
}
}
}
|
The response returns a status code of 200 when the service successfully updates a view.
Retrieve the access status of a user
You can use the GetAccessStatusAsync endpoint to determine whether a user has View permissions to a view, and to the fields used in the criteria for search conditions on the view. Send a request to this URL for the View Manager service:
<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/GetAccessStatusAsync
|
The request must include the following fields:
- workspaceArtifactID - the Artifact ID of the workspace that contains the view.
- artifactID - the Artifact ID of the view that you want to check for user access status.
1 2 3 4 | {
"workspaceArtifactID" :1021106,
"artifactID" :1041929
}
|
The response returns the following fields:
- Exists - a Boolean value indicating whether the specified view exists.
- CanView - a Boolean value indicating whether a user has View permissions on the specified view. For more information, see Security and Permissions on the Relativity Server2021 Documentation site.
- CanViewCriteriaFields - a Boolean value indicating whether a user has View permissions on all fields used in the criteria for a search conditions on the view.
1 2 3 4 5 | {
"Exists" : true ,
"CanView" : true ,
"CanViewCriteriaFields" : true
}
|
Retrieve users for assigning view ownership
Use the GetViewOwnersAsync endpoint to retrieve a list of users in a workspace. You can then use this list to assign owners to a view. To be designated as an owner, a user must have View permissions for views. For more information, see Security and Permissions on the Relativity Server2021 Documentation site.
To retrieve a list of users, send a request to this URL for the View Manager service:
<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/GetViewOwnersAsync
|
The request must contain the Artifact ID of the workspace that contains the view. When the owner is set to Public, all users with View permissions can see the view.
1 2 3 | {
"workspaceArtifactID" :1028991
}
|
The response is an array of UserRef objects. Each object contains the ArtifactID and the name of a user.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | [
{
"ArtifactID" :0,
"Name" : "Public"
},
{
"ArtifactID" :9,
"Name" : "Admin, Relativity"
},
{
"ArtifactID" :777,
"Name" : "Service Account, Relativity"
}
]
|
Retrieve a list of object types in a workspace
Use the GetObjectTypesAsync endpoint to retrieve a list of object types in a workspace. You can select an object type from this list that is used for populating the ObjectType field for the View object. Send a request to this URL for the View Manager service:
<host>/Relativity.Rest/API/Relativity.Services.View.IViewModule/View%20Manager/GetObjectTypesAsync
|
The request must contain the Artifact ID of the workspace that contains the view.
1 2 3 | {
"workspaceArtifactID" :1028991
}
|
The response is an array of ObjectTypeRef objects that contain the DescriptorArtifactTypeID, Guids, Name, and ArtifactID for the object type.
View a JSON response containing a list of object types
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | [
{
"DescriptorArtifactTypeID" :1000020,
"Guids" :[
],
"Name" : "Analytics Categorization Result" ,
"ArtifactID" :0
},
{
"DescriptorArtifactTypeID" :1000021,
"Guids" :[
],
"Name" : "Analytics Categorization Set" ,
"ArtifactID" :0
},
{
"DescriptorArtifactTypeID" :1000022,
"Guids" :[
],
"Name" : "Analytics Category" ,
"ArtifactID" :0
},
{
"DescriptorArtifactTypeID" :27,
"Guids" :[
],
"Name" : "Batch" ,
"ArtifactID" :0
},
{
"DescriptorArtifactTypeID" :10,
"Guids" :[
],
"Name" : "Document" ,
"ArtifactID" :0
}
]
|