Skip to content

Count comments per entity

GET
/v1/comments/counts
curl --request GET \
--url 'https://api.varman.io/v1/comments/counts?entityType=task' \
--header 'X-API-Key: <X-API-Key>'

Returns how many comments each policy, task, vendor, risk or finding of one type has, keyed by entity ID. Use it to show comment counts on a list without loading every thread.

entityType
required
string
Allowed values: task vendor risk policy finding

Example

policy

Type of entity to count comments for

Media typeapplication/json
object
counts
required

Comment count keyed by entity ID. Entities without comments are omitted.

object
key
additional properties
number

Example

{
"counts": {
"pol_abc123": 3,
"pol_def456": 1
}
}