Field
A Field resource represents a Relativity workspace field. You can use the REST API to create, read, delete, and query Fields. You can also interact with object types through the Services API. For general information about fields, see the
This page contains the following information:
GET method
You can use the GET method to retrieve a single Field or a collection of all workspace Fields. You can find a general overview of this functionality in Retrieve resources and a detailed code sample in Create a simple .NET client.
Retrieve a collection of Fields
You can retrieve a collection of Fields with a GET method.
Sample URL
The URL indicates that you are retrieving a collection of Field resources. You don't need to provide a body with this GET request.
/Relativity.REST/Workspace/1014823/Field
Response
Retrieving a Field
When you retrieve a single Field, you must supply a unique identifier (such as a GUID or ArtifactID) for the resource.
Sample URL
The URL contains the identifier for a Field resource. You don't need to provide a body with a GET request.
/Relativity.REST/Workspace/1014823/Field/1035252
Response
POST method
You can use the POST method to perform complex queries or to create resources. For more information, see Perform queries and Create resources.
Query for a Field resource
You can set conditions used to query Fields.
Sample URL
/Relativity.REST/Workspace/1014823/Field/QueryResult
Request
This example queries for all multiple-choice fields (Field Type ID 8).
Response
Create a Field resource
You can create a Field with the POST method. For more information, see Create resources.
Sample URL
/Relativity.REST/Workspace/1014823/Field
Request
Click a field type in the following list to view sample JSON request.
Note: In addition to the required properties, you must also specify the workspace Artifact ID or GUID in the Parent Artifact property.
Response
The response contains the same fields for each field type. The following sample JSON illustrates the response for a newly created currency field:
{ "Results":[ { "StatusCode":201, "Success":true, "Message":"1043530 created successfully.", "ArtifactID":1043530, "ArtifactGuids":null, "__Location":"http://172.26.74.252/Relativity.REST/Workspace/1017662/Field/1043530" } ], "Message":"Creation succeeded.", "ErroredResultCount":0, "TotalResultCount":1 }
DELETE method
You can use the Delete method to remove a Field from the workspace. You don't need to provide a body with a DELETE request.
Sample URL
/Relativity.Rest/Workspace/1014823/Field/1038911