Object Type Manager (REST)

The Object Type Manager service exposes endpoints for programmatically creating custom object types for use in your applications. This service includes the following features:

  • Support for create, read, update, and delete operations on object types.
  • Helper endpoint for retrieving parent object types.

As a sample use case, you could use the Object Type Manager service to add new object types to support a custom application that you developed. You might want to implement an application that tracks vendor or customer information and decide to add different object types for each of these items. These object types could be further customized with object rules, event handlers, and mass operations.

You can also work with the Object Type Manager service through .NET. For more information, see Object Type Manager (.NET).

Guidelines for the Object Type 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 or v2
  • 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 an object type:

Copy
<host>/Relativity.Rest/api/relativity-object-model/{versionNumber}/workspaces/{workspaceId}/object-types/{objectTypeArtifactID}

Set the path parameter as follows:

  • {versionNumber} to the version of the service, such as v2.
  • {workspaceID} to the Artifact ID of the workspace containing the object type to retrieve.
  • {objectTypeArtifactID} to the Artifact ID of the object type.

Postman sample files

You can use the Postman sample files to become familiar with making calls to endpoints on the services for object types. To download the sample files, click Object Type Postman File.

To get started with Postman, complete these steps:

  1. Obtain access to a Relativity environment. You need a username and password to make calls to your environment.
  2. Install Postman.
  3. Import the Postman sample file for the service. For more information, see Working with data files on the Postman web site.
  4. Select an endpoint. Update the URL with the domain for your Relativity environment and any other variables.
  5. In the Authorization tab, set the Type to Basic Auth, enter your Relativity credentials, and click Update Request.
  6. See the following sections on this page for more information on setting required fields for a request.
  7. Click Send to make a request.

Client code sample

To use the Object Type Manager service, send requests by making calls with the required HTTP methods. See the following base URL for this service:

Copy
<host>/Relativity.Rest/api/relativity-object-model/{versionNumber}/workspaces/<workspaceID>/object-types

You can use the following .NET code as a sample client for creating an object type.

CRUD operations for object types

The Object Type Manager service supports create, read, update, and delete operations on object types. It also includes helper endpoints used to retrieve information about parent object types, and dependent objects.

Review the following guidelines for working with this service:

  • Verify that you have the appropriate permissions to access an object type before attempting to modify or delete it.
  • Verify that the Relativity application is unlocked before attempting to add an object type to it, or to modify or delete an existing object type. You also need permissions to the application and the object type to perform these tasks.

See the following subsections for more information:

Create an object type

When creating a new object type, you need to identify its parent object type. For more information, see Retrieve a parent object types.

To create an object type, send a POST request with a URL in the following format:

Copy
<host>/Relativity.Rest/api/relativity-object-model/{versionNumber}/workspaces/{workspaceId}/object-types/

Read an object type

You can retrieve basic information about an object type or extended information, which also includes operations that you have permissions to perform on the object type.

  • Retrieve basic metadata for an object type - send a GET request with a URL in the following general format:
    Copy
    <host>/Relativity.Rest/api/relativity-object-model/{versionNumber}/workspaces/{workspaceId}/object-types/{objectTypeArtifactID}
  • Retrieve extended metadata for an object type - send a GET request with a URL in the following general format:
    • includeMetadata - an optional query parameter which specifies whether to return extended metadata for the object type.
    • includeActions - an optional query parameter which, if set to true, will return an array of Action objects indicating operations you have permissions to perform on the object type.
    Copy
    <host>/Relativity.Rest/api/relativity-object-model/{versionNumber}/workspaces/{workspaceId}/object-types/{ArtifactID}?includeMetadata=true&includeActions=true

Update an object type

To modify an object type, send a PUT request with a URL in the following general format:

Copy
<host>/Relativity.Rest/api/relativity-object-model/{versionNumber}/workspaces/{workspaceId}/object-types/{ArtifactID}

When the object type is successfully updated, the response contains the status code of 200.

Delete an object type

To remove an object type from Relativity, send a DELETE request with a URL in the following general format:

Copy
<host>/Relativity.Rest/api/relativity-object-model/{versionNumber}/workspaces/{workspaceId}/object-types/{ArtifactID}

The request body is empty.

When the object type is successfully deleted, the response returns the status code of 200.

Retrieve a parent object types

Use this endpoint to retrieve a list of parent object types. You may want to call this endpoint before creating a new object type, because you must specify its parent object type. For more information, see Create an object type.

To call this endpoint, send a GET request to the URL with the following format:

Copy
<host>/Relativity.Rest/api/relativity-object-model/{versionNumber}/workspaces/{workspaceId}/object-types/available-parent-object-types

The request body is empty.