Skip to main content

count()

Count total records in the service.

const { data, error } = await kontenbase.service('posts').count()

Response

NameTypeDescription
res.dataobjectResponse for data
res.statusnumberResponse for status code
res.statusTextstringResponse for status message
res.errorobjectResponse for error occurred
note

Count records with filters:

const { data, error } = await kontenbase.service('posts').count({
"name": "Ega",
})