OAuth2 Client Manager (REST)

In Relativity, you can use OAuth2 clients to configure external services and applications to authenticate against Relativity in a secure manner. For more information, see OAuth2 clients in the Relativity Documentation site.

The OAuth2Client Manager API exposes CRUD operations for OAuth2 clients. It also supports generating secrets for OAuth2 clients.

As a sample use case, you can implement a client application that presents the user with the Relativity login page to obtain an access token for calling Relativity APIs. The application can then call the APIs to perform tasks for customized e-discovery workflows and automation.

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

Guidelines for the OAuth2 Client Manager service

Review the following guidelines for working with the Federated Instance Manager 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 the {clientID} to the Artifact ID of a given entity.

For example, you can use the following URL to delete a client:

Copy
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/oauth2-clients/{clientID}
  • {versionNumber} to the version of the service, such as v1.
  • {clientID} to the Artifact ID of the client to deleted.

Create an OAuth2 client

The OAuth2 Client Manager service supports the following options for creating a client:

Create a client with flow and redirectUrs

To create an OAuth2 client by specifying a flow and redirectUrs, send a POST request with a URL in the following format:

Copy
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/oauth2-clients

Create a client with OAuth2Client object

To create an OAuth2 client with OAuth2Client objects, send a POST request with a URL in the following format:

Copy
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/oauth2-clients

Update an OAuth2 client

To update an OAuth2 client, send a PUT request with a URL in the following format:

Copy
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/oauth2-clients

When the OAuth2 client is successfully updated, the response returns the status code of 200. For more information, see HTTP status codes in Relativity REST APIs.

Delete an OAuth2 client

To delete an OAuth2 client, send a DELETE request with a URL in the following format:

Copy
<host>/Relativity.REST/api/Relativity-Identity/{versionNumber}/oauth2-clients/{clientID}

The request body is empty.

When the OAuth2 client is successfully deleted, the response returns the status code of 200. For more information, see HTTP status codes in Relativity REST APIs.

Regenerate a client secret

To regenerate an OAuth2 client secret, send a GET request with a URL in the following format:

Copy
<host>Relativity.REST/api/Relativity-Identity/{versionNumber}/oauth2-clients/{clientID}/regenerate-secret

The request body is empty.

The response contains a string representing the new secret for the client:

Copy
ccce232bccd58a467554c718e8638058ade3096b