Unify and manage your data

Retrieve most used API endpoints

Use this API to retrieve usage statistics for the most frequently called API endpoints in a Reltio environment. The results include request volume, error count, average latency, and success rate for each endpoint.

HTTP method and endpoint

Use the following HTTP method and endpoint path to submit the request for retrieving the most used APIs by volume.
POST /statistics-reporting/{tenantId}/API/getMostUsedApis

Replace {tenantId} with the ID of the target tenant.

Request headers

The following request headers must be included.
HeaderValueRequired
Content-Typeapplication/jsonYes
AuthorizationBearer {access_token}Yes

Request body

The following table describes the request body parameters, including accepted values and defaults.
ParameterTypeRequiredDescriptionAccepted values / Default
from (1)LongYesStart time in epoch milliseconds
to (1)LongYesEnd time in epoch milliseconds
envStringYesTarget environmentExample: prod, qa, dev

Default: none

queryTypesArrayNoFilters by query typeRead, Write, Search, Merge, Graphs

Default: all

httpMethodsArrayNoFilters by HTTP methodsExample: POST, GET

Default: all methods

apiEndPointsArrayNoFilters by API pathsExample: /api/{tenantId}/entities

Default: all

usersArrayNoFilters by user email addressesExample: user1@example.com

Default: all users

Note:
  1. The time range defined by the from and to values must not exceed one month. If the specified range exceeds the allowed limit, the API returns an HTTP 416 Range Not Satisfiable error with the following response:
    {
      "errors": [
        {
          "message": "Invalid time range."
        }
      ]
    }
    

Example request

Use the following example to see how a complete request is structured with headers and a JSON body.
curl -X POST https://{baseUrl}/statistics-reporting/{tenantId}/API/getMostUsedApis \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "from": 1721012400000,
    "to": 1721016000000,
    "env": "prod",
    "queryTypes": ["Read"],
    "httpMethods": ["GET"],
    "apiEndPoints": ["/api/v2/entities"],
    "users": ["user1@example.com"]
  }'

Response fields

The following table describes the fields returned in the response body.
FieldTypeDescription
apiStringComplete API endpoint path with HTTP method that was called
requestCountIntegerTotal number of requests made to this API endpoint
avgLatencyFloatAverage response time in milliseconds for requests to this endpoint
errorCountIntegerNumber of failed requests that returned error status codes
successRateFloatPercentage of successful requests (calculated as successful/total × 100)

Example response

The following example shows usage statistics for three API endpoints including latency, error count, and success rate.
[
  {
    "api": "GET /api/v2/entities",
    "requestCount": 45678,
    "avgLatency": 165.32,
    "errorCount": 234,
    "successRate": 99.48
  },
  {
    "api": "POST /api/v2/entities",
    "requestCount": 34521,
    "avgLatency": 356.18,
    "errorCount": 426,
    "successRate": 98.76
  },
  {
    "api": "GET /api/v2/crosswalks",
    "requestCount": 23145,
    "avgLatency": 124.45,
    "errorCount": 85,
    "successRate": 99.63
  }
]