Accelerate the Value of Data

Get Relations Total

The Get Relations Total API returns the total number of relationship objects that match the filter criteria.

Request - You can use one of the following endpoints to search for the total count of relations:

  • GET {TenantURL}/relations/_total
  • POST {TenantURL}/relations/_total
Note: Reltio recommends that you use the POST method and pass the parameters through the request body.
Table 1. Parameters
Parameter Required Description
Headers Authorization Yes Information about authentication access token in format "Bearer <accessToken>" (see details in Authentication API ).
Query filter Yes Enables relations filtering by a condition. Format for filter query parameter: filter=({Condition Type}[AND/OR {Condition Type}]*). For more information see Relations Filtering.
activeness No This possible values of this parameter are as follows:
  • active: This is the default value. This option allows you to search amongst the active relations.
  • all: This option allows you to search amongst all the relations (active or expired).
  • not_active: This option allows you to search amongst the expired relations.
Body (Only for the POST method) No Indicates the JSON body that can have all the same fields as supported in the query parameters.
Note: The query parameters have priority and override the body parameters.

Response

JSON object with the total number of relation objects matching the search filter.

GET and POST Requests

GET Request

GET {TenantURL}/relations/_total?filter=(equals(startObject,'entities/2') or equals(endObject, 'entities/2'))
Headers: Authorization: Bearer XXX

Response

{
    "total": 123
}

POST Request

POST {TenantURL}/relations/_total
Headers: Authorization: Bearer XXX
{
  "filter": "(equals(startObject,'entities/1'))",
  "activeness": "active"
}

Response

{ "total": 43}