Count entity records

<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.

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.

get/api/apps/{app_id}/entities/{entity_name}/count

Path parameters

entity_namestring required

Name of the entity, exactly as List entity schemas reports it.

Name of the entity, exactly as List entity schemas reports it.

app_idstring required

ID of the app whose entity records you want to count.

ID of the app whose entity records you want to count.

Response

Successful Response

countinteger required

Number of records you can read in this entity.

Example response

{
  "count": 128
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.