-
Notifications
You must be signed in to change notification settings - Fork 447
Data Import format for creating sandbox data.
This page refers to a data import format. (The API does not return data like this)
If you would like to create new banks, accounts and transactions on our sandbox, use this json format and send the file to us at contact AT openbankproject.com and we'll import it for you.
An example file for data import can be found in the repo.
If you wish to create your own sandbox, follow the Custom Instance instructions below.
Notes:
- bank id must be unique
- email must be unique
- account id must be unique for the bank
- accounts.bank must be specified in the top level "banks"
- accounts.number must be unique for the bank
- accounts.balance amount represented as a string
- transactions.id must be unique for the account
- accounts.owners: at least one is required, and must be specified in the top level "users"
- generate_public_view: if this account and its data should be visible to anyone without authentication (some fields will be hidden)
- transactions.this_account: must be specified in the top level "accounts"
- transactions.counterparty: optional, but useful if specified.
- transactions.details.new_balance: represented as a string (the balance of the account after this transaction)
- transactions.details.value: represented as a string (the amount of the transaction, negative if money left the account, positive if it came in)
Once the data has been imported you can view it / manage it using: https://sofisandbox.openbankproject.com
If you have your own instance of the API, you can post this json to the following url:
POST /obp/vsandbox/v1.0/data-import?secret_token=CHANGE_ME HTTP/1.1
The secret token you can find in the API's props file, e.g. src/main/resources/props/default.props
. The property is named sandbox_data_import_secret
.
You also need to make sure that the request header Content-Type
is set to application/json
.
As stated above, afterwards you can check on the data via your custom instance of SoFi or the API Explorer.
If you are using an OBP Docker image e.g.: https://hub.docker.com/r/openbankproject/obp-full/
Follow the link to it's docker file e.g. https://github.com/OpenBankProject/OBP-Docker
and then the props e.g. https://github.com/OpenBankProject/OBP-Docker/blob/master/props/OBP-API.default.props
use the value in sandbox_data_import_secret for the "CHANGE_ME" value in the POST request above.
If you wish to sync your sandbox / OBP instance with an incoming source of transactions you have at least 3 choices:
to POST new transactions. You will need to set the following in your Props file: importer_secret=change_me
See this test for the json format required
See here. You can write your OBP Kafka connector in any language you like.