API Explorer

v2.1.0 (134 APIs)

Bank
Accounts
Views
Counterparties
Transactions

Get Metrics

Get the all metrics

require CanReadMetrics role

Filters Part 1.filtering (no wilde cards etc.) parameters to GET /management/metrics

Should be able to filter on the following metrics fields

eg: /management/metrics?from_date=2017-09-19T02:31:05.000Z&to_date=2017-09-19T02:31:05.000Z&limit=50&offset=2

1 from_date (defaults to one week before current date): eg:from_date=2017-09-19T02:31:05.000Z

2 to_date (defaults to current date) eg:to_date=2017-09-19T02:31:05.000Z

3 limit (for pagination: defaults to 50) eg:limit=200

4 offset (for pagination: zero index, defaults to 0) eg: offset=10

5 sort_by (defaults to date field) eg: sort_by=date
possible values:
"url",
"date",
"user_name",
"app_name",
"developer_email",
"implemented_by_partial_function",
"implemented_in_version",
"consumer_id",
"verb"

6 direction (defaults to date desc) eg: direction=desc

eg: /management/metrics?from_date=2017-09-19T02:31:05.000Z&to_date=2017-09-19T02:31:05.000Z&limit=10000&offset=0&anon=false&app_name=TeatApp&implemented_in_version=v2.1.0&verb=POST&user_id=c7b6cb47-cb96-4441-8801-35b57456753a&user_name=susan.uk.29@example.com&consumer_id=78

Other filters:

7 consumer_id (if null ignore)

8 user_id (if null ignore)

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

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

11 app_name (if null ignore)

12 implemented_by_partial_function (if null ignore),

13 implemented_in_version (if null ignore)

14 verb (if null ignore)

15 correlation_id (if null ignore)

16 duration (if null ignore) non digit chars will be silently omitted

Authentication is Mandatory

JSON response body fields:

Typical Successful Response:

								
									
{ "metrics":[{ "user_id":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1", "url":"www.openbankproject.com", "date":"2017-09-19T00:00:00Z", "user_name":"OBP", "app_name":"SOFI", "developer_email":"felixsmith@example.com", "implemented_by_partial_function":"getBanks", "implemented_in_version":"v210", "consumer_id":"123", "verb":"get", "correlation_id":"v8ho6h5ivel3uq7a5zcnv0w1", "duration":39 }] }
Required Roles:
  • CanReadMetrics - Please login to request this Role
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20006: User is missing one or more roles:
  • OBP-50000: Unknown Error.
Connector Methods:
Implemented in OBPv2.1.0 by getMetrics, operation_id: OBPv2.1.0-getMetrics

Search API Metrics via Elasticsearch

Search the API calls made to this API instance via Elastic Search.

Login is required.

CanSearchMetrics entitlement is required to search metrics data.

parameters:

esType - elasticsearch type

simple query:

q - plain_text_query

df - default field to search

sort - field to sort on

size - number of hits returned, default 10

from - show hits starting from

json query:

source - JSON_query_(URL-escaped)

example usage:

/search/metrics/q=findThis

or:

/search/metrics/source={"query":{"query_string":{"query":"findThis"}}}

Note!!

The whole JSON query string MUST be URL-encoded:

  • For { use %7B
  • For } use %7D
  • For : use %3A
  • For " use %22

etc..

Only q, source and esType are passed to Elastic

Elastic simple query: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-uri-request.html

Elastic JSON query: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html

Authentication is Mandatory

JSON response body fields:

Typical Successful Response:

								
									
{ "jsonString":"{}" }
Required Roles:
  • CanSearchMetrics - Please login to request this Role
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20006: User is missing one or more roles:
  • OBP-50000: Unknown Error.
Connector Methods:
Implemented in OBPv2.0.0 by elasticSearchMetrics, operation_id: OBPv2.0.0-elasticSearchMetrics