

Last date modified: June 17 2025
In Relativity, a workspace acts as a secure data repository for documents. It supports customized views, layouts, fields, choices, and security settings. For more information, see Workspaces on the Relativity
The Workspace Manager API supports the following functionality:
As a sample use case, you can simplify setting up reviews by using the Workspace Manager API to programmatically create multiple workspaces rather than manually adding them through the Relativity UI.
You can also use the Workspace Manager API through REST. For more information, see Workspace Manager service.
The Workspace Manager API contains the following methods and classes as described in this section.
The Workspace Manager API exposes the following methods on the IWorkspaceManager interface in the Relativity.Environment.<VersionNumber>.Workspace namespace.
The <VersionNumber> variable in the namespace indicates the version number of the API. The version number uses the format uppercase V and an integer version number, such as V1 or V2 in .NET.
The Workspace Manager API exposes the following classes available in the Relativity.Environment.<VersionNumber>.Workspace.Models namespace:
WorkspaceSummary class - represents the statistics for a workspace.
Review the following guidelines for working with the Workspace Manager API.
The NuGet package called Relativity.Environment.SDK is required to use the endpoints exposed in the Workspace Manager API. For more information, see SDK and Nuget Compatibility.
You must use a proxy to interact with the Workspace Manager API. To set up a proxy, call the CreateProxy() method on the object returned by the GetServiceManager() method.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var userEmail = "user@test.com"; // User login
var password = "abc123456!"; // User password
Uri relativityServicesUri = new Uri("http://localhost/relativity.services");
Uri relativityRestUri = new Uri("http://localhost/relativity.rest/api");
var usernamePasswordCredentials = new UsernamePasswordCredentials(userEmail, password);
ServiceFactorySettings settings = new ServiceFactorySettings(
relativityServicesUri,
relativityRestUri,
usernamePasswordCredentials);
ServiceFactory serviceFactory = new ServiceFactory(settings);
IWorkspaceManager workspaceManager = serviceFactory.CreateProxy<IWorkspaceManager>();
Review the following information about how field permissions are used by Workspace Manager API:
Secured fields - A user interacting with the Workspace Manager API may be given access to read and write to only select fields in the workspace. You can control this access by using the Securable<T> object types. Objects of this type have the following properties: Secured (bool) and Value (T). When the Secured property is set to true, the user doesn't have read or write access to the contents of the fields set for the Value property.
This table illustrates the permissions set on each field by operation. For general information, see Instance security and Workspace security on the Relativity
Field | Create | Update | Read |
---|---|---|---|
Matter | View permissions set on the Matter object at the instance level. | Same as create. | Same as create. |
ClientNumber | N/A | N/A | View permissions set on the Client object at the instance level. |
ProductionRestrictions | N/A | View permissions set on the Search object at the workspace level. | View permissions set on the Search object at the workspace level. |
ResourcePool | View permissions set on the Resource Pool object at the instance level. | Same as create. | Same as create. |
DefaultFileRepository | View permissions set on the Resource Server object at the instance level. | Same as create. | Same as create. |
DataGridFileRepository | View permissions set on the Resource Server object at the instance level. | Same as create. | Same as create. |
DefaultCacheLocation | View permissions set on the Resource Server object at the instance level. | Same as create. | Same as create. |
SqlServer | View permissions set on the Resource Server object at the instance level. | Same as create. | Same as create. |
AzureCredentials | View permissions set on the Credential object at the instance level. | Same as create. | Same as create. |
AzureFileSystemCredentials | View permissions set on the Credential object at the instance level. | Same as create. | Same as create. |
UseCase | N/A | N/A | View permissions set on the Workspace object at the instance level. |
Template | View permissions set on the Workspace object at the instance level. | N/A | N/A |
WorkspaceAdminGroup | View permissions set on the Credential object at the instance level. | N/A | Same as create. |
The Workspace Manager API provides overloaded methods for create, update, and query operations, which support cancellation and progress functionality. For more information, see Cancellation and progress.
Use the CreateAsync() method to add a new workspace to Relativity. This method takes a WorkspaceRequest object and returns a WorkspaceResponse object. All WorkspaceRequest properties related to the infrastructure details (DownloadHandlerUrl, Resource Pool, DefaultFileRepository, DataGridFileRepository, DefaultCacheLocation, SqlServer) are optional. If the infrastructure details are not explicitly specified in the request, they are automatically selected by the algorithm.
To use this endpoint, the caller must have the following:
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
public async Task CreateWorkspaceAsync(
string name,
int matterID,
int templateID,
int statusID,
int resourcePoolID,
int sqlServerID,
int defaultFileRepositoryID,
int dataGridFileRepositoryID,
int defaultCacheLocationId)
{
try
{
string downloadHandlerUrl = await _workspaceManager.GetDefaultDownloadHandlerURLAsync();
WorkspaceRequest request = new WorkspaceRequest()
{
Name = name,
Matter = new Securable<ObjectIdentifier>(new ObjectIdentifier() {ArtifactID = matterID}),
Template = new Securable<ObjectIdentifier>(new ObjectIdentifier() {ArtifactID = templateID}),
Status = new ObjectIdentifier() {ArtifactID = statusID},
ResourcePool =
new Securable<ObjectIdentifier>(new ObjectIdentifier() {ArtifactID = resourcePoolID}),
SqlServer = new Securable<ObjectIdentifier>(new ObjectIdentifier() {ArtifactID = sqlServerID}),
DefaultFileRepository = new Securable<ObjectIdentifier>(new ObjectIdentifier()
{ArtifactID = defaultFileRepositoryID}),
DataGridFileRepository = new Securable<ObjectIdentifier>(new ObjectIdentifier()
{ArtifactID = dataGridFileRepositoryID}),
DefaultCacheLocation = new Securable<ObjectIdentifier>(new ObjectIdentifier()
{ArtifactID = defaultCacheLocationId}),
DownloadHandlerUrl = downloadHandlerUrl
};
WorkspaceResponse response = await _workspaceManager.CreateAsync(request);
Console.WriteLine($"Created workspace with artifact ID {response.ArtifactID} on {response.CreatedOn}");
}
catch (InvalidInputException ex)
{
Console.WriteLine("The following validation errors were found:");
foreach (ValidationError error in ex.Errors)
{
Console.WriteLine($"\t{error.PropertyName}: {error.ErrorMessage}");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to create workspace: {ex.Message}");
throw;
}
}
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
public async Task CreateWorkspaceAsync(string name, int matterID, int templateID, int statusID)
{
try
{
WorkspaceRequest request = new WorkspaceRequest()
{
Name = name,
Matter = new Securable<ObjectIdentifier>(new ObjectIdentifier() {ArtifactID = matterID}),
Template = new Securable<ObjectIdentifier>(new ObjectIdentifier() {ArtifactID = templateID}),
Status = new ObjectIdentifier() {ArtifactID = statusID}
};
WorkspaceResponse response = await _workspaceManager.CreateAsync(request);
Console.WriteLine($"Created workspace with artifact ID {response.ArtifactID} on {response.CreatedOn}");
}
catch (InvalidInputException ex)
{
Console.WriteLine("The following validation errors were found:");
foreach (ValidationError error in ex.Errors)
{
Console.WriteLine($"\t{error.PropertyName}: {error.ErrorMessage}");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to create workspace: {ex.Message}");
throw;
}
}
The following helper methods provide functionality to support the create operation.
Use the GetMetaAsync() method to retrieve a list of unsupported WorkspaceRequest fields for a create operation.
To use this endpoint, the caller must have the following:
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
public async Task GetMetaAsync()
{
try
{
Meta meta = await _workspaceManager.GetMetaAsync();
if (meta.ReadOnly.Any())
{
Console.WriteLine($"The following fields are read-only: {string.Join(", ", meta.ReadOnly)}");
}
else
{
Console.WriteLine("No fields are read-only.");
}
if (meta.Unsupported.Any())
{
Console.WriteLine($"The following fields are unsupported: {string.Join(", ", meta.Unsupported)}");
}
else
{
Console.WriteLine("No fields are unsupported.");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to get meta: {ex.Message}");
throw;
}
}
Use the RetryFailedCreateEventHandlersAsync() method to retry failed create event handlers for a workspace. This method takes the Artifact ID of the workspace as an argument.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
public async Task RetryFailedCreateEventHandlersAsync(int workspaceID)
{
try
{
await _workspaceManager.RetryFailedCreateEventHandlersAsync(workspaceID);
}
catch (Exception ex)
{
Console.WriteLine($"Failed to retry failed create event handlers: {ex.Message}");
throw;
}
}
Use the ReadAsync() method to retrieve a workspace. This method takes the Artifact ID of a workspace and returns a WorkspaceResponse object.
To use this endpoint, the caller must have the following:
This permission is required for the admin-level context workspace. Use -1 to indicate the admin-level context.
1
2
3
4
5
6
7
8
9
10
11
12
13
public async Task ReadWorkspaceAsync(int workspaceID, bool includeMetadata, bool includeActions)
{
try
{
WorkspaceResponse response = await _workspaceManager.ReadAsync(workspaceID, includeMetadata, includeActions);
Console.WriteLine($"Workspace {workspaceID} has the name {response.Name}");
}
catch (Exception ex)
{
Console.WriteLine($"Failed to read workspace {workspaceID}: {ex.Message}");
throw;
}
}
Use the UpdateAsync() method to modify the properties of a workspace. This method takes the Artifact ID of the workspace and a WorkspaceRequest object. It returns a WorkspaceResponse object.
To use this endpoint, the caller must have the following:
To update the WorkspaceAdminGroup or Matter properties, the calling user must be a system admin or client domain admin. The admin workspace can't be updated. It resides in the admin level context indicated by -1.
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
public async Task UpdateWorkspaceAsync(int workspaceID)
{
try
{
WorkspaceResponse originalWorkspace = await _workspaceManager.ReadAsync(workspaceID, true, true);
WorkspaceRequest request = new WorkspaceRequest()
{
Name = "Updated Workspace",
Matter = new Securable<ObjectIdentifier>() { Value = originalWorkspace.Matter.Value },
Status = originalWorkspace.Status,
ResourcePool = new Securable<ObjectIdentifier>() { Value = originalWorkspace.ResourcePool.Value },
SqlServer = new Securable<ObjectIdentifier>() { Value = originalWorkspace.SqlServer.Value },
DefaultFileRepository = new Securable<ObjectIdentifier>() { Value = originalWorkspace.DefaultFileRepository.Value },
DefaultCacheLocation = new Securable<ObjectIdentifier>() { Value = originalWorkspace.DefaultCacheLocation.Value },
DownloadHandlerUrl = originalWorkspace.DownloadHandlerUrl
};
WorkspaceResponse response = await _workspaceManager.UpdateAsync(workspaceID, request);
Console.WriteLine($"Updated workspace with artifact ID {workspaceID} on {response.LastModifiedOn}");
}
catch (InvalidInputException ex)
{
Console.WriteLine("The following validation errors were found:");
foreach (ValidationError error in ex.Errors)
{
Console.WriteLine($"\t{error.PropertyName}: {error.ErrorMessage}");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to update workspace: {ex.Message}");
throw;
}
}
Use the DeleteAsync() method to remove a workspace from Relativity. This method takes the Artifact ID of the workspace.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public async Task DeleteWorkspaceAsync(int workspaceId)
{
try
{
await _workspaceManager.DeleteAsync(workspaceId);
}
catch (InvalidInputException ex)
{
Console.WriteLine("The following validation errors were found:");
foreach (ValidationError error in ex.Errors)
{
Console.WriteLine($"\t{error.PropertyName}: {error.ErrorMessage}");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to update workspace: {ex.Message}");
throw;
}
}
Use the GetWorkspaceSummaryAsync() method to retrieve a summary of workspace statistics. This method takes the Artifact ID of the workspace as an argument and returns a WorkspaceSummary object.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
public async Task GetWorkspaceSummaryAsync(int workspaceID)
{
try
{
WorkspaceSummary workspaceSummary = await _workspaceManager.GetWorkspaceSummaryAsync(workspaceID);
Console.WriteLine($"Document Count: {workspaceSummary.DocumentCount}");
Console.WriteLine($"File Size: {workspaceSummary.FileSize}");
}
catch (Exception ex)
{
Console.WriteLine($"Failed to get workspace summary: {ex.Message}");
throw;
}
}
Use the QueryWorkspaceByGroupAsync() method to retrieve workspaces associated with a group. This method takes a QueryRequest object, a start index, the number of groups to include in the results, and the Artifact ID of a group. It returns a QueryResultSlim object. For more information about QueryResultSlim objects, see Query for Relativity objects.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public async Task QueryWorkspaceByGroupAsync(int groupID)
{
try
{
QueryRequest workspacesRequest = new QueryRequest();
QueryResultSlim workspacesResponse = await _workspaceManager.QueryWorkspaceByGroupAsync(workspacesRequest, 1, _QUERY_LENGTH, groupID);
foreach (int workspaceID in workspacesResponse.Objects.Select(x => x.ArtifactID))
{
Console.WriteLine($"Workspace {workspaceID} is part of group {groupID}");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to query workspaces: {ex.Message}");
throw;
}
}
The following helper methods correspond to the fields that you can set in the Resource Information section of the Workspace form in the Relativity UI. For more information, see Workspaces on the Relativity
Use the QueryEligibleMattersAsync() method to retrieve a list of matters. This method takes a QueryRequest object, a start index, and the number of matters to include in the results. It returns a QueryResultSlim object with a list of available matters. Use this method when setting the Matter property on a workspace. For more information about QueryResultSlim objects, see Query for Relativity objects.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public async Task QueryEligibleMattersAsync()
{
try
{
QueryRequest mattersRequest = new QueryRequest();
QueryResultSlim mattersResponse = await _workspaceManager.QueryEligibleMattersAsync(mattersRequest, 1, _QUERY_LENGTH);
Console.WriteLine("Eligible Matters:");
foreach (int matterID in mattersResponse.Objects.Select(x => x.ArtifactID))
{
Console.WriteLine(matterID);
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to query eligible matters: {ex.Message}");
throw;
}
}
Use the QueryEligibleClientsAsync() method to retrieve a list of clients available for this workspace. This method takes a QueryRequest object, a start index, and the number of clients to include in the results. It returns a QueryResultSlim object with a list of available clients. Use this method when setting the Client property on a workspace. For more information about QueryResultSlim objects, see Query for Relativity objects.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public async Task QueryEligibleClientsAsync()
{
try
{
QueryRequest clientsRequest = new QueryRequest();
QueryResultSlim clientsResponse = await _workspaceManager.QueryEligibleClientsAsync(clientsRequest, 1, _QUERY_LENGTH);
Console.WriteLine("Eligible Clients:");
foreach (int clientID in clientsResponse.Objects.Select(x => x.ArtifactID))
{
Console.WriteLine(clientID);
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to query eligible clients: {ex.Message}");
throw;
}
}
Use the QueryEligibleTemplatesAsync() method to retrieve a list of workspaces for use as templates when creating a new workspace. This method takes a QueryRequest object, a start index, and the number of templates to include in the results. It returns a QueryResultSlim object with a list of available templates. Use this method when setting the Template property on a workspace. For more information about QueryResultSlim objects, see Query for Relativity objects.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public async Task QueryEligibleTemplatesAsync()
{
try
{
QueryRequest templatesRequest = new QueryRequest();
QueryResultSlim templatesResponse = await _workspaceManager.QueryEligibleTemplatesAsync(templatesRequest, 1, _QUERY_LENGTH);
Console.WriteLine("Eligible Templates:");
foreach (int templateID in templatesResponse.Objects.Select(x => x.ArtifactID))
{
Console.WriteLine(templateID);
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to query eligible templates: {ex.Message}");
throw;
}
}
Use the GetEligibleResourcePoolsAsync() method to retrieve a list of resource pools. This method returns a list of DisplayableObjectIdentifier objects, which identify available resource pools. Use this method when setting the ResourcePool property for a workspace.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public async Task GetEligibleResourcePoolsAsync()
{
try
{
List<DisplayableObjectIdentifier> resourcePools = await _workspaceManager.GetEligibleResourcePoolsAsync();
Console.WriteLine("Eligible Resource Pools:");
foreach (DisplayableObjectIdentifier resourcePool in resourcePools)
{
Console.WriteLine($"\t{resourcePool.Name} ({resourcePool.ArtifactID})");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to query eligible resource pools: {ex.Message}");
throw;
}
}
Use the GetEligibleSqlServersAsync() method to retrieve a list of SQL servers available for the workspace. This method takes the Artifact ID of a resource pool and returns a list of DisplayableObjectIdentifier objects, which identify available SQL servers. Use this method when setting the SqlServer property for a workspace.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public async Task GetEligibleSqlServersAsync(int resourcePoolID)
{
try
{
List<DisplayableObjectIdentifier> sqlServers = await _workspaceManager.GetEligibleSqlServersAsync(resourcePoolID);
Console.WriteLine("Eligible SQL Servers:");
foreach (DisplayableObjectIdentifier sqlServer in sqlServers)
{
Console.WriteLine($"\t{sqlServer.Name} ({sqlServer.ArtifactID})");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to query eligible SQL servers: {ex.Message}");
throw;
}
}
Use the GetEligibleFileRepositoriesAsync() method to retrieve a list of available file repository servers. This method takes the Artifact ID of a resource pool and returns a list of DisplayableObjectIdentifier objects, which identify available servers. Use this method when setting the DefaultFileRepository and DataGridRepository properties for a workspace.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public async Task GetEligibleFileRepositoriesAsync(int resourcePoolID)
{
try
{
List<DisplayableObjectIdentifier> fileRepositories = await _workspaceManager.GetEligibleFileRepositoriesAsync(resourcePoolID);
Console.WriteLine("Eligible File Repositories:");
foreach (DisplayableObjectIdentifier fileRepository in fileRepositories)
{
Console.WriteLine($"\t{fileRepository.Name} ({fileRepository.ArtifactID})");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to query eligible file repositories: {ex.Message}");
throw;
}
}
Use the GetEligibleCacheLocationsAsync() method to retrieve a list of available cache location servers. This method takes the Artifact ID of a resource pool and returns a list of DisplayableObjectIdentifier objects, which identify available cache locations. Use this method when setting the DefaultCacheLocation property for a workspace.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public async Task GetEligibleCacheLocationsAsync(int resourcePoolID)
{
try
{
List<DisplayableObjectIdentifier> cacheLocations = await _workspaceManager.GetEligibleCacheLocationsAsync(resourcePoolID);
Console.WriteLine("Eligible Cache Locations:");
foreach (DisplayableObjectIdentifier cacheLocation in cacheLocations)
{
Console.WriteLine($"\t{cacheLocation.Name} ({cacheLocation.ArtifactID})");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to query eligible cache locations: {ex.Message}");
throw;
}
}
Use the GetDefaultDownloadHandlerURLAsync() method to retrieve the URL for the default download handler. This method returns a URL.
This endpoint doesn't require any specific permissions.
1
2
3
4
5
6
7
8
9
10
11
12
13
public async Task GetDefaultDownloadHandlerURLAsync()
{
try
{
string downloadHandlerUrl = await _workspaceManager.GetDefaultDownloadHandlerURLAsync();
Console.WriteLine($"The default download handler URL is {downloadHandlerUrl}");
}
catch (Exception ex)
{
Console.WriteLine($"Failed to get download handler URL: {ex.Message}");
throw;
}
}
The following helper methods correspond to the fields that you can set in the Advanced settings section of the Workspace form in the Relativity UI. For more information, see Workspaces on the Relativity
Use the GetEligibleStatusesAsync() method to retrieve a list of available statuses for a workspace. This method returns a list of DisplayableObjectIdentifier objects, which contain the Artifact ID, Name, and GUIDs identifying each status. Use this method when setting the Status property on a workspace.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public async Task GetEligibleStatusesAsync()
{
try
{
List<DisplayableObjectIdentifier> statuses = await _workspaceManager.GetEligibleStatusesAsync();
Console.WriteLine("Eligible Statuses:");
foreach (DisplayableObjectIdentifier status in statuses)
{
Console.WriteLine($"{status.Name} ({status.ArtifactID})");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to get eligible statuses: {ex.Message}");
throw;
}
}
Use the GetEligibleSqlFullTextLanguagesAsync() method to retrieve a list of available full text languages for the SQL Server assigned to a workspace. This method returns a list of SqlFullTextLanguageOptions objects, which describe the available and default languages. Use this method when setting the SqlFullTextLanguage property on a workspace.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public async Task GetEligibleSqlFullTextLanguagesAsync()
{
try
{
SqlFullTextLanguageOptions sqlFullTextLanguageOptions = await _workspaceManager.GetEligibleSqlFullTextLanguagesAsync();
Console.WriteLine("Eligible SQL Full Text Languages:");
foreach (NameIDPair language in sqlFullTextLanguageOptions.Languages)
{
Console.WriteLine($"{language.Name} ({language.ID})");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to get eligible SQL full text languages: {ex.Message}");
throw;
}
}
Use the QueryEligibleGroupsAsync() method to retrieve a list of groups available for workspace membership. This method takes a QueryRequest object, a start index, and the number of groups to include in the results. It returns a QueryResultSlim object with a list of available groups. For more information about QueryResultSlim objects, see Query for Relativity objects.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public async Task QueryEligibleGroupsAsync()
{
try
{
QueryRequest groupsRequest = new QueryRequest();
QueryResultSlim groupsResponse = await _workspaceManager.QueryEligibleGroupsAsync(groupsRequest, 1, _QUERY_LENGTH);
Console.WriteLine("Eligible Groups:");
foreach (int groupID in groupsResponse.Objects.Select(x => x.ArtifactID))
{
Console.WriteLine(groupID);
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to query eligible groups: {ex.Message}");
throw;
}
}
Use the QueryEligibleSavedSearchesAsync() method to retrieve saved searches for use with production restrictions. For more information, see Adding and editing production restrictions on the Relativity
This method takes a QueryRequest object, a start index, and the number of saved searches to include in the results. It returns a QueryResultSlim object with a list of available saved searches. Use this method when setting the ProductionRestrictions property on a workspace. For more information about QueryResultSlim objects, see Query for Relativity objects.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public async Task QueryEligibleSavedSearchesAsync(int workspaceID)
{
try
{
QueryRequest savedSearchRequest = new QueryRequest();
QueryResultSlim savedSearchResponse = await _workspaceManager.QueryEligibleSavedSearchesAsync(savedSearchRequest, 1, _QUERY_LENGTH, workspaceID);
Console.WriteLine("Eligible Saved Searches:");
foreach (int savedSearchID in savedSearchResponse.Objects.Select(x => x.ArtifactID))
{
Console.WriteLine(savedSearchID);
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to query eligible saved searches: {ex.Message}");
throw;
}
}
Use the following methods to retrieve Azure credentials associated with a resource pool. For more information, see Workspaces on the Relativity
Use the GetEligibleAzureCredentialsAsync() method to retrieve a list of available Azure credentials for the workspace. This method takes the Artifact ID of a resource pool and returns a list of DisplayableObjectIdentifier objects, which identify available credentials. Use this method when setting the AzureCredentials property on a workspace.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public async Task GetEligibleAzureCredentialsAsync(int resourcePoolID)
{
try
{
List<DisplayableObjectIdentifier> azureCredentials = await _workspaceManager.GetEligibleAzureCredentialsAsync(resourcePoolID);
Console.WriteLine("Eligible Azure Credentials:");
foreach (DisplayableObjectIdentifier azureCredential in azureCredentials)
{
Console.WriteLine($"\t{azureCredential.Name} ({azureCredential.ArtifactID})");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to query eligible Azure credentials: {ex.Message}");
throw;
}
}
Use the GetEligibleAzureFileSystemCredentialsAsync() method to retrieve a list of available Azure file system credentials. This method takes the Artifact ID of a resource pool and returns a list of DisplayableObjectIdentifier objects, which identify available credentials. Use this method when setting the AzureFileSystemCredentials property on a workspace.
To use this endpoint, the caller must have the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public async Task GetEligibleAzureFileSystemCredentialsAsync(int resourcePoolID)
{
try
{
List<DisplayableObjectIdentifier> azureFileSystemCredentials = await _workspaceManager.GetEligibleAzureFileSystemCredentialsAsync(resourcePoolID);
Console.WriteLine("Eligible Azure File System Credentials:");
foreach (DisplayableObjectIdentifier azureFileSystemCredential in azureFileSystemCredentials)
{
Console.WriteLine($"\t{azureFileSystemCredential.Name} ({azureFileSystemCredential.ArtifactID})");
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to query eligible Azure file system credentials: {ex.Message}");
throw;
}
}
On this page
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 |