Layout Manager (REST)

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:

  • Developing an application that support specific operations, which users can perform on the layouts included in it.
  • Programmatically updating properties of layouts in Relativity.

You can also use the Layout Manager service through .NET. For more information, see Layout Manager (.NET).

Guidelines for the Layout Manager service

Review the following guidelines for working with this service.

URLs

The URLs for REST endpoints contain path parameters that you need to set before making a call:

  • Set the {versionNumber} placeholder to the version of the REST API that you want to use, using the format lowercase v and the version number, for example v1.
  • Set other path parameters in the URLs to the Artifact ID of a given entity, for example setting {workspaceID} to the Artifact ID of a workspace.
  • Note: To indicate the admin-level context, set the {workspaceID} path parameter to -1.

For example, you can use the following URL to retrieve a layout:

Copy
<host>/Relativity.Rest/API/relativity-data-visualization/{versionNumber}/workspaces/{Workspace ID}/layouts/{Layout Artifact ID}

Set the path parameters as follows:

  • {versionNumber} to the version of the API, such as v1.
  • {Workspace ID} to the Artifact ID of the workspace that contains the layout.
  • {Layout Artifact ID} to the Artifact ID of a specific layout.

Client code sample

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.

Create a layout

To create a single layout, send a POST request with a URL in the following format:

Copy
<host>/Relativity.Rest/API/relativity-data-visualization/{versionNumber}/workspaces/{Workspace ID}/layouts

Read a layout

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.

  • Basic metadata for a layout - send a GET request with a URL in the following general format:
  • Copy
    <host>/Relativity.Rest/API/relativity-data-visualization/{versionNumber}/workspaces/{Workspace ID}/layouts/{Layout Artifact ID}
  • Extended metadata for a layout - send a GET request with a URL in the following general format:
  • Copy
    <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.

Update a layout

To update properties of a layout, send a PUT request with a URL in the following format:

Copy
<host>/Relativity.Rest/API/relativity-data-visualization/{versionNumber}/workspaces/{Workspace ID}/layouts/{Layout Artifact ID}

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.

Delete a layout

To remove a layout from Relativity, send a DELETE request with a URL in the following format:

Copy
<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.

Retrieve users for layout ownership

To retrieve a list of users eligible to be layout owners, send a GET request with a URL in the following format:

Copy
<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:

  • Name - the user-friendly name of a user.
  • ArtifactID - the Artifact ID of the user.
  • Guids - an array of GUIDs used to identify the user.