NetSapiens icon

NetSapiens

Interact with the NetSapiens API

Actions477

CDR (Call History) → Count Cdrs and SUM Minutes for Specifc User

AI-generated

Summary

Count CDRs and sum minutes for a specific user

Inputs

  • refreshOptions — Whether to bypass cached dropdown values and fetch fresh options
  • GetDomainsByUsersByCdrsCount__path__domain (required) —
  • GetDomainsByUsersByCdrsCount__path__user (required) —
  • GetDomainsByUsersByCdrsCount__query__datetime-start (required) —
  • GetDomainsByUsersByCdrsCount__query__datetime-end (required) —
  • GetDomainsByUsersByCdrsCount__query__type — Options include Inbound, Outbound, On-net, Off-net, Missed, Received, or integer type 0,1,2,3

Output shape

object with cdrCount (integer) and totalMinutes (number)

Returns a single record; fields may be null if no matching CDRs.

Examples

Example 1: Count inbound CDRs for user 1001 between 2023-01-01 and 2023-01-31

User id=1001; Datetime Start=2023-01-01T00:00:00Z; Datetime End=2023-01-31T23:59:59Z; Type=Inbound; Refresh Dropdown Cache=false

Example 2: Sum minutes for all users in domain example.com on 2023-02-01

Domain list=example.com; Datetime Start=2023-02-01T00:00:00Z; Datetime End=2023-02-01T23:59:59Z; Type left blank

Example 3: Get totals for multiple users across a date range, using fresh cache

Select multiple users; Datetime Start and End as needed; Refresh Dropdown Cache=true

Links

Discussion