API Explorer 975 endpoints

Get Aggregate Metrics

GET /obp/v7.0.0/management/aggregate-metrics

OBPv6.0.0-getAggregateMetrics Roles: CanReadAggregateMetrics MetricAggregate-Metrics

Returns aggregate metrics on api usage eg. total count, response time (in ms), etc.

Who may call it. A User with the Role CanReadAggregateMetrics, or an application whose Consumer holds it as a Scope, such as a monitoring service run as a Platform App (see here).

NOTE: Automatic from_date Default

If you do not provide a from_date parameter, this endpoint will automatically set it to: now - 9 minutes ago

This prevents accidentally querying all metrics since Unix Epoch and ensures reasonable response times. For historical/reporting queries, always explicitly specify your desired from_date.

Date range limit. One call covers at most 31 days of metrics on this instance. A longer range between from_date and to_date is refused with 400 (OBP-10069); to report on a longer period, make one call per period.

IMPORTANT: Smart Caching & Performance

This endpoint uses intelligent two-tier caching to optimize performance:

Stable Data Cache (Long TTL):

  • Metrics older than 600 seconds (10 minutes) are considered immutable/stable
  • These are cached for 86400 seconds (24 hours)
  • Used when your query's from_date is older than the stable boundary

Recent Data Cache (Short TTL):

  • Recent metrics (within the stable boundary) are cached for 7 seconds
  • Used when your query includes recent data or has no from_date

Why from_date matters:

  • Queries WITH from_date older than 10 mins → cached for 24 hours (fast!)
  • Queries WITHOUT from_date → cached for only 7 seconds (slower)

Should be able to filter on the following fields

eg: /management/aggregate-metrics?from_date=1100-01-01T01:01:01.000Z&to_date=1100-01-01T01:01:01.000Z&consumer_id=5 &user_id=66214b8e-259e-44ad-8868-3eb47be70646&implemented_by_partial_function=getTransactionsForBankAccount &implemented_in_version=v3.0.0&url=/obp/v3.0.0/banks/gh.29.uk/accounts/8ca8a7e4-6d02-48e3-a029-0b2bf89de9f0/owner/transactions &verb=GET&anon=false&app_name=MapperPostman &include_app_names=API-EXPLORER,API-Manager,SOFI,null&http_status_code=200

IMPORTANT: v6.0.0+ Breaking Change

This version does NOT support the old exclude_* parameters:

  • exclude_app_names - NOT supported (returns error)
  • exclude_url_patterns - NOT supported (returns error)
  • exclude_implemented_by_partial_functions - NOT supported (returns error)

Use include_* parameters instead (all optional):

  • include_app_names - Optional - include only these apps
  • include_url_patterns - Optional - include only URLs matching these patterns
  • include_implemented_by_partial_functions - Optional - include only these functions

1 from_date e.g.:from_date=1100-01-01T01:01:01.000Z DEFAULT: If not provided, automatically set to now - 9 minutes (keeps queries in recent data zone) IMPORTANT: Including from_date enables long-term caching for historical data queries!

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 include_app_names (if null ignore).eg: &include_app_names=API-EXPLORER,API-Manager,SOFI,null

13 include_url_patterns (if null ignore).you can design you own SQL LIKE pattern. eg: &include_url_patterns=%management/metrics%,%management/aggregate-metrics%

14 include_implemented_by_partial_functions (if null ignore).eg: &include_implemented_by_partial_functions=getMetrics,getConnectorMetrics,getAggregateMetrics

15 http_status_code (if null ignore) - Filter by HTTP status code. eg: http_status_code=200 returns only successful calls, http_status_code=500 returns server errors

Response fields added in v6.0.0:

  • distinct_user_count - distinct humans behind the calls. Calls made under a Consent (e.g. by an agent or 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.
  • distinct_consumer_count - distinct Consumers (apps) that made calls.
  • consent_call_count - calls that arrived under a Consent.
  • distinct_consent_count - distinct Consents exercised in the window.

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

This endpoint supports User XOR Application authorisation: either a person acting on their own Entitlements, or an Application acting as itself (e.g. with an OAuth2 client-credentials token) on its Consumer's Scopes. A person calling through a Consumer does not get that Consumer's Scopes. See here for more information.

This endpoint supports User XOR Application authorisation: either a person acting on their own Entitlements, or an Application acting as itself (e.g. with an OAuth2 client-credentials token) on its Consumer's Scopes. A person calling through a Consumer does not get that Consumer's Scopes. See here for more information.

This endpoint supports User XOR Application authorisation: either a person acting on their own Entitlements, or an Application acting as itself (e.g. with an OAuth2 client-credentials token) on its Consumer's Scopes. A person calling through a Consumer does not get that Consumer's Scopes. See here for more information.

JSON response body fields (8)
average_response_time
consent_call_count
consent_call_count
count
distinct_consent_count
distinct_consent_count
distinct_consumer_count
distinct_consumer_count
distinct_user_count
distinct_user_count
maximum_response_time
60
minimum_response_time
Example success response
{
  "count": 7076,
  "average_response_time": 65.21,
  "minimum_response_time": 1,
  "maximum_response_time": 9039,
  "distinct_user_count": 41,
  "distinct_consumer_count": 12,
  "consent_call_count": 1024,
  "distinct_consent_count": 9
}
Possible errors (5)
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20006: User is missing one or more roles:
  • OBP-10069: The date range is too long for aggregate metrics. Set from_date and to_date closer together.
  • OBP-50000: Unknown Error.
  • OBP-20200: The application cannot be identified.
Implemented by OBPv6.0.0 getAggregateMetrics Originally /obp/v6.0.0/management/aggregate-metrics