Retrieve aggregated activity by date range grouped by time periods

Prev Next
Post
/v2/stats/activity/aggregate-by-period

Returns aggregated statistics for team members? actions on calls in Gong, grouped by the specified time period (aggregationPeriod). Each record shows the total number of activities performed within the fromDate?toDate range. If the same activity occurs in different periods, it?s counted separately. For example, if a team member listens to the same call on two different days, each day counts as one; listening to the same call twice on the same day counts as a single activity. Use the userIds field to retrieve data for specific team members. If userIds is empty, only team members with activity in the specified date range are returned.

When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:stats:user-actions'.

Body parameters
Expand All
object
cursor
string

The records.cursor value from the previous response. Provide it to get the next page of results.

ExampleeyJhbGciOiJIUzI1NiJ9.eyJjYWxsSWQiM1M30.6qKwpOcvnuweTZmFRzYdtjs_YwJphJU4QIwWFM
filter
object (MultipleUsersWithDates) Required

Filter parameters.

fromDate
string Required

The date (in the company's time zone) from which to list a user's activity. This value is inclusive. The date should be specified in the following format: YYYY-MM-DD.

Example2019-01-20
toDate
string Required

The date (in the company's time zone) until which to list a user's activity. This value is exclusive. This value should not exceed the current day. The date should be specified in the following format: YYYY-MM-DD.

Example2019-01-21
createdToDateTime
string (date-time)
createdFromDateTime
string (date-time)
userIds
Array of string

Set of Gong's unique numeric identifiers for the users (up to 20 digits).

Unique itemstrue
Example[ "234599484848423" ]
string
aggregationPeriod
string Required

Calendar time period for aggregating data. Note: First day of the week is Monday.

Valid values[ "DAY", "WEEK", "MONTH", "QUARTER", "YEAR" ]
ExampleDAY
Responses
200

Successful response

Expand All
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
records
object (Records)

Data about the results returned.

totalRecords
integer (int32)

The total number of results that match the request.

Example263
currentPageSize
integer (int32)

The number of results on this page.

Example100
currentPageNumber
integer (int32)

The page number. The first page is 0.

Example0
cursor
string

The value to send as cursor in your next request, to get the next page. Returned only when there are more results.

ExampleeyJhbGciOiJIUzI1NiJ9.eyJjYWxsSWQiM1M30.6qKwpOcvnuweTZmFRzYdtjs_YwJphJU4QIwWFM
usersAggregateActivity
Array of object (UserAggregateByPeriodActivities)

A list, in which each item contains details of one user's activities.

object

A list, in which each item contains details of one user's activities.

userId
string

The Gong user ID of the user the statistics are for. Up to 20 digits.

Example234599484848423
userEmailAddress
string

The email address of the Gong user.

Exampletest@test.com
userAggregateActivity
Array of object (AggregateActivityWithDates)

A list, in which each item contains aggregate user activity for consecutive time periods in the date range.

object

Aggregated activity for a user within a time period

callsAsHost
integer (int32)

The number of recorded calls this user hosted.

Example20
callsGaveFeedback
integer (int32)

The number of recorded calls the user gave feedback on.

Example35
callsRequestedFeedback
integer (int32)

The number of recorded calls the user requested feedback on.

Example77
callsReceivedFeedback
integer (int32)

The number of recorded calls the user received feedback on.

Example67
ownCallsListenedTo
integer (int32)

The number of the user's own calls the user listened to.

Example668
othersCallsListenedTo
integer (int32)

The number of other users' calls the user listened to.

Example96
callsSharedInternally
integer (int32)

The number of calls the user shared with others inside the company.

Example478
callsSharedExternally
integer (int32)

The number of calls the user shared with others outside the company.

Example75
callsScorecardsFilled
integer (int32)

The number of scorecards the user completed.

Example876
callsScorecardsReceived
integer (int32)

The number of calls in which someone filled a scorecard on the user's calls.

Example876
callsAttended
integer (int32)

The number of calls in which this user is participant (not host).

Example46
callsCommentsGiven
integer (int32)

The number of calls in which a user gave at least one comment.

Example21
callsCommentsReceived
integer (int32)

The number of calls in which a user received at least one comment on the users calls.

Example13
callsMarkedAsFeedbackGiven
integer (int32)

The number of calls in which someone pressed the "Mark as reviewed".

Example24
callsMarkedAsFeedbackReceived
integer (int32)

The number of calls in which someone pressed the ?Mark as reviewed? on the users calls.

Example35
fromDate
string

The start of the period, or the request filter's fromDate for the first period in the range, in the ISO-8601 format, for example: '2024-01-17T16:20:05-03:00' or '2016-02-16T03:57:04.834+05:30' or '2020-11-20T21:30:07.233692Z', where Z stands for UTC.

Example2019-01-20T00:00:00-08:00
toDate
string

The end of the period, or the request filter's toDate for the last period in the range, in the ISO-8601 format, for example: '2024-01-17T16:20:05-03:00' or '2016-02-16T03:57:04.834+05:30' or '2020-11-20T21:30:07.233692Z', where Z stands for UTC.

Example2019-01-21T000:00:00-08:00
400

Malformed request

object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
401

Access denied

object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
404

User not found

object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
429

API request limit exceeded

Headers
Retry-After
integer (int32)
Number of seconds to wait before making a new request.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
500

Failed to complete the operation due to an unexpected error

object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string