API Explorer

v5.1.0 (267 APIs)

Bank
Accounts
Views
Counterparties
Transactions

获取指标

Typical Successful Response:

								
									
{ "metrics":[{ "user_id":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1", "url":"www.openbankproject.com", "date":"2017-09-18T22:00:00Z", "user_name":"OBP", "app_name":"SOFI", "developer_email":"eveline@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
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
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:
Version: OBPv2.1.0, function_name: by getMetrics, operation_id: OBPv2.1.0-getMetrics Tags: Metric, API,

获取汇总指标

返回有关api使用情况的汇总指标。总计数,响应时间(以毫秒为单位)等。

应该能够过滤以下字段

例如:/ management / aggregate-metrics?from_date = 2017-09-19T02:31:05.000Z&to_date = 2017-09-19T02:31:05.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
&exclude_app_names = API-EXPLORER,API-Manager,SOFI,空

1个from_date(默认为当前日期的前一天):例如:from_date = 2017-09-19T02:31:05.000Z

2 to_date(默认为当前日期),例如:to_date = 2017-09-19T02:31:05.000Z

3 Consumer_id(如果为null,则忽略)

4 user_id(如果为null,则忽略)

5 anon(如果忽略null)仅支持两个值:true(返回user_id为null的位置)或false(返回user_id不为null的位置。)

6 url(如果为null,则忽略),注意:不能包含'&'。

7 app_name(如果为null,则忽略)

8 Implemented_by_partial_function(如果为null,则忽略),

9 Implemented_in_version(如果为null则忽略)

10个动词(如果为null,则忽略)

11correlation_id(如果为null,则忽略)

12个持续时间(如果忽略null)非数字字符将被忽略

13 exclude_app_names(如果为null则忽略)。例如:&exclude_app_names = API-EXPLORER,API-Manager,SOFI,null

14 exclude_url_patterns(如果为null,则忽略)。您可以设计自己的SQL NOT LIKE模式。例如:&exclude_url_patterns =%management / metrics%,%management / aggregate-metrics%

15 exclude_implemented_by_partial_functions(如果为null则忽略)。例如:&exclude_implemented_by_partial_functions = getMetrics,getConnectorMetrics,getAggregateMetrics

身份验证是强制性的

Typical Successful Response:

								
									
{ "count":7076, "average_response_time":65.21, "minimum_response_time":1.0, "maximum_response_time":9039.0 }
Required Roles:
  • CanReadAggregateMetrics - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
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:
Version: OBPv3.0.0, function_name: by getAggregateMetrics, operation_id: OBPv3.0.0-getAggregateMetrics Tags: Metric, Aggregate-Metrics, New-Style,

获取连接器指标

获取所有指标

需要CanGetConnectorMetrics角色

过滤第1部分。将参数过滤 (没有通配符等)到GET / management / connector / metrics

应该能够根据以下指标字段进行过滤

例如:/ management / connector / metrics?from_date = 2017-09-19&to_date = 2017-09-19&limit = 50&offset = 2

1个from_date(默认为当前日期之前的一周):例如:from_date = 2017-09-19

2 to_date(默认为当前日期),例如:to_date = 2017-09-19

3个限制(用于分页:默认为1000),例如:limit = 2000

4个偏移量(对于分页:零索引,默认为0),例如:offset = 10

例如:/ management / connector / metrics?from_date = 2017-09-19&to_date = 2017-09-19&limit = 100&offset = 300

其他过滤器:

5 connector_name(如果为null,则忽略)

6 function_name(如果为null,则忽略)

7correlation_id(如果为null,则忽略)

Typical Successful Response:

								
									
{ "metrics":[{ "connector_name":"mapper", "function_name":"getBanks", "correlation_id":"12345", "date":"2017-09-18T22:00:00Z", "duration":1000 }] }
Required Roles:
  • CanGetConnectorMetrics - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-10005: Invalid Date Format. Could not convert value to a Date.
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv2.2.0, function_name: by getConnectorMetrics, operation_id: OBPv2.2.0-getConnectorMetrics Tags: Metric, API,

获取顶级API

获取有关最受欢迎的API的指标。例如:总计数,响应时间(以毫秒为单位)等。

应该能够过滤以下字段

例如:/management/metrics/top-apis?from_date=2017-09-19T02:31:05.000Z&to_date=2017-09-19T02:31:05.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
&exclude_app_names = API-EXPLORER,API-Manager,SOFI,空

1个from_date(默认为当前日期的前一天):例如:from_date = 2017-09-19T02:31:05.000Z

2 to_date(默认为当前日期),例如:to_date = 2017-09-19T02:31:05.000Z

3 Consumer_id(如果为null,则忽略)

4 user_id(如果为null,则忽略)

5 anon(如果忽略null)仅支持两个值:true(返回user_id为null的位置)或false(返回user_id不为null的位置。)

6 url(如果为null,则忽略),注意:不能包含'&'。

7 app_name(如果为null,则忽略)

8 Implemented_by_partial_function(如果为null,则忽略),

9 Implemented_in_version(如果为null则忽略)

10个动词(如果为null,则忽略)

11correlation_id(如果为null,则忽略)

12个持续时间(如果忽略null)非数字字符将被忽略

13 exclude_app_names(如果为null则忽略)。例如:&exclude_app_names = API-EXPLORER,API-Manager,SOFI,null

14 exclude_url_patterns(如果为null,则忽略)。您可以设计自己的SQL NOT LIKE模式。例如:&exclude_url_patterns =%management / metrics%,%management / aggregate-metrics%

15 exclude_implemented_by_partial_functions(如果为null则忽略)。例如:&exclude_implemented_by_partial_functions = getMetrics,getConnectorMetrics,getAggregateMetrics

身份验证是强制性的

Typical Successful Response:

								
									
{ "top_apis":[{ "count":7076, "Implemented_by_partial_function":"getBanks", "implemented_in_version":"v1.2.1" }] }
Required Roles:
  • CanReadMetrics - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • 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-30042: Could not get the top apis from database.
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv3.1.0, function_name: by getTopAPIs, operation_id: OBPv3.1.0-getTopAPIs Tags: Metric, New-Style,

获得顶级消费者

获取有关API使用量最大消费方的指标,例如总数,消费者ID和app_name。

应该能够过滤以下字段

例如:/management/metrics/top-consumers?from_date=2017-09-19T02:31:05.000Z&to_date=2017-05-22T01:02:03.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
&exclude_app_names = API-EXPLORER,API-Manager,SOFI,空
&limit = 100

1个from_date(默认为当前日期的前一天):例如:from_date = 2017-09-19T02:31:05.000Z

2 to_date(默认为当前日期),例如:to_date = 2017-09-19T02:31:05.000Z

3 Consumer_id(如果为null,则忽略)

4 user_id(如果为null,则忽略)

5 anon(如果忽略null)仅支持两个值:true(返回user_id为null的位置)或false(返回user_id不为null的位置。)

6 url(如果为null,则忽略),注意:不能包含'&'。

7 app_name(如果为null,则忽略)

8 Implemented_by_partial_function(如果为null,则忽略),

9 Implemented_in_version(如果为null则忽略)

10个动词(如果为null,则忽略)

11correlation_id(如果为null,则忽略)

12个持续时间(如果忽略null)非数字字符将被忽略

13 exclude_app_names(如果为null则忽略)。例如:&exclude_app_names = API-EXPLORER,API-Manager,SOFI,null

14 exclude_url_patterns(如果为null,则忽略)。您可以设计自己的SQL NOT LIKE模式。例如:&exclude_url_patterns =%management / metrics%,%management / aggregate-metrics%

15 exclude_implemented_by_partial_functions(如果为null则忽略)。例如:&exclude_implemented_by_partial_functions = getMetrics,getConnectorMetrics,getAggregateMetrics

16个限制(用于分页:默认为50),例如:limit = 200

身份验证是强制性的

Typical Successful Response:

								
									
{ "top_consumers":[{ "count":7076, "consumer_id":"7uy8a7e4-6d02-40e3-a129-0b2bf89de8uh", "app_name":"Api Explorer", "developer_email":"eveline@example.com" }] }
Required Roles:
  • CanReadMetrics - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • 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-30045: Could not get the top consumers from database.
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv3.1.0, function_name: by getMetricsTopConsumers, operation_id: OBPv3.1.0-getMetricsTopConsumers Tags: Metric, New-Style,

通过Elasticsearch搜索API指标。

通过Elastic Search搜索对此API实例进行的API调用。

需要登录。

需要CanSearchMetrics授权才能搜索指标数据。

参数:

esType-elasticsearch类型

简单查询:

q-plain_text_query

df-搜索的默认字段

sort-要排序的字段

大小-返回的匹配数,默认为10

from-显示热门歌曲,起始于

json查询:

来源-JSON_query_(网址转义)

用法示例:

/ search / metrics / q = findThis

要么:

/ search / metrics / source = {“ query”:{“ query_string”:{“ query”:“ findThis”}}}

注意!!

整个JSON查询字符串必须使用URL编码:

  • 对于{使用%7B
  • 对于},请使用%7D
  • 对于:使用%3A
  • 对于“使用%22

等等..

仅q,source和esType传递给Elastic

弹性简单查询: https : //www.elastic.co/guide/en/elasticsearch/reference/current/search-uri-request.html

弹性JSON查询: https : //www.elastic.co/guide/zh-CN/elasticsearch/reference/current/query-filter-context.html

Typical Successful Response:

								
									
{ "jsonString":"{}" }
Required Roles:
  • CanSearchMetrics - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
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:
Version: OBPv2.0.0, function_name: by elasticSearchMetrics, operation_id: OBPv2.0.0-elasticSearchMetrics Tags: Metric, API,