

Last date modified: April 15 2025
In Relativity, a layout is a web-based coding form that you can use to view and edit document and other fields. For general information, see Layouts on the Relativity Documentation site.
The Layout Manager service exposes CRUD endpoints that you can use to programmatically manipulate layouts in your Relativity environment. In addition to the CRUD endpoints, this API includes a helper endpoint used to retrieve a list of users with permissions necessary to own layouts.
Sample use cases for the Layout Manager service include:
You can also use the Layout Manager service through .NET. For more information, see Layout Manager (.NET).
Review the following guidelines for working with this 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 layout:
1
<host>/Relativity.Rest/API/relativity-data-visualization/{versionNumber}/workspaces/{Workspace ID}/layouts/{Layout Artifact ID}
Set the path parameters as follows:
To use the Layout Manager service, send requests by making calls with the required HTTP methods. You can use the following .NET code as a sample client for creating a layout.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public async Task<LayoutResponse> CreateLayoutAsync()
{
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-CSRF-Header", "-");
client.DefaultRequestHeaders.Add("Authorization", "Basic " + Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes("test@test.com:SomePassword")));
client.DefaultRequestHeaders.Add("X-Kepler-Version", "2.0");
client.BaseAddress = new Uri("http://localhost/");
string inputJSON = "{ \"layoutRequest\": { \"ObjectType\": { \"Secured\": false, \"Value\": { \"Name\": \"TestObjectType\", \"ArtifactTypeID\": 10463412, \"ArtifactID\": 1035231, \"Guids\": [] } }, \"Order\": \"1\", \"OverwriteProtection\": true, \"AllowCopyFromPrevious\": false, \"RelativityApplications\": [], \"Keywords\": \"\", \"Notes\": \"\", \"Owner\": { \"Name\": \"Public\", \"ArtifactID\": 0, \"Guids\": [] }, \"Name\": \"Test Layout\" } }";
string url = "/Relativity.Rest/API/relativity-data-visualization/V1/workspaces/-1/layouts";
HttpResponseMessage response = await client.PostAsync(url, new StringContent(inputJSON, Encoding.UTF8, "application/json"));
response.EnsureSuccessStatusCode();
string content = await response.Content.ReadAsStringAsync();
return JsonConvert.DeserializeObject<LayoutResponse>(content);
}
}
To create a single layout, send a POST request with a URL in the following format:
1
<host>/Relativity.Rest/API/relativity-data-visualization/{versionNumber}/workspaces/{Workspace ID}/layouts
The body of the request must contain a layoutRequest field, which represents a request for creating a layout. It 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
{
"layoutRequest": {
"ObjectType": {
"Secured": false,
"Value": {
"Name": "TestObjectType",
"ArtifactTypeID": 1036342,
"ArtifactID": 1035231,
"Guids": []
}
},
"Order": "1",
"OverwriteProtection": true,
"AllowCopyFromPrevious": false,
"RelativityApplications": [],
"Keywords": "",
"Notes": "",
"Owner": {
"Name": "Public",
"ArtifactID": 0,
"Guids": []
},
"Name": "TestLayout"
}
}
This endpoint returns a LayoutResponse object that represents the newly created layout. It 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
"ObjectType": {
"Secured": false,
"Value": {
"Name": "Document",
"ArtifactTypeID": 10,
"ArtifactID": 1035231,
"Guids": []
}
},
"Order": "1",
"OverwriteProtection": true,
"AllowCopyFromPrevious": false,
"RelativityApplications": {
"HasSecuredItems": false,
"ViewableItems": []
},
"CreatedOn": "2020-05-07T19:12:41.13",
"CreatedBy": {
"Name": "User2, Test",
"ArtifactID": 777,
"Guids": []
},
"LastModifiedBy": {
"Name": "User1, Test",
"ArtifactID": 9,
"Guids": []
},
"LastModifiedOn": "2020-08-05T20:19:08.67",
"Keywords": "",
"Notes": "",
"Meta": {
"Unsupported": [],
"ReadOnly": [
"Object Type"
]
},
"Actions": [
{
"Name": "Delete",
"Href": "relativity-data-visualization/{versionNumber}/workspace/1018025/layouts/1036363",
"Verb": "DELETE",
"IsAvailable": true,
"Reason": []
},
{
"Name": "Update",
"Href": "relativity-data-visualization/{versionNumber}/workspace/1018025/layouts/1036363",
"Verb": "PUT",
"IsAvailable": true,
"Reason": []
}
],
"Owner": {
"Name": "Public",
"ArtifactID": 0,
"Guids": []
},
"Name": "Document Metadata",
"ArtifactID": 1036363,
"Guids": []
}
You can retrieve basic metadata for a layout or extended metadata, which also includes operations that a user has permissions to perform on the layout.
1
<host>/Relativity.Rest/API/relativity-data-visualization/{versionNumber}/workspaces/{Workspace ID}/layouts/{Layout Artifact ID}
1
<host>/Relativity.Rest/API/relativity-data-visualization/{versionNumber}/workspaces/{Workspace ID}/layouts/{Layout Artifact ID}/true/true
The response for a read operation contains the same fields as those for a create response. See the field descriptions for the response in Create a layout.
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
{
"ObjectType": {
"Secured": false,
"Value": {
"Name": "Document",
"ArtifactTypeID": 10,
"ArtifactID": 1035231,
"Guids": []
}
},
"Order": "1",
"OverwriteProtection": true,
"AllowCopyFromPrevious": false,
"RelativityApplications": {
"HasSecuredItems": false,
"ViewableItems": []
},
"CreatedOn": "2020-05-07T19:12:41.13",
"CreatedBy": {
"Name": "User1, Test",
"ArtifactID": 777,
"Guids": []
},
"LastModifiedBy": {
"Name": "User2, Test",
"ArtifactID": 9,
"Guids": []
},
"LastModifiedOn": "2020-08-05T20:19:08.67",
"Keywords": "",
"Notes": "",
"Meta": {
"Unsupported": [],
"ReadOnly": [
"Object Type"
]
},
"Actions": [
{
"Name": "Delete",
"Href": "relativity-data-visualization/V1/workspace/1018025/layouts/1036363",
"Verb": "DELETE",
"IsAvailable": true,
"Reason": []
},
{
"Name": "Update",
"Href": "relativity-data-visualization/V1/workspace/1018025/layouts/1036363",
"Verb": "PUT",
"IsAvailable": true,
"Reason": []
}
],
"Owner": {
"Name": "Public",
"ArtifactID": 0,
"Guids": []
},
"Name": "Document Metadata",
"ArtifactID": 1036363,
"Guids": []
}
To update properties of a layout, send a PUT request with a URL in the following format:
1
<host>/Relativity.Rest/API/relativity-data-visualization/{versionNumber}/workspaces/{Workspace ID}/layouts/{Layout Artifact ID}
The body of the request must contain a layoutRequest field, which represents a request for updating a layout. It 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
{
"layoutRequest": {
"ObjectType": {
"Secured": false,
"Value": {
"Name": "TestObjectType",
"ArtifactTypeID": 1036342,
"ArtifactID": 1035231,
"Guids": []
}
},
"Order": "1",
"OverwriteProtection": true,
"AllowCopyFromPrevious": false,
"RelativityApplications": [],
"Keywords": "",
"Notes": "",
"Owner": {
"Name": "Public",
"ArtifactID": 0,
"Guids": []
},
"Name": "TestLayout"
},
"lastModifiedOn": "2020-05-07T19:30:41.13"
}
The response for an update operation contains the same fields as those for a create response. See the field descriptions for the response in Create a layout.
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
{
"ObjectType": {
"Secured": false,
"Value": {
"Name": "Document",
"ArtifactTypeID": 10,
"ArtifactID": 1035231,
"Guids": []
}
},
"Order": "1",
"OverwriteProtection": true,
"AllowCopyFromPrevious": false,
"RelativityApplications": {
"HasSecuredItems": false,
"ViewableItems": []
},
"CreatedOn": "2020-05-07T19:12:41.13",
"CreatedBy": {
"Name": "User2, Test",
"ArtifactID": 777,
"Guids": []
},
"LastModifiedBy": {
"Name": "User1, Test",
"ArtifactID": 9,
"Guids": []
},
"LastModifiedOn": "2020-08-05T20:19:08.67",
"Keywords": "",
"Notes": "",
"Meta": {
"Unsupported": [],
"ReadOnly": [
"Object Type"
]
},
"Actions": [
{
"Name": "Delete",
"Href": "relativity-data-visualization/V1/workspace/1018025/layouts/1036363",
"Verb": "DELETE",
"IsAvailable": true,
"Reason": []
},
{
"Name": "Update",
"Href": "relativity-data-visualization/V1/workspace/1018025/layouts/1036363",
"Verb": "PUT",
"IsAvailable": true,
"Reason": []
}
],
"Owner": {
"Name": "Public",
"ArtifactID": 0,
"Guids": []
},
"Name": "Document Metadata",
"ArtifactID": 1036363,
"Guids": []
}
To remove a layout from Relativity, send a DELETE request with a URL in the following format:
1
<host>/Relativity.Rest/API/relativity-data-visualization/{versionNumber}/workspaces/{Workspace ID}/layouts/{Layout Artifact ID}
The body of the request is empty. When the layout is successfully deleted, the response returns the status code of 200.
To retrieve a list of users eligible to be layout owners, send a GET request with a URL in the following format:
1
<host>/Relativity.Rest/API/relativity-data-visualization/{versionNumber}/workspaces/{Workspace ID}/layouts/eligible-owners
The body for the JSON request is empty.
The response is an array of DisplayableObjectIdentifier objects that represent the users. It contains the following fields:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[
{
"Name": "Public",
"ArtifactID": 0,
"Guids": []
},
{
"Name": "Doe, John",
"ArtifactID": 1046231,
"Guids": []
},
{
"Name": "Doe, Jane",
"ArtifactID": 1057131,
"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 |