Managing Watchlists Via API

Introduction

This document will describe how to create watchlists and manage watchlist members using the TrustX API. For more details on watchlists and how they are managed through the Backoffice, see the Managing Watchlists guide.

API Access and Permissions

Before getting started, access to the TrustX API is required. A token grants access to the caller to invoke API calls on TrustX. Once the token is generated it can be reused, however it must be noted that the token has a 'time to live'. Once the 'time to live' has expired a new token must be generated.

When calling the API to issue a token, you will need to provide an API Key. This API Key is obtained from an API Key's secret. See the API Key Guide for information on how to manage API keys.

When the api/arthr/apiKeys/issue API is invoked, the response to this call provides a bearer token. This bearer token is used to authenticate subsequent calls to TrustX.

A Token is created by invoking the API call below:

HTTP
Copy

The permissions required for the APIs calls within the watchlist guide are as follows (note: replace {tenantid} with literal value):

JSON
Copy

Creating a Watchlist

A new watchlist can be created using the TrustX API by sending a POST query to the /api/watchlist-manager/facewatchlists endpoint.

Example Request:

HTTP
Copy

Example Response:

JSON
Copy

Adding a Member to a Watchlist

The api/watchlist-manager/facewatchlists/{{watchlistId}}/watchlist-members endpoint is used to add a new watchlist member to an existing watchlist. The face image should be passed as a base64 encoded string.

In the example below the {{watchlistId}} variable is substituted for the value of the 'id' for the watchlist created in the previous example, e.g. TFPMJFBB2HMY2DTNVCXKO4WC2Y.

Example Request:

HTTP
Copy

Example Response:

JSON
Copy

Adding a Member Using StoreSample

Users can also add a watchlist member where the face image is not stored and will not be visible within the Backoffice application. This can be achieved by setting the storeSamples property to false. By default, this property will be set to true. Below is an example request and response.

Example Request:

HTTP
Copy

Example Response:

JSON
Copy

Deleting a Watchlist Member

A watchlist member can be deleted by sending a DELETE query to the /api/watchlist-manager/facewatchlists/{{watchlistId}}/watchlist-members/endpoint.

It can take approximately 20 minutes before a deleted watchlist member is completely removed from the TrustX system.

Example Request:

HTTP
Copy

Perform Watchlist Match

A watchlist match can be performed via the API to determine whether a face image appears as a member of a specified watchlist. This can be achieved by contacting the api/watchlist-manager/facewatchlists/match endpoint.

Example Request:

HTTP
Copy

Example Response:

JSON
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard