List entity schemas
Changed on<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
Returns every entity schema the app defines, plus the built-in User entity when it has custom fields.
To read one schema on its own, use Get entity schema.
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.
Request
- Base URL: https://app.base44.com
- URL: https://app.base44.com/api/apps/{app_id}/entity-schemas
- Auth: HTTP bearer
Path parameters
ID of the app whose entity schemas you want to work with.
Query parameters
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
Example response
{
"schemas": [
{
"entity_name": "Invoice",
"entity_schema": {
"name": "Invoice",
"properties": {
"amount": {
"description": "Total amount in cents",
"type": "number"
},
"status": {
"enum": [
"draft",
"sent",
"paid"
],
"type": "string"
}
},
"required": [
"amount"
],
"rls": {
"read": {
"created_by": "{{user.email}}"
}
},
"type": "object"
}
},
{
"entity_name": "User",
"entity_schema": {
"properties": {
"department": {
"type": "string"
},
"employee_id": {
"type": "string"
}
},
"type": "object"
}
}
],
"total": 2
}Changes
- breaking
queryrequest parameterbranch_idlist-of-types was narrowed by removing typesnull - info
for the
queryrequest parameterbranch_id, the type was generalized from no type tostring
- breaking
- info
added the new optional
queryrequest parameterbranch_id
- info