Choice Manager service
The Relativity REST API supports operations with the Choice objects though the Choice Manager service. The operations available through the service are equivalent to the asynchronous methods for interacting with the Choice objects in the Relativity Services API. For more information, see Choice in the Services API documentation.
This page contains the following information:
- Sample URL
- Create
- Read
- Update
- Delete
- Sort
- Move a choice
- Get available parents list
- Get available colors list
Sample URL
The following is the base URL for sending a request to the Choice Manager service by making a call to an endpoint with the required HTTP method.
<host>/Relativity.Rest/API/Relativity.Choices/workspace/{workspaceID}/
The following is a sample URL for sending a request to the Choice Manager service. Set the workspaceID variable to the Artifact ID of the workspace where you want to add a new choice.
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/
Create
Send a POST request to the Choice Manager service URL to create a Choice:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/
The following is a sample URL for sending a POST request to the Choice Manager service. Set the workspaceID variable to the Artifact ID of the workspace where you want to add a new choice. Mandatory fields in the request: Field, Name, and Color.
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/
The response is an Artifact ID of the created Choice. A status code of 200 is also returned when the request is successful.
Send a POST request to the Choice Manager service URL to mass create Choices:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/
Read
You can retrieve basic or extended metadata for a choice. Extended metadata includes operations that you have permissions to perform on the choice, such as delete or update. Send a GET request to the Choice Manager service URL to retrieve basic metadata:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/{choiceID}|{ChoiceGUID}
Set the workspaceID and the choiceID variable to the Artifact ID of the choice. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/1015348
Set the workspaceID and the ChoiceGUID variable to the Artifact ID of the choice. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/56D5E0CD-194D-4679-9CB4-995A697429BF
Send a GET request to the Choice Manager service URL to retrieve extended metadata:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/{choiceID}|{ChoiceGUID}/{includeMetadata}/{includeActions}
Set the workspaceID and choiceID | ChoiceGUID variables, and then set both the includeMetadata and includeActions variables to true. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/56D5E0CD-194D-4679-9CB4-995A697429BF/true/true
Update
Send a PUT request to the Choice Manager service URL to update a Choice:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/{choiceID}|{ChoiceGUID}
The following is a sample URL for sending a PUT request to the Choice Manager service. Set the workspaceID and the choiceID variable to the Artifact ID of the choice.
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/1015348
Set the workspaceID and the ChoiceGUID variable to the Artifact ID of the choice. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/56D5E0CD-194D-4679-9CB4-995A697429BF
The response is a status code of 200 when the request is successful.
Send a PUT request to the Choice Manager service URL to mass update Choices:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/
Set the workspaceID variable to the Artifact ID of the choice. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/
Delete
Send a DELETE request to the Choice Manager service URL to delete a Choice:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/{choiceID}|{ChoiceGUID}
Set the workspaceID and the choiceID variable to the Artifact ID of the choice. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/1015348
Set the workspaceID and the ChoiceGUID variable to the Artifact ID of the choice. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/56D5E0CD-194D-4679-9CB4-995A697429BF
The response is a status code of 200 when the request is successful.
Send a DELETE request to the Choice Manager service URL to mass delete Choices:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/
Set the workspaceID variable to the Artifact ID of the choice. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/
The response is a status code of 200 when the request is successful.
Sort
Send a PUT request to the Choice Manager service URL to sort Choices:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/sort
Set the workspaceID variable to the Artifact ID of the choice. Use "SortType" 0 for ascending sort and 1 for descending sort. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/sort
Move a choice
Send a PUT request to the Choice Manager service URL to move Choices:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/move
Set the workspaceID variable to the Artifact ID of the choice. Use "moveListTo" 0 to move a choice to the beginning and 1 to move a choice to the end. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/move
Retrieve a list of available parents
Send a GET request to the Choice Manager service URL to retrieve a list of available parents for a specific choice:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/{choiceID}|{ChoiceGUID}/parents
Set the workspaceID and the choiceID variable to the Artifact ID of the choice. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/1015348/parents
Set the workspaceID and the ChoiceGUID variable to the Artifact ID of the choice. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/56D5E0CD-194D-4679-9CB4-995A697429BF/parents
Send a POST request to the Choice Manager service URL to retrieve a list of available parents for a specific field:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/parents
Set the workspaceID variable. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/parents
Retrieve a list of available colors
Send a GET request to the Choice Manager service URL to retrieve a list of available parents for a specific choice:
<host>/Relativity.rest/api/Relativity.Choices/workspace/{WorkspaceID}/choice/colors
Set the workspaceID variable. See the following sample URL:
<host>/Relativity.Rest/API/Relativity.Choices/workspace/1021354/choice/colors