Update MethodRouting
PUT /obp/v7.0.0/management/method_routings/METHOD_ROUTING_ID
OBPv3.1.0-updateMethodRouting Roles: CanUpdateMethodRouting Method-RoutingAPI
Update a MethodRouting.
User Authentication is Required. The User must be logged in. The Application must also be authenticated.
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:
METHOD_ROUTING_ID:
Example request body
{
"is_bank_id_exact_match": true,
"method_name": "getBank",
"parameters": [
{
"key": "url",
"value": "http://mydomain.com/xxx"
}
],
"connector_name": "rest_vMar2019",
"bank_id_pattern": "some_bankId"
}Example success response
{
"is_bank_id_exact_match": true,
"method_name": "getBank",
"parameters": [
{
"key": "url",
"value": "http://mydomain.com/xxx"
}
],
"method_routing_id": "this-method-routing-Id",
"connector_name": "rest_vMar2019",
"bank_id_pattern": "some_bankId"
}Possible errors (6)
- 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.