Get entity schema

Changed on

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Returns one entity's JSON Schema.

Pass User as the entity_name to read the custom fields added to the built-in user entity.

Set branch_id to read the schemas a branch uses: main's schemas plus the entities and fields the branch adds. A branch can only add, so required, rls and the fields main already has always come from main. The branch's changes reach main when you merge the branch. On an app imported from GitHub, a branch always reads main's schemas.

get/api/apps/{app_id}/entity-schemas/{entity_name}

Request

  • Base URL: https://app.base44.com
  • URL: https://app.base44.com/api/apps/{app_id}/entity-schemas/{entity_name}
  • Auth: HTTP bearer

Path parameters

entity_namestring required

Name of the entity, as returned by List entity schemas. Pass User for the built-in user entity.

app_idstring required

ID of the app whose entity schemas you want to work with.

Query parameters

branch_idstring

ID of the branch to work on, as returned by List branches. Omit it to work on the app's main branch.

Response

Successful Response

object required

The entity's stored JSON Schema, including its properties, required fields, and any row-level security rules under rls. For the app's own entities it also carries a name key holding the entity name. For User it holds only the custom fields added on top of the built-in ones, and has no name key.

Changes

    • breaking

      query request parameter branch_id list-of-types was narrowed by removing types null

    • info

      for the query request parameter branch_id, the type was generalized from no type to string

    • info

      added the new optional query request parameter branch_id