Count entity records
Changed on<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
Returns how many production records an entity holds, optionally narrowed by a filter.
Pass the same q filter List entity records accepts to count a subset, for example {"status": "open"}. The count covers the records the calling credential can read, so an entity whose row-level security rules narrow reads returns a smaller number than the entity actually holds. An entity with no rls rules returns its full count.
Don't pass User as the entity_name. To count the app's users, use Count app users instead.
Request
- Base URL: https://app.base44.com
- URL: https://app.base44.com/api/apps/{app_id}/entities/{entity_name}/count
- Auth: HTTP bearer
Path parameters
Name of the entity, exactly as List entity schemas reports it. Don't pass User here. It doesn't fail, but it reads and writes a separate, disconnected set of records stored under that name, not the app's real user accounts, which are managed through their own endpoints.
ID of the app that owns the entity.
Query parameters
Optional filter, a JSON object in the same form as q on List entity records.
Response
Successful Response
Example response
{
"count": 128
}Changes
- breaking
queryrequest parameterqlist-of-types was narrowed by removing typesnull - info
for the
queryrequest parameterq, the type was generalized from no type tostring
- breaking
- info
the endpoint scheme security
PersonalAccessTokenAuthwas added to the API
- info