-
Method Routing
-
Open Bank Project can have different connectors, to connect difference data sources. We supportMore...
- Create MethodRouting
- Delete MethodRouting
- Get MethodRoutings
- Update MethodRouting
-
v5.1.0 filtered by tag: Method-Routing (4 APIs)
Create MethodRouting
Create a MethodRouting.
Authentication is Mandatory
Explanation of Fields:
- method_name is required String value, current supported value: [mapped]
- connector_name is required String value
- is_bank_id_exact_match is required boolean value, if bank_id_pattern is exact bank_id value, this value is true; if bank_id_pattern is null or a regex, this value is false
- bank_id_pattern is optional String value, it can be null, a exact bank_id or a regex
- parameters is optional array of key value pairs. You can set some parameters for this method
note and CAVEAT!:
- bank_id_pattern has to be empty for methods that do not take bank_id as a function parameter, otherwise might get empty result
- methods that aggregate bank objects (e.g. getBankAccountsForUser) have to take any existing method routings for these objects into consideration
- so if you create e.g. a bank specific method routing for getting an account, make sure that it is also served by endpoints getting ALL accounts for ALL banks
- if bank_id_pattern is regex, special characters need to do escape, for example: bank_id_pattern = "some-id_pattern_\d+"
If the connector name starts with rest, parameters can contain "outBoundMapping" and "inBoundMapping", convert OutBound and InBound json structure.
for example:
outBoundMapping example, convert json from source to target:
Build OutBound json value rules:
1 set cId value with: outboundAdapterCallContext.correlationId value
2 set bankId value with: concat bankId.value value with string helloworld
3 set originalJson value with: whole source json, note: the field value expression is $root
inBoundMapping example, convert json from source to target:
Build InBound json value rules:
1 and 2 set inboundAdapterCallContext and status value: because field name ends with "$default", remove "$default" from field name, not change the value
3 set fullName value with: concat string full: with result.name value
4 set bankRoutingScheme value: because source value is Array, but target value is not Array, the mapping field name must ends with [0].
JSON request body fields:
key: CustomerNumber
value: 5987953
JSON response body fields:
key: CustomerNumber
value: 5987953
{
"is_bank_id_exact_match":false,
"method_name":"getBank",
"connector_name":"rest_vMar2019",
"method_routing_id":"this-method-routing-Id",
"bank_id_pattern":"some_bankId_.*",
"parameters":[{
"key":"url",
"value":"http://mydomain.com/xxx"
}]
}
-
CanCreateMethodRouting
- Please login to request this Role
- Required JSON Validation: No
- Allowed Authentication Types: Not set
- OBP-20001: User not logged in. Authentication is required!
- OBP-20006: User is missing one or more roles:
- OBP-10001: Incorrect json format.
- OBP-10021: Incorrect Connector name.
- OBP-10022: Incorrect Connector method name.
- OBP-50000: Unknown Error.
Delete MethodRouting
Delete a MethodRouting specified by METHOD_ROUTING_ID.
Authentication is Mandatory
URL Parameters:
JSON response body fields:
-
CanDeleteMethodRouting
- Please login to request this Role
- Required JSON Validation: No
- Allowed Authentication Types: Not set
- OBP-20001: User not logged in. Authentication is required!
- OBP-20006: User is missing one or more roles:
- OBP-50000: Unknown Error.
Get MethodRoutings
Get the all MethodRoutings.
Query url parameters:
- method_name: filter with method_name
- active: if active = true, it will show all the webui_ props. Even if they are set yet, we will return all the default webui_ props
eg:
https://api3.openbankproject.com/obp/v3.1.0/management/method_routings?active=true
https://api3.openbankproject.com/obp/v3.1.0/management/method_routings?method_name=getBank
Authentication is Mandatory
JSON response body fields:
key: CustomerNumber
value: 5987953
{
"method_routings":[{
"is_bank_id_exact_match":false,
"method_name":"getBanks",
"connector_name":"rest_vMar2019",
"method_routing_id":"method-routing-id",
"bank_id_pattern":"some_bank_.*",
"parameters":[{
"key":"url",
"value":"http://mydomain.com/xxx"
}]
}]
}
-
CanGetMethodRoutings
- Please login to request this Role
- Required JSON Validation: No
- Allowed Authentication Types: Not set
- OBP-20001: User not logged in. Authentication is required!
- OBP-20006: User is missing one or more roles:
- OBP-50000: Unknown Error.
Update MethodRouting
Update a MethodRouting.
Authentication is Mandatory
Explaination of Fields:
- method_name is required String value, current supported value: [mapped]
- connector_name is required String value
- is_bank_id_exact_match is required boolean value, if bank_id_pattern is exact bank_id value, this value is true; if bank_id_pattern is null or a regex, this value is false
- bank_id_pattern is optional String value, it can be null, a exact bank_id or a regex
- parameters is optional array of key value pairs. You can set some paremeters for this method
note: -
if bank_id_pattern is regex, special characters need to do escape, for example: bank_id_pattern = "some-id_pattern_\d+"
If connector name start with rest, parameters can contain "outBoundMapping" and "inBoundMapping", to convert OutBound and InBound json structure.
for example:
outBoundMapping example, convert json from source to target:
Build OutBound json value rules:
1 set cId value with: outboundAdapterCallContext.correlationId value
2 set bankId value with: concat bankId.value value with string helloworld
3 set originalJson value with: whole source json, note: the field value expression is $root
inBoundMapping example, convert json from source to target:
Build InBound json value rules:
1 and 2 set inboundAdapterCallContext and status value: because field name ends with "$default", remove "$default" from field name, not change the value
3 set fullName value with: concat string full: with result.name value
4 set bankRoutingScheme value: because source value is Array, but target value is not Array, the mapping field name must ends with [0].
URL Parameters:
JSON response body fields:
key: CustomerNumber
value: 5987953
{
"is_bank_id_exact_match":true,
"method_name":"getBank",
"connector_name":"rest_vMar2019",
"method_routing_id":"this-method-routing-Id",
"bank_id_pattern":"some_bankId",
"parameters":[{
"key":"url",
"value":"http://mydomain.com/xxx"
}]
}
-
CanUpdateMethodRouting
- Please login to request this Role
- Required JSON Validation: No
- Allowed Authentication Types: Not set
- OBP-20001: User not logged in. Authentication is required!
- OBP-20006: User is missing one or more roles:
- OBP-10001: Incorrect json format.
- OBP-10021: Incorrect Connector name.
- OBP-10022: Incorrect Connector method name.
- OBP-50000: Unknown Error.