Dynamic-Entity-Intro
Dynamic Entities can be used to store and retrieve custom data objects (think your own tables and fields) in the OBP instance.
You can define your own Dynamic Entities or use Dynamic Entities created by others.
You would use Dynamic Entities if you want to go beyond the OBP standard data model and store custom data structures. Note, if you want to extend the core OBP banking model of Customers, Products, Accounts, Transactions and so on you can also add Custom Attributes to these standard objects.
You would use Dynamic Endpoints if you want to go beyond the standard OBP or other open banking standard APIs.
Dynamic Entities have their own REST APIs so you can easily Create, Read, Update and Delete records. However, you can also connect Dynamic Endpoints with your own API definitions (via Swagger) and so create custom GET endpoints connecting to any combination of Dynamic Entities.
Dynamic Endpoints can retrieve the data of Dynamic Entities so you can effectively create bespoke endpoint / data combinations - at least for GET endpoints - using Dynamic Endpoints, Entities and Endpoint Mapping.
In order to use Dynamic Entities you will need to have the appropriate Entitlements to Create, Read, Update or Delete records in the Dynamic Entity.
You define your Dynamic Entities in JSON.
Fields are typed, have an example value and a (markdown) description. They can also be constrained in size.
You can also create field "references" to other fields in other Entities. These are like foreign keys to other Dynamic or Static (built in) entities. In other words, if you create an Entity called X which has a field called A, you can force the values of X.A to match the values of Y.B where Y is another Dynamic Entity or Z.B where Z is a Static (OBP) Entity. If you want to add data to an existing Entity, you can create a Dynamic Entity which has a reference field to the existing entity.
Dynamic Entities can be created at the System level (bank_id is null) - or Bank / Space level (bank_id is not null). You might want to create Bank level Dynamic Entities in order to grant automated roles based on user email domain.
When creating a Dynamic Entity, OBP automatically:
- Creates a data structure in the OBP database in which to store the records of the new Entity.
- Creates a primary key for the Entity which can be used to update and delete the Entity.
- Creates Create, Read, Update and Delete endpoints to operate on the Entity so you can insert, get, modify and delete records. These CRUD operations are all available over the generated REST endpoints.
- Creates Roles to guard the above endpoints.
Following the creation of a Dynamic Entity you will need to grant yourself or others the appropriate roles before you can insert or get records.
The generated Roles required for CRUD operations on a Dynamic Entity are like any other OBP Role i.e. they can be requested, granted, revoked and auto-granted using the API Explorer / API Manager or via REST API. To see the Roles required for a Dynamic Entities endpoints, see the API Explorer for each endpoint concerned.
Each Dynamic Entity gets a dynamicEntityId which uniquely identifies it and also the userId which identifies the user who created the Entity. The dynamicEntityId is used to update the definition of the Entity.
To visualise any data contained in Dynamic Entities you could use external BI tools and use the GET endpoints and authenticate using OAuth or Direct Login.
The following videos are available:
* [Introduction to Dynamic Entities](https://vimeo.com/426524451)
* [Features of Dynamic Entities](https://vimeo.com/446465797)