As a fraud analyst,
I want to be able to retrieve conditions from ArangoDB via the Admin API
So that I can view what blocking and override conditions exist in the system and
so that I can effectively review and monitor compliance and risk management settings within the Tazama system.
Description / Overview
New functionality is being added to the Tazama system to be able to block or override a transaction event evaluation based on the evaluation of conditions against one of the transaction event attributes. The purpose of this user story is to provide a feature to allow a user to submit a request to retrieve specific conditions from the database via an Admin API.
sequenceDiagram
participant clientsystem as Client System
participant tmsapi as Admin API
participant cache as Cache
participant DB as DB
clientsystem->>tmsapi: fetchCondition()
tmsapi->>DB: fetchCondition()
DB->>tmsapi: {conditions} list
DB->>cache: updateConditions(activeOnly)
tmsapi->>clientsystem: {conditions} list
Acceptance criteria
Create an Admin API that has access to the Tazama database
recommended /v1/admin/event-flow-control/account
Create a REST (GET) endpoint to allow a client system to retrieve conditions in the Tazama graph database by account id
Functionality
The request parameter must be an account id url:port/v1/event-flow-control/account?id=4315e3271f5548c78242c70a7bc1bda7&&schmenm=IBAN&&agt=dfsp001&&synccache=no`
If the account does not exist in the accounts collection in the pseudonyms DB, return an error "Account does not exist in the database"
If the account exists, and there are no conditions, return HTTP Status 204
Parameters:
id: Account identifier
schmenm: Scheme name of the account
agt: proprietary agent identifier
synccache: no/all/active The synccache option determines whether or not the information in the database will also be replicated to cache. If no or missing, do nothing and return the result. If all replicate all the conditions for the account to cache. If active replicate only active conditions for the account to cache. (Remember to truncate the cache for this account)
BUG: Parameter keys were implemented in the camel case this should not be an issue but with validation emphasizing the camel case since validation is case sensitive this immediately becomes an issue.
Story statement
As a fraud analyst, I want to be able to retrieve conditions from ArangoDB via the Admin API So that I can view what blocking and override conditions exist in the system and so that I can effectively review and monitor compliance and risk management settings within the Tazama system.
Description / Overview
New functionality is being added to the Tazama system to be able to block or override a transaction event evaluation based on the evaluation of conditions against one of the transaction event attributes. The purpose of this user story is to provide a feature to allow a user to submit a request to retrieve specific conditions from the database via an Admin API.
See epic https://github.com/frmscoe/tazama-project/issues/12
Sequence diagram
Acceptance criteria
/v1/admin/event-flow-control/account
Functionality
url:port/v1/event-flow-control/account?id=4315e3271f5548c78242c70a7bc1bda7&&
schmenm=IBAN&&agt=dfsp001&&synccache=no`accounts
collection in thepseudonyms
DB, return an error "Account does not exist in the database"Parameters:
id
: Account identifierschmenm
: Scheme name of the accountagt
: proprietary agent identifiersynccache
: no/all/active The synccache option determines whether or not the information in the database will also be replicated to cache. Ifno
or missing, do nothing and return the result. Ifall
replicate all the conditions for the account to cache. Ifactive
replicate only active conditions for the account to cache. (Remember to truncate the cache for this account)Response data - account
JSON
```JSON { "acct": { "id": "1010101010", "schmeNm": { "prtry": "Mxx" }, "agt": { "finInstnId": { "clrSysMmbId": { "mmbId": "dfsp001" } } } }, "conditions":[ { "condId": "57bccf4497b64cd99e92d0a7f3352d41", "condTp": "non-overridable-block", "incptnDtTm": "2024-01-01T24:00:00.999Z", "xprtnDtTm": "2024-03-03T24:00:00.999Z", "condRsn": "R001", "usr": "bob", "creDtTm": "2024-01-01T24:00:00.999Z", "prsptvs": [ { "prsptv": "governed_as_debtor_account_by", "evtTp": ["pacs.008.01.10", "pacs.002.01.11"], "incptnDtTm": "2024-01-01T24:00:00.999Z", "xprtnDtTm": "2024-03-03T24:00:00.999Z" } { "prsptv": "governed_as_creditor_account_by", "evtTp": ["pacs.008.01.10", "pacs.002.01.11"], "incptnDtTm": "2024-01-01T24:00:00.999Z", "xprtnDtTm": "2024-03-03T24:00:00.999Z" } ] }, { "condId": "57bccf4497b64cd99e92d0a7f3352d41", "condTp": "override", "incptnDtTm": "2024-01-23T24:00:00.999Z", "xprtnDtTm": "2024-03-23T24:00:00.999Z", "condRsn": "R001", "usr": "bob", "creDtTm": "2024-01-04T24:00:00.999Z", "prsptvs": [ { "prsptv": "governed_as_debtor_account_by", "evtTp": ["all"], "incptnDtTm": "2024-01-01T24:00:00.999Z", "xprtnDtTm": "2024-03-03T24:00:00.999Z" } ] } ] } ```Complete Success Criteria
Success response 200 OK
If no account id is provided, return an
{UP}
statusIf the request does not return any data, return a 204 No Content status with empty response body
Error responses
4xx 5xx