API Explorer 935 endpoints

Get Metrics (My)

GET /obp/v7.0.0/my/metrics

OBPv7.0.0-getMyMetrics No role required MetricUser

Get the API metrics rows of the currently authenticated user — a record of each REST API call this user has made.

No role is required: this endpoint only ever returns calls belonging to the logged in user — their own calls, plus calls made by agent users minted from Consents this user granted (e.g. an AI agent calling on their behalf). Called under such a Consent, it returns the same family of calls, resolved through the granting user. The identity filter parameters accepted by GET /management/metrics (user_id, username, email, provider_provider_id, anon) are NOT supported here and are rejected with an error — the user filter is always the current user's delegation family.

NOTE: Automatic from_date Default

If you do not provide a from_date parameter it is automatically set to a few minutes ago (now - 9 minutes). For historical queries, always explicitly specify your desired from_date — this also enables long-term caching of the result.

The other filter and pagination parameters work as on GET /management/metrics:

eg: /my/metrics?from_date=1100-01-01T01:01:01.000Z&to_date=1100-01-01T01:01:01.000Z&limit=50&offset=2

1 from_date e.g.:from_date=1100-01-01T01:01:01.000Z

2 to_date e.g.:to_date=1100-01-01T01:01:01.000Z Defaults to a far future date i.e. Sat Jan 01 00:00:00 UTC 4000

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

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

7 consumer_id (if null ignore)

8 app_name (if null ignore)

9 url (if null ignore)

10 implemented_by_partial_function (if null ignore)

11 implemented_in_version (if null ignore)

12 verb (if null ignore)

13 correlation_id (if null ignore)

14 duration (if null ignore) - Returns calls where duration > specified value (in milliseconds). eg: duration=5000

Authentication is required.

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

JSON response body fields (24)
api_instance_id
api_instance_id
app_name
appNameBank
consumer_id
7uy8a7e4-6d02-40e3-a129-0b2bf89de8uh
correlation_id
1flssoftxq0cr1nssr68u0mioj
date
2020-01-27
developer_email
duration
5.123
forwarded_for
forwarded_for
implemented_by_partial_function
implemented_in_version
metrics
operation_id
OBPv6.0.0-getBanks
response_body
response_body
source_ip
source_ip
status_code
status_code
target_ip
target_ip
url
http://www.example.com/id-docs/123/image.png
user_id
9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1
username
felixsmith
verb
auth_type
auth_type
certificate_trust
certificate_trust
certificate_trust_detail
certificate_trust_detail
consent_reference_id
fd13b9af-4f74-4d52-a7f1-7c2c12f3aa11
Example success response
{
  "metrics": [
    {
      "user_id": "9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1",
      "url": "www.openbankproject.com",
      "date": "1100-01-01T00:00:00Z",
      "username": "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,
      "source_ip": "198.51.100.42",
      "target_ip": "198.51.100.42",
      "forwarded_for": "198.51.100.42, 10.0.0.2, 10.0.0.3",
      "response_body": {
        "code": 401,
        "message": "OBP-20001: User not logged in. Authentication is required!"
      },
      "status_code": 401,
      "operation_id": "OBPv4.0.0-getBanks",
      "api_instance_id": "obp_node_a",
      "consent_reference_id": "fd13b9af-4f74-4d52-a7f1-7c2c12f3aa11",
      "auth_type": "Consent",
      "certificate_trust": "forwarded",
      "certificate_trust_detail": "cn=nginx-prod-1,ou=edge,o=tesobe gmbh,c=de"
    }
  ]
}
Possible errors (3)
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-10058: User identity filter parameters (user_id, username, email, provider_provider_id, anon) are not supported on this endpoint. It only ever returns the logged in user's own records.
  • OBP-50000: Unknown Error.
Implemented by OBPv7.0.0 getMyMetrics