API Explorer 1 endpoints

Get Top Users

GET /obp/v7.0.0/management/metrics/top-users

OBPv7.0.0-getTopUsers Roles: CanReadMetrics MetricUser

Get the users behind the API traffic: one row per distinct user with their call count, sorted by count descending.

On-behalf-of aware: calls made under a Consent (e.g. by an agent or a TPP) are attributed to the granting (on-behalf-of) user, resolved via the consent table — not to the consent's technical shadow user. Anonymous calls are excluded. For a given window and filters the number of distinct users listed here therefore matches the distinct_user_count field of GET /management/aggregate-metrics.

require CanReadMetrics role

Should be able to filter on the following fields

eg: /management/metrics/top-users?from_date=1100-01-01T01:01:01.000Z&to_date=1100-01-01T01:01:01.000Z&limit=50

1 from_date (defaults to one year ago) eg:from_date=1100-01-01T01:01:01.000Z

2 to_date (defaults to the current date) eg:to_date=1100-01-01T01:01:01.000Z

3 consumer_id (if null ignore)

4 user_id (if null ignore)

5 anon (if null ignore) only support two value : true (return where user_id is null) or false (return where user_id is not null)

6 url (if null ignore), note: can not contain '&'.

7 app_name (if null ignore)

8 implemented_by_partial_function (if null ignore)

9 implemented_in_version (if null ignore)

10 verb (if null ignore)

11 correlation_id (if null ignore)

12 limit (defaults to 50) eg: limit=200

User Authentication is Required. The User must be logged in. The Application must also be authenticated.

JSON response body fields (4)
count
top_users
top_users
user_id
9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1
username
felixsmith
Example success response
{
  "top_users": [
    {
      "count": 1000,
      "user_id": "9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1",
      "username": "felixsmith"
    },
    {
      "count": 250,
      "user_id": "8ca8a7e4-6d02-48e3-a029-0b2bf89de9f0",
      "username": "susan.uk.29@example.com"
    }
  ]
}
Possible errors (5)
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20006: User is missing one or more roles:
  • OBP-10016: Incorrect filter Parameters in URL.
  • OBP-30551: Could not get the top users from database.
  • OBP-50000: Unknown Error.
Implemented by OBPv7.0.0 getTopUsers