Skip to main content

Call Detail Records

๐Ÿ“˜ Looking for live/real-time queue, agent or call-level data? See Work Analytics โ€” Overview.

๐Ÿ“˜ Updated Endpoint

The Call Legs and Call Detail Records are dedicated endpoints to replace the previous Call Detail Record Legs endpoint which served both purposes

๐Ÿ“˜

Note: This API provides access to data from the past 2 years only in accordance with Analytics for Work data compliance policies; queries spanning more than 2 years will return only the most recent 2 years of data, and queries outside this range will return no results

Call Records Explainedโ€‹

A Call Record is a single record view of the overall call and metrics represented by a single Call ID.

Example: A Call Record would be a single row representation of a call that follows the following path which would have multiple Call Legs to fully represent the journey.

  • Inbound to an Auto Attendant
  • Transferred to Ring Group
  • Simultaneous calls to 5 Ring Group members (Leg per member contacted regardless of outcome)
  • Answered by one of the members

8x8 Work Analytics Historical access is via this multi step process. For any of the endpoints the same process is followed.

๐Ÿ“˜ You will need a working API key to begin

You can generate API credentials from How to get API Keys

The 8x8-api-key will be the Key generated. For Work Analytics the Secret from Admin Console is not required.

Use the following base URL during this process:

  • https://api.8x8.com/analytics/work

Run Reportโ€‹

Parametersโ€‹

Method: GET

Headersโ€‹

NameRequiredDescriptionExample
Authorizationโœ“Pass the access_token returned from the authentication request as a Bearer token Bearer {access_token}Bearer eyJhbGciOiJSUzI1NiJ9.yyyyyyy.zzzzzzzzzzz

Pathโ€‹

NameRequiredDescriptionExample
versionโœ“The current version for /call-records is v2v2

Queryโ€‹

NameRequiredDescriptionExample
pbxIdโœ“Pass the pbxId (PBX Name) of the requested pbx or comma separated list of pbxIds or allpbxes for all of the pbxs in the customer account. PBX names can be found here in Admin Consoleacmecorp,acmecorp2
startTimeโœ“The interval start time for CDR searches - the format is YYYY-MM-DD HH:MM:SS.2022-10-20 08:30:00
endTimeโœ“The interval end time for CDR searches - the format is YYYY-MM-DD HH:MM:SS.2022-10-20 19:00:00
timeZoneโœ“IANA Time Zones. Examples America/New_York, Europe/London Wikipedia Time Zone ListAmerica/New_York
pageSizeโœ“Number of records to return in pages See Pagination. Must be50
scrollIdโ˜/โœ“Not required for initial page required on subsequent pages. See Pagination

Call Records Requestโ€‹

As per the Open API specification guidelines, we have migrated the URLs for Call Record Report as give in the below table

Deprecated URL VersionMigrated URL (Current version)
v1/cdr?isCallRecord= truev2/call-records

๐Ÿ“˜ Try out the CDR Records Request

You can check out CDR Records Reference but currently this one can't be tested from the Reference.

curl --location --request GET 'https://api.8x8.com/analytics/work/v{version}/call-records?pbxId={{pbxId here}}&startTime=2022-02-03 00:00:00&endTime=2022-02-03 10:00:00&timeZone=America/New_York&pageSize=50' \
--header 'Authorization: Bearer {access_token here}' \
--header '8x8-apikey: {8x8-apikey input here}'

Call Records Responseโ€‹

For details on call-records metrics please refer toCDR Glossary and Details

{
"meta": {
"totalRecordCount": 2,
"scrollId": "c3VwZXJ0ZW5hbnRjc21fMTYzNTU3MTA0ODM0NV8xNjQzODk3NDkyODk3"
},
"data": [
{
"dnis": "12025555720",
"aaDestination": null,
"callId": "1635571048351",
"startTimeUTC": 1643898447493,
"startTime": "2022-02-03T09:27:27.493-0500",
"connectTimeUTC": 0,
"connectTime": "0",
"disconnectedTimeUTC": 1643898472253,
"disconnectedTime": "2022-02-03T09:27:52.253-0500",
"talkTimeMS": 0,
"talkTime": "00:00:00",
"caller": "+15555551220",
"callerName": "MARK SMITH",
"callee": "120088",
"calleeName": "Jane Li",
"direction": "Incoming",
"callerId": "MARK SMITH,+15555551220",
"missed": "Missed",
"abandoned": "-",
"answered": "-",
"answeredTime": 0,
"calleeDisconnectOnHold": "",
"callerDisconnectOnHold": "",
"pbxId": "acmecorppbx",
"sipCallId": "user@example.com",
"lastLegDisposition": "Voicemail",
"callLegCount": "1",
"callTime": 24760,
"ringDuration": 39,
"abandonedTime": 0,
"calleeHoldDurationMS": 0,
"calleeHoldDuration": "00:00:00",
"waitTimeMS": 0,
"waitTime": "00:00:00",
"departments": [
"Sales Engineering"
],
"branches": [
"Central"
]
},
{
"dnis": "15554441212",
"aaDestination": null,
"callId": "1635571048345",
"startTimeUTC": 1643897492897,
"startTime": "2022-02-03T09:11:32.897-0500",
"connectTimeUTC": 0,
"connectTime": "0",
"disconnectedTimeUTC": 1643899189421,
"disconnectedTime": "2022-02-03T09:39:49.421-0500",
"talkTimeMS": 0,
"talkTime": "00:00:00",
"caller": "+15551234567",
"callerName": "15551234567",
"callee": "CallQueue",
"calleeName": "Test Queue",
"direction": "Incoming",
"callerId": "15551234567,+15551234567",
"missed": "Missed",
"abandoned": "Abandoned",
"answered": "-",
"answeredTime": 0,
"calleeDisconnectOnHold": "",
"callerDisconnectOnHold": "",
"pbxId": "acmecorppbx",
"sipCallId": "user@example.com",
"lastLegDisposition": "Missed",
"callLegCount": "1",
"callTime": 1696524,
"ringDuration": 197,
"abandonedTime": 1696524,
"calleeHoldDurationMS": 0,
"calleeHoldDuration": "00:00:00",
"waitTimeMS": 1696320,
"waitTime": "00:28:16",
"departments": [
"East Office"
],
"branches": [
"East Coast"
]
}
]
}

๐Ÿ‘ Follow the pagination steps below to retrieve subsequent pages.

Paginationโ€‹

Within Work Analytics Only the /call-records and /call-legs endpoints are subject to pagination.

This is controlled by pageSize and scrollId

  • pageSize is the number of records to return per page and is required for /call-records
  • scrollId is returned from /call-records requests providing an id for the next page of results.

Pagination Example

Assuming there will be 81 records in total. With an initial input of pageSize=50 the returned meta data will be as follows.

Note: data has been truncated to an empty array to limit the size of the example text

{

"meta": {
"totalRecordCount": 81,
"scrollId": "c3VwZXJ0ZW5hbnRjc21fMTYzNTU3MTA0ODQ4Nl8xXzE2NDM5MTIzNTI0NDE"
},
"data": [
]
}

The request for the next page would include scrollId set as the value returned in the previous request pageKey=50&scrollId=c3VwZXJ0ZW5hbnRjc21fMTYzNTU3MTA0ODQ4Nl8xXzE2NDM5MTIzNTI0NDE

The new result set would look as follows. The returned result set would only have 31 elements.

{
"meta": {
"totalRecordCount": 81,
"scrollId": "c3VwZXJ0ZW5hbnRjc21fMTYzNTU3MTA0ODM0NV8xXzE2NDM4OTc0OTI5MDM"
},
"data": [
]
}

The request for the next page would be pageKey=50&scrollId=c3VwZXJ0ZW5hbnRjc21fMTYzNTU3MTA0ODM0NV8xXzE2NDM4OTc0OTI5MDM the scrollId has been set to the value returned in the previous request

{
"meta": {
"totalRecordCount": 0,
"scrollId": "No Data"
},
"data": []
}