You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| * [Introduction to Dynamic Entities](https://vimeo.com/426524451)
2875
2875
| * [Features of Dynamic Entities](https://vimeo.com/446465797)
2876
2876
|
2877
+
""".stripMargin)
2878
+
2879
+
glossaryItems +=GlossaryItem(
2880
+
title ="Dynamic Entities",
2881
+
description =
2882
+
s"""
2883
+
|
2884
+
|Dynamic Entities allow you to create custom data structures and their corresponding CRUD endpoints at runtime without writing code or restarting the OBP-API instance.
2885
+
|
2886
+
|**Overview:**
2887
+
|
2888
+
|Dynamic Entities enable you to define custom business objects (entities) with their fields, types, and validation rules via API calls. Once created, OBP automatically generates fully functional REST API endpoints for Create, Read, Update, and Delete operations.
2889
+
|
2890
+
|**Types of Dynamic Entities:**
2891
+
|
2892
+
|1. **System Level Dynamic Entities** - Available across the entire OBP instance
2893
+
|2. **Bank Level Dynamic Entities** - Scoped to a specific bank
2894
+
|
2895
+
|**Creating a Dynamic Entity:**
2896
+
|
2897
+
|```json
2898
+
|POST /management/system-dynamic-entities
2899
+
|{
2900
+
| "hasPersonalEntity": true,
2901
+
| "CustomerPreferences": {
2902
+
| "description": "Customer preferences and settings",
|OBP generates ONLY the regular endpoints. No 'my' endpoints are created. Use this when the entity represents shared data that should not be user-scoped.
2949
+
|
2950
+
|**For bank-level entities**, endpoints include the bank ID:
2951
+
|
2952
+
|* POST /banks/BANK_ID/CustomerPreferences
2953
+
|* POST /banks/BANK_ID/my/CustomerPreferences (if hasPersonalEntity = true)
2954
+
|
2955
+
|**Auto-generated roles:**
2956
+
|
2957
+
|When you create a Dynamic Entity named 'FooBar', OBP automatically creates these roles:
2958
+
|
2959
+
|* CanCreateDynamicEntity_FooBar
2960
+
|* CanUpdateDynamicEntity_FooBar
2961
+
|* CanGetDynamicEntity_FooBar
2962
+
|* CanDeleteDynamicEntity_FooBar
2963
+
|
2964
+
|**Management endpoints:**
2965
+
|
2966
+
|* POST /management/system-dynamic-entities - Create system level entity
2967
+
|* POST /management/banks/BANK_ID/dynamic-entities - Create bank level entity
2968
+
|* GET /management/system-dynamic-entities - List all system level entities
2969
+
|* GET /management/banks/BANK_ID/dynamic-entities - List bank level entities
2970
+
|* PUT /management/system-dynamic-entities/DYNAMIC_ENTITY_ID - Update entity definition
2971
+
|* DELETE /management/system-dynamic-entities/DYNAMIC_ENTITY_ID - Delete entity (and all its data)
2972
+
|
2973
+
|**Required roles to manage Dynamic Entities:**
2974
+
|
2975
+
|* CanCreateSystemLevelDynamicEntity
2976
+
|* CanCreateBankLevelDynamicEntity
2977
+
|
2978
+
|**Use cases:**
2979
+
|
2980
+
|* Customer preferences and settings
2981
+
|* Custom metadata for accounts or transactions
2982
+
|* Business-specific data structures
2983
+
|* Rapid prototyping of new features
2984
+
|* Extension of core banking data model
2985
+
|
2986
+
|For user-scoped Dynamic Entities, see ${getGlossaryItemLink("My Dynamic Entities")}
2987
+
|
2988
+
|For more detailed information about managing Dynamic Entities, see ${getGlossaryItemLink("Dynamic Entity Intro")}
2989
+
|
2990
+
""".stripMargin)
2991
+
2992
+
glossaryItems +=GlossaryItem(
2993
+
title ="My Dynamic Entities",
2994
+
description =
2995
+
s"""
2996
+
|
2997
+
|My Dynamic Entities are user-scoped endpoints that are automatically generated when you create a Dynamic Entity with hasPersonalEntity set to true (which is the default).
2998
+
|
2999
+
|**How it works:**
3000
+
|
3001
+
|1. Create a Dynamic Entity definition (System or Bank Level) with hasPersonalEntity = true
3002
+
|2. OBP automatically generates both regular CRUD endpoints AND 'my' endpoints
3003
+
|3. The 'my' endpoints only return data created by the authenticated user
3004
+
|
3005
+
|**Example workflow:**
3006
+
|
3007
+
|**Step 1:** Create a Dynamic Entity definition
3008
+
|
3009
+
|```json
3010
+
|POST /management/system-dynamic-entities
3011
+
|{
3012
+
| "hasPersonalEntity": true,
3013
+
| "CustomerPreferences": {
3014
+
| "description": "User preferences",
3015
+
| "required": ["theme"],
3016
+
| "properties": {
3017
+
| "theme": {"type": "string"},
3018
+
| "language": {"type": "string"}
3019
+
| }
3020
+
| }
3021
+
|}
3022
+
|```
3023
+
|
3024
+
|**Step 2:** Use the auto-generated 'my' endpoints:
3025
+
|
3026
+
|* POST /my/CustomerPreferences - Create my preference
3027
+
|* GET /my/CustomerPreferences - Get all my preferences
3028
+
|* GET /my/CustomerPreferences/ID - Get one of my preferences
3029
+
|* PUT /my/CustomerPreferences/ID - Update my preference
3030
+
|* DELETE /my/CustomerPreferences/ID - Delete my preference
0 commit comments