API Explorer 993 endpoints

Update My Dynamic Entity

PUT /obp/v7.0.0/my/dynamic-entities/DYNAMIC_ENTITY_ID

OBPv6.0.0-updateMyDynamicEntity No role required Dynamic-Entity-ManageAPI

Update a Dynamic Entity that I created.

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_name must 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: minLength and maxLength.
  • 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 a reference:<Entity> field must be indexed to form a join edge). Add "index": "spatial" for a GeoJSON geometry index (only valid on a json field); 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) or write_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_access to true to generate read-only public endpoints (GET only, no authentication required) under /public/.
  • Who may use the entity's data endpoints is set by its Roles: a person needs a Role as an Entitlement. An application acting as itself needs it as a Scope, and its Consumer must be a Platform App.
  • Set has_community_access to true to 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_role to true to require the corresponding role (e.g. CanCreateDynamicEntity_, CanGetDynamicEntity_) for /my/ personal entity endpoints. Default is false (any authenticated user can use /my/ endpoints).
  • Set use_row_level_access to true to 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. They share it with GET/PUT /obp/dynamic-entity/ENTITY_NAME/RECORD_ID/access, with a body naming a user_id or an organisation_id and the four permissions. They take access away with DELETE /obp/dynamic-entity/ENTITY_NAME/RECORD_ID/access/USER_ID or .../access/organisations/ORGANISATION_ID. Revoking a User also removes the grants that User passed on. A grant to an Organisation applies to its members while it is active, so access follows membership. 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 with has_public_access. It can be combined with has_community_access: a holder of the entity's Get role then reads every record through the community URL, while everyone else reads only the records shared with them. It 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,
  "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 (4)
  • OBP-20001: User not logged in. Authentication is required!
  • 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.
Implemented by OBPv6.0.0 updateMyDynamicEntity Originally /obp/v6.0.0/my/dynamic-entities/DYNAMIC_ENTITY_ID