

Last date modified: July 07 2025
In Relativity, you can organize users by assigning them to one or more groups. Additionally, you can set permissions for a group. For more information, see Groups in the Relativity
The Group Manager service exposes endpoints that provide the following functionality:
As a sample use case, you might create an application with a custom interface for adding multiple users with a mass operation.
You can also use the Group Manager service through .NET. For more information, see Group Manager (.NET).
Review the following guidelines for working with the Group Manager service.
The URLs for REST endpoints contain path parameters that you need to set before making a call:
For example, you can use the following URL to retrieve a group:
1
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/{groupArtifactID}?includeMetadata=true&includeActions=true
Set the path parameters as follows:
To use the Group Manager service, send requests by making calls with the required HTTP methods. See the following base URL for this service:
1
<host>/Relativity.REST/api/Relativity.Groups/workspace/{workspaceID}/groups/
You can use the following C# code as a sample client for creating a group. This code illustrates how to perform the following tasks:
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
private HttpClient GetHttpClient()
{
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("https://localhost/");
httpClient.DefaultRequestHeaders.Add("X-CSRF-Header", "-");
httpClient.DefaultRequestHeaders.Add("Authorization", "Basic " + Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes("test.user@mydomain.com:Password")));
return httpClient;
}
public async Task<List<int>> GetEligibleClientIDs()
{
string url = "/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/query-eligible-clients";
var payload = new
{
request = new
{
Fields = new[]
{
new { Name = "*" }
}
},
start = 1,
length = 100
};
string payloadString = JsonConvert.SerializeObject(payload);
var content = new StringContent(payloadString, Encoding.UTF8, "application/json");
HttpClient httpClient = GetHttpClient();
HttpResponseMessage response = await httpClient.PostAsync(url, content);
string resultString = await response.Content.ReadAsStringAsync();
var clientIDs = new List<int>();
dynamic result = JObject.Parse(resultString) as JObject;
foreach (var obj in result.Objects)
{
int clientID = obj.ArtifactID;
clientIDs.Add(clientID);
}
return clientIDs;
}
public async Task<int> Create(int clientID)
{
string url = "Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/";
var payload = new
{
groupRequest = new
{
Name = "Sample group name",
Client = new
{
Value = new { ArtifactID = clientID }
},
Keywords = "Sample keywords",
Notes = "Sample notes"
}
};
string payloadString = JsonConvert.SerializeObject(payload);
var content = new StringContent(payloadString, Encoding.UTF8, "application/json");
HttpClient httpClient = GetHttpClient();
HttpResponseMessage message = await httpClient.PostAsync(url, content);
string resultString = await message.Content.ReadAsStringAsync();
dynamic result = JObject.Parse(resultString) as JObject;
int artifactID = result.ArtifactID;
return artifactID;
}
To create a group, send a POST request with a URL in the following format:
1
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/
The request contains a groupRequest object with the following fields:
1
2
3
4
5
6
7
8
9
10
11
12
{
"groupRequest": {
"Client": {
"Value": {
"ArtifactID": 1015644
}
},
"Name": "MyGroup",
"Keywords": "Keywords",
"Notes": "Notes"
}
}
The response contains the following fields:
Name | Value | Description |
---|---|---|
SystemAdmin | "SystemAdmin" | A group containing system administrators |
SystemGroup | "SystemGroup" | A group containing users |
Everyone | "Everyone" | A group containing all the users in the system |
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
{
"Client": {
"Secured": false,
"Value": {
"Name": "Relativity",
"ArtifactID": 1015644,
"Guids": []
}
},
"GroupType": "SystemGroup",
"Keywords": "Keywords",
"Notes": "Notes",
"CreatedOn": "2021-05-21T18:38:39.313",
"CreatedBy": {
"Name": "user, demo",
"ArtifactID": 1029460,
"Guids": []
},
"LastModifiedBy": {
"Name": "user, demo",
"ArtifactID": 1029460,
"Guids": []
},
"LastModifiedOn": "2021-05-21T18:38:39.313",
"Meta": {
"Unsupported": [],
"ReadOnly": [
"GroupType"
]
},
"Actions": [
{
"Name": "Delete",
"IsAvailable": true,
"Reason": []
},
{
"Name": "Update",
"IsAvailable": true,
"Reason": []
},
{
"Name": "AddMembers",
"IsAvailable": true,
"Reason": []
},
{
"Name": "RemoveMembers",
"IsAvailable": true,
"Reason": []
}
],
"Name": "MyGroup",
"ArtifactID": 1029462,
"Guids": []
}
To retrieve a group, send a GET request with a URL in the following format:
1
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/{groupArtifactID}?includeMetadata=true&includeActions=true
The request body is empty.
The response for a read operation contains the same fields as a response for a create operation. See the descriptions in View field descriptions for a create response.
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
{
"Client": {
"Secured": false,
"Value": {
"Name": "Relativity",
"ArtifactID": 1015644,
"Guids": []
}
},
"GroupType": "SystemGroup",
"Keywords": "Keywords",
"Notes": "Notes",
"CreatedOn": "2021-05-21T18:38:39.313",
"CreatedBy": {
"Name": "user, demo",
"ArtifactID": 1029460,
"Guids": []
},
"LastModifiedBy": {
"Name": "user, demo",
"ArtifactID": 1029460,
"Guids": []
},
"LastModifiedOn": "2021-05-21T18:38:39.313",
"Name": "MyGroup",
"ArtifactID": 1029462,
"Guids": []
}
To update a group, send a PUT request with a URL in the following format:
1
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/{groupArtifactID}
The request contains a groupRequest object with the following fields:
1
2
3
4
5
6
7
8
9
10
11
12
{
"groupRequest": {
"Client": {
"Value": {
"ArtifactID": 1015644
}
},
"Name": "MyGroup",
"Keywords": "Updated Keywords",
"Notes": "Updated Notes"
}
}
The response for an update operation contains the same fields as a response for a create operation. See the descriptions in View field descriptions for a create response.
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
{
"Client": {
"Secured": false,
"Value": {
"Name": "Relativity",
"ArtifactID": 1015644,
"Guids": []
}
},
"GroupType": "SystemGroup",
"Keywords": "Updated Keywords",
"Notes": "Updated Notes",
"CreatedOn": "2021-05-21T18:38:39.313",
"CreatedBy": {
"Name": "user, demo",
"ArtifactID": 1029460,
"Guids": []
},
"LastModifiedBy": {
"Name": "user, demo",
"ArtifactID": 1029460,
"Guids": []
},
"LastModifiedOn": "2021-05-21T18:46:33.13",
"Meta": {
"Unsupported": [],
"ReadOnly": [
"GroupType"
]
},
"Actions": [
{
"Name": "Delete",
"IsAvailable": true,
"Reason": []
},
{
"Name": "Update",
"IsAvailable": true,
"Reason": []
},
{
"Name": "AddMembers",
"IsAvailable": true,
"Reason": []
},
{
"Name": "RemoveMembers",
"IsAvailable": true,
"Reason": []
}
],
"Name": "MyGroup",
"ArtifactID": 1029462,
"Guids": []
}
To delete a group, send a DELETE request with a URL in the following format:
1
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/{groupArtifactID}
The request body is empty.
When the group is successfully deleted, the response returns the status code of 200.
To add users to a group, send a POST request with a URL in the following format:
1
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/{groupArtifactID}/members
The body of a request contains the following fields:
1
2
3
4
5
6
{
"users": [
{ "ArtifactID": 1029457 },
{ "ArtifactID": 1029460 }
]
}
When the users are successfully added, the response returns the status code of 200.
To remove users from a group, send a DELETE request with a URL in the following format:
1
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/{groupArtifactID}/members
The body of a request contains the following fields:
1
2
3
4
5
6
{
"users": [
{ "ArtifactID": 1029457 },
{ "ArtifactID": 1029460 }
]
}
When the users are successfully deleted, the response returns the status code of 200.
The Group Manager service exposes multiple helper methods that you can use to query for information about users and clients.
To query the clients that can be assigned to a group, send a POST request with a URL in the following format:
1
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/eligible-clients/query
The request contains the following fields:
1
2
3
4
5
6
7
8
9
10
{
"request": {
"Fields": [
{"Name": "Name"}
],
"Condition": ""
},
"start": 1,
"length": 1000
}
The response contains the following fields:
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
{
"TotalCount": 3,
"Objects": [
{
"ArtifactID": 1006066,
"Values": [
"Relativity Template"
]
},
{
"ArtifactID": 1015644,
"Values": [
"Relativity"
]
},
{
"ArtifactID": 1017451,
"Values": [
"Sample Client"
]
}
],
"IDWindow": [],
"CurrentStartIndex": 1,
"ResultCount": 3,
"ObjectType": {
"ArtifactID": 1016169,
"Name": "Client",
"Guids": [],
"ArtifactTypeID": 5
},
"RankWindow": [],
"Fields": [
{
"FieldCategory": "Generic",
"FieldType": "FixedLengthText",
"ViewFieldID": 21,
"ArtifactID": 0,
"Guids": [],
"Name": "Name"
}
]
}
To query the users that can be added to a group, send a POST request with a URL in the following format:
1
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/{groupArtifactID}/eligible-members/query
The request contains the following fields:
1
2
3
4
5
6
7
8
9
10
{
"request": {
"Fields": [
{"Name": "Name"}
],
"Condition": ""
},
"start": 1,
"length": 1000
}
The response for this query contains the same fields as a response for a query on clients. See the descriptions in View field descriptions for a query response.
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
{
"TotalCount": 2,
"Objects": [
{
"ArtifactID": 1029457,
"Values": [
"user, test",
"testuser@mydomain.com"
]
},
{
"ArtifactID": 1029460,
"Values": [
"user, demo",
"user@mydomain.com"
]
}
],
"IDWindow": [],
"CurrentStartIndex": 1,
"ResultCount": 2,
"ObjectType": {
"ArtifactID": 1016184,
"Name": "User",
"Guids": [],
"ArtifactTypeID": 2
},
"RankWindow": [],
"Fields": [
{
"FieldCategory": "Generic",
"FieldType": "FixedLengthText",
"ViewFieldID": 0,
"ArtifactID": 0,
"Guids": [],
"Name": "Full Name"
},
{
"FieldCategory": "Generic",
"FieldType": "FixedLengthText",
"ViewFieldID": 37,
"ArtifactID": 0,
"Guids": [],
"Name": "E-mail Address"
}
]
}
To query for users that belong to a group, send a POST request with a URL in the following format:
1
<host>Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/{groupArtifactID}/query-members
The request contains the following fields:
1
2
3
4
5
6
7
8
9
10
11
{
"request": {
"Fields": [
{"Name": "Full Name"},
{"Name": "E-mail Address"}
],
"Condition": ""
},
"start": 1,
"length": 1000
}
The response contains the following fields:
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
{
"TotalCount": 2,
"Objects": [
{
"ArtifactID": 1029457,
"Values": [
"user, test",
"testuser@mydomain.com"
]
},
{
"ArtifactID": 1029460,
"Values": [
"user, demo",
"user@mydomain.com"
]
}
],
"IDWindow": [],
"CurrentStartIndex": 1,
"ResultCount": 2,
"ObjectType": {
"ArtifactID": 1016184,
"Name": "User",
"Guids": [],
"ArtifactTypeID": 2
},
"RankWindow": [],
"Fields": [
{
"FieldCategory": "Generic",
"FieldType": "FixedLengthText",
"ViewFieldID": 0,
"ArtifactID": 0,
"Guids": [],
"Name": "Full Name"
},
{
"FieldCategory": "Generic",
"FieldType": "FixedLengthText",
"ViewFieldID": 37,
"ArtifactID": 0,
"Guids": [],
"Name": "E-mail Address"
}
]
}
To query the groups that are assigned to a user, send a POST request with a URL in the following format:
1
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/query-by-user/{userID}
This query uses the same request and response fields as Query for group members.
You can use mass operations to add or remove multiple users to or from multiple groups in a single API call.
To add multiple users to multiple groups, send a POST request with a URL in the following format:
1
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/members
The body of a request contains the following fields:
1
2
3
4
5
6
7
8
9
{
"users": [
{ "ArtifactID": 1029457 },
{ "ArtifactID": 1029460 }
],
"groups": [
{ "ArtifactID": 1029462 }
]
}
The response contains an array of objects with the following fields:
1
2
3
4
5
6
7
8
[
{
"Succeeded": true,
"Name": "MyGroup",
"ArtifactID": 1029462,
"Guids": []
}
]
To remove multiple users from multiple groups, send a DELETE request with a URL in the following format:
1
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/groups/members
The body of a request contains the following fields:
1
2
3
4
5
6
7
8
9
{
"users": [
{ "ArtifactID": 1029457 },
{ "ArtifactID": 1029460 }
],
"groups": [
{ "ArtifactID": 1029462 }
]
}
The response contains an array of objects with the following fields:
1
2
3
4
5
6
7
8
[
{
"Succeeded": true,
"Name": "MyGroup",
"ArtifactID": 1029462,
"Guids": []
}
]
Why was this not helpful?
Check one that applies.
Thank you for your feedback.
Want to tell us more?
Great!
Additional Resources |
|||
DevHelp Community | GitHub | Release Notes | NuGet |