Update System Level Dynamic Entity
PUT /obp/v7.0.0/management/system-dynamic-entities/DYNAMIC_ENTITY_ID
OBPv6.0.0-updateSystemDynamicEntity Roles: CanUpdateDynamicEntityDefinition(per bank) Dynamic-Entity-ManageAPI
Update a system level Dynamic Entity.
This v6.0.0 endpoint accepts and returns snake_case field names with an explicit entity_name field.
Request format:
{
"entity_name": "customer_preferences",
"has_personal_entity": true,
"has_public_access": false,
"has_community_access": false,
"personal_requires_role": false,
"use_row_level_access": false,
"schema": {
"description": "User preferences updated",
"required": ["theme"],
"properties": {
"theme": {"type": "string", "minLength": 1, "maxLength": 20, "example": "dark", "description": "The UI theme preference", "indexed": true},
"language": {"type": "string", "minLength": 2, "maxLength": 5, "example": "en", "description": "ISO language code"},
"notifications_enabled": {"type": "boolean", "example": "true", "description": "Whether to send notifications"}
}
}
}
Note:
- The
entity_namemust be lowercase with underscores (snake_case), e.g.customer_preferences. No uppercase letters or spaces allowed. - Each property can optionally include
description(markdown text), and for string types:minLengthandmaxLength. - Each property can optionally be marked queryable with
"indexed": true— only indexed fields may be used in the list endpoint's filter/sort query parameters (and areference:<Entity>field must be indexed to form a join edge). Add"index": "spatial"for a GeoJSON geometry index (only valid on ajsonfield); the default when omitted is"index": "scalar"(B-tree). - Each property can optionally declare field-level access control:
write_role_required/read_role_required(booleans — auto-generate a per-field role) orwrite_role/read_role(name an explicit, shareable role). Write-restricted fields are not set via POST/PUT (their existing value is preserved) and are written only via the role-gated PATCH path; read-restricted fields are omitted from GET for callers lacking the read role.hide_field_from_public_access(boolean) hides a field of a public entity from callers whose access comes only from its public access, while callers holding the entity's read role still see it. - Set
has_public_accesstotrueto generate read-only public endpoints (GET only, no authentication required) under/public/. - Set
auth_modeto say who may hold the roles that guard the entity's data endpoints:UserOnly(default, the User's Entitlements),ApplicationOnly(the Consumer's Scopes),UserOrApplication(either) orUserAndApplication(both). Personal (/my/) endpoints always require a User. An entity withhas_personal_entitycannot beApplicationOnly. - Set
has_community_accesstotrueto generate read-only community endpoints (GET only, authentication required + CanGet role) under/community/. Community endpoints return ALL records (personal + non-personal from all users). - Set
personal_requires_roletotrueto require the corresponding role (e.g. CanCreateDynamicEntity_, CanGetDynamicEntity_) for/my/personal entity endpoints. Default isfalse(any authenticated user can use/my/endpoints). - Set
use_row_level_accesstotrueto decide read, update, delete and grant per record with an access list, in place of the entity's Get, Update and Delete roles. The User who creates a record holds all four permissions on it and shares it withGET/PUT /obp/dynamic-entity/ENTITY_NAME/RECORD_ID/access(a body ofuser_id,can_read,can_update,can_delete,can_grant) andDELETE /obp/dynamic-entity/ENTITY_NAME/RECORD_ID/access/USER_ID; revoking cascades to the grants that user passed on. Records the caller may not read are omitted from list responses and return 404 individually. Creating a record still needs the entity's Create role,CanGrantDynamicEntityRowAccess_<Entity>administers the access list of any record, and field-level read and write roles still apply on top. It cannot be combined withhas_public_accessorhas_community_access, and is only supported for locally-backed entities.
For more information see here and here
User Authentication is Required. The User must be logged in. The Application must also be authenticated.
Example request body
{
"entity_name": "customer_preferences",
"has_personal_entity": true,
"has_public_access": false,
"use_row_level_access": false,
"schema": {
"description": "User preferences updated",
"required": [
"theme"
],
"properties": {
"theme": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"example": "dark",
"description": "The UI theme preference",
"indexed": true
},
"language": {
"type": "string",
"minLength": 2,
"maxLength": 5,
"example": "en",
"description": "ISO language code"
},
"notifications_enabled": {
"type": "boolean",
"example": "true",
"description": "Whether to send notifications"
}
}
}
}Example success response
{
"dynamic_entity_id": "abc-123-def",
"entity_name": "customer_preferences",
"user_id": "user-456",
"has_personal_entity": true,
"has_public_access": false,
"has_community_access": false,
"personal_requires_role": false,
"use_row_level_access": false,
"auth_mode": "UserOnly",
"schema": {
"description": "User preferences updated",
"required": [
"theme"
],
"properties": {
"theme": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"example": "dark",
"description": "The UI theme preference",
"indexed": true
},
"language": {
"type": "string",
"minLength": 2,
"maxLength": 5,
"example": "en",
"description": "ISO language code"
},
"notifications_enabled": {
"type": "boolean",
"example": "true",
"description": "Whether to send notifications"
}
}
}
}Possible errors (5)
- OBP-20001: User not logged in. Authentication is required!
- OBP-20006: User is missing one or more roles:
- OBP-10001: Incorrect json format.
- OBP-09032: This would make a path ambiguous in its space. The Dynamic Entities and Dynamic Resource Docs of a space share one set of paths, which a Domain API can publish under its base path at any time, and a Domain API reads a hyphen in an entity name as an underscore, so a Dynamic Resource Doc's path may not start with a path variable, with my, public, community, openapi.json or openapi.yaml, or with the name of one of the space's Dynamic Entities in either spelling (like-this or like_this); a Dynamic Entity may not be named my, public, community, openapi.json or openapi.yaml, nor after the first segment of one of the space's Dynamic Resource Docs, nor so that it differs from another of the space's Dynamic Entities only by hyphens for underscores; and two Dynamic Resource Docs of one verb may not both match one request. Rename one of them:
- OBP-50000: Unknown Error.