Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Work Historical Analytics API
version: 8-x-8-Latest
servers:
- url: https://api.8x8.com/analytics/work/
security:
- 8x8-apikey: []
tags:
- name: Analytics
paths:
/v2/call-legs:
get:
security:
- 8x8-apikey: []
bearerAuth: []
tags:
- Analytics
summary: Call Detail Record Legs
description: The Analytics for 8x8 Work Call Detail Record (CDR) Legs endpoint enables you to see the entire journey for a subject call from start to finish across multiuple legs. See [CDR Glossary](https://docs.8x8.com/8x8WebHelp/8x8analytics-virtual-office/Content/VOA/call-detail-record.htm) for details. For a single row per call use the [Call Detail Records](/analytics/reference/call-detail-records) endpoint
operationId: call-detail-record-legs
parameters:
- name: pbxId
in: query
description: PBX Id for the request or allpbxes for all pbxs in the customer account
required: true
schema:
type: string
- name: startTime
in: query
description: The interval start time for CDR searches - the format is YYYY-MM-DD HH:MM:SS
required: true
schema:
type: string
- name: endTime
in: query
description: The interval end time for CDR searches - the format is YYYY-MM-DD HH:MM:SS.
required: true
schema:
type: string
- name: timeZone
in: query
description: IANA Time Zone https://www.iana.org/time-zones. Examples America/New_York, Europe/London
required: true
schema:
type: string
- name: pageSize
in: query
description: The number of records to return per page (the maximum value is 7000)
required: true
schema:
type: integer
format: int32
default: 100
- name: caller
in: query
description: This is optional, multivalued and exact match filter. Only extensions are supported as of now. (maximum 125 values are allowed) This is not allowed to use with param callerOrCallee. For example, caller=8923,329899
schema:
type: string
- name: callee
in: query
description: This is optional, multivalued and exact match filter. Only extensions are supported as of now. (maximum 125 values are allowed) This is not allowed to use with param callerOrCallee. For example, callee=8923,329899
schema:
type: string
- name: callerOrCallee
in: query
description: This is optional, multivalued and exact match filter. Only extensions are supported as of now. (maximum 125 values are allowed) This is not allowed to use with caller or callee param. For example callerOrCallee=8923,329899
schema:
type: string
- name: scrollId
in: query
description: The scrollId parameter returned from your previous call. You can include this parameter in your next or subsequent calls to retrieve the next page of records.
schema:
type: string
- name: isConnectTime
in: query
description: This parameter enables you to get your results based on either connect time or disconnect time.
schema:
type: boolean
- name: isSimplified
in: query
description: '(For Call Legs method only) This parameter returns simplified CDRs if true; the default value is false. The simplified flag does not affect the structure of the returned CDR data as it will still have all of the same fields. The isSimplified parameter reduces the number of records returned in two ways: Child calls are not returned. For example, child calls are the ones the service makes to one or more agents when a call comes into a call queue or a ring group. Some call legs are omitted. For example, the removal of Call Forking and Call Recording legs.'
schema:
type: boolean
default: false
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"meta\": {\n \"totalRecordCount\": 2,\n \"scrollId\": \"c3VwZXJ0ZW5hbnRjc21fMTYzNTU3MTA0ODM0NV8xXzE2NDM4OTc0OTI5MDM\"\n },\n \"data\": [\n {\n \"callId\": \"1635571048351\",\n \"legId\": \"1\",\n \"startTimeUTC\": 1643898447499,\n \"startTime\": \"2022-02-03T09:27:27.499-0500\",\n \"connectTimeUTC\": 1643898447539,\n \"connectTime\": \"2022-02-03T09:27:27.539-0500\",\n \"disconnectedTimeUTC\": 1643898472253,\n \"disconnectedTime\": \"2022-02-03T09:27:52.253-0500\",\n \"talkTimeMS\": 0,\n \"talkTime\": \"00:00:00\",\n \"caller\": \"+15555551211\",\n \"callerName\": \"John Smith\",\n \"callee\": \"Voicemail (120088)\",\n \"calleeName\": \"Jane Li\",\n \"lra\": \"120088\",\n \"direction\": \"Incoming\",\n \"parentCallId\": null,\n \"transferToCallId\": null,\n \"dnis\": \"12029325720\",\n \"status\": \"Completed\",\n \"callerDeviceId\": null,\n \"calleeDeviceId\": null,\n \"callerDeviceModel\": \"\",\n \"calleeDeviceModel\": \"\",\n \"callerId\": \"John Smith,+15555551211\",\n \"missed\": \"Missed\",\n \"abandoned\": \"-\",\n \"answered\": \"-\",\n \"cause\": \"Ring No Answer\",\n \"callerSvcName\": null,\n \"callerSvcType\": null,\n \"calleeSvcName\": \"VMadvanced\",\n \"calleeSvcType\": \"Custom\",\n \"lraType\": 1,\n \"calleeHoldDurationMS\": 0,\n \"calleeHoldDuration\": \"00:00:00\",\n \"calleeDisconnectOnHold\": \"\",\n \"callerDisconnectOnHold\": \"\",\n \"pbxId\": \"demonstrationname\",\n \"sipCallId\": \"170437510_134011744@206.147.76.5\",\n \"departments\": [\n \"Sales Engineering\"\n ],\n \"branches\": [\n \"Central\"\n ],\n \"recordServiceOn\": \"\",\n \"bargeServiceOn\": \"\",\n \"masterSlaveExts\": \"\",\n \"propsLastPartyDisp\": \"Voicemail\",\n \"accountCode\": \"\",\n \"aaPath\": \"\",\n \"callTime\": 24754\n },\n {\n \"callId\": \"1635571048345\",\n \"legId\": \"1\",\n \"startTimeUTC\": 1643897492903,\n \"startTime\": \"2022-02-03T09:11:32.903-0500\",\n \"connectTimeUTC\": 1643897493100,\n \"connectTime\": \"2022-02-03T09:11:33.100-0500\",\n \"disconnectedTimeUTC\": 1643899189420,\n \"disconnectedTime\": \"2022-02-03T09:39:49.420-0500\",\n \"talkTimeMS\": 0,\n \"talkTime\": \"00:00:00\",\n \"caller\": \"+15555556262\",\n \"callerName\": \"15555556262\",\n \"callee\": \"110081\",\n \"calleeName\": \"Sales Queue\",\n \"lra\": \"110081\",\n \"direction\": \"Incoming\",\n \"parentCallId\": null,\n \"transferToCallId\": null,\n \"dnis\": \"13129837120\",\n \"status\": \"Completed\",\n \"callerDeviceId\": null,\n \"calleeDeviceId\": null,\n \"callerDeviceModel\": \"\",\n \"calleeDeviceModel\": \"\",\n \"callerId\": \"15555556262,+15555556262\",\n \"missed\": \"Missed\",\n \"abandoned\": \"Abandoned\",\n \"answered\": \"-\",\n \"cause\": \"Normal\",\n \"callerSvcName\": null,\n \"callerSvcType\": null,\n \"calleeSvcName\": \"ACDOperatorService\",\n \"calleeSvcType\": \"Custom\",\n \"lraType\": 4,\n \"calleeHoldDurationMS\": 0,\n \"calleeHoldDuration\": \"00:00:00\",\n \"calleeDisconnectOnHold\": \"\",\n \"callerDisconnectOnHold\": \"\",\n \"pbxId\": \"demonstrationname\",\n \"sipCallId\": \"393091583_134170459@206.147.88.37\",\n \"departments\": [\n \"East Office\"\n ],\n \"branches\": [\n \"East Coast\"\n ],\n \"recordServiceOn\": \"\",\n \"bargeServiceOn\": \"\",\n \"masterSlaveExts\": \"\",\n \"propsLastPartyDisp\": \"Missed\",\n \"accountCode\": \"\",\n \"aaPath\": \"\",\n \"callTime\": 1696517\n }\n ]\n}"
schema:
type: object
properties:
meta:
type: object
properties:
totalRecordCount:
type: integer
example: 2
default: 0
scrollId:
type: string
example: c3VwZXJ0ZW5hbnRjc21fMTYzNTU3MTA0ODM0NV8xXzE2NDM4OTc0OTI5MDM
data:
type: array
items:
type: object
properties:
callId:
type: string
example: '1635571048351'
legId:
type: string
example: '1'
startTimeUTC:
type: integer
example: 1643898447499
default: 0
startTime:
type: string
example: 2022-02-03T09:27:27.499-0500
connectTimeUTC:
type: integer
example: 1643898447539
default: 0
connectTime:
type: string
example: 2022-02-03T09:27:27.539-0500
disconnectedTimeUTC:
type: integer
example: 1643898472253
default: 0
disconnectedTime:
type: string
example: 2022-02-03T09:27:52.253-0500
talkTimeMS:
type: integer
example: 0
default: 0
talkTime:
type: string
example: 00:00:00
caller:
type: string
example: '+15555551211'
callerName:
type: string
example: John Smith
callee:
type: string
example: Voicemail (120088)
calleeName:
type: string
example: Jane Li
lra:
type: string
example: '120088'
direction:
type: string
example: Incoming
parentCallId: {}
transferToCallId: {}
dnis:
type: string
example: '12029325720'
status:
type: string
example: Completed
callerDeviceId: {}
calleeDeviceId: {}
callerDeviceModel:
type: string
example: ''
calleeDeviceModel:
type: string
example: ''
callerId:
type: string
example: John Smith,+15555551211
missed:
type: string
example: Missed
abandoned:
type: string
example: '-'
answered:
type: string
example: '-'
cause:
type: string
example: Ring No Answer
callerSvcName: {}
callerSvcType: {}
calleeSvcName:
type: string
example: VMadvanced
calleeSvcType:
type: string
example: Custom
lraType:
type: integer
example: 1
default: 0
calleeHoldDurationMS:
type: integer
example: 0
default: 0
calleeHoldDuration:
type: string
example: 00:00:00
calleeDisconnectOnHold:
type: string
example: ''
callerDisconnectOnHold:
type: string
example: ''
pbxId:
type: string
example: demonstrationname
sipCallId:
type: string
example: 170437510_134011744@206.147.76.5
departments:
type: array
items:
type: string
example: Sales Engineering
branches:
type: array
items:
type: string
example: Central
recordServiceOn:
type: string
example: ''
bargeServiceOn:
type: string
example: ''
masterSlaveExts:
type: string
example: ''
propsLastPartyDisp:
type: string
example: Voicemail
accountCode:
type: string
example: ''
aaPath:
type: string
example: ''
callTime:
type: integer
example: 24754
default: 0
'400':
description: '400'
content:
application/json:
examples:
Invalid API Key:
value: "{\n \"status\": 400,\n \"message\": \"Invalid 8x8-apikey\",\n \"code\": \"SHA001\",\n \"details\": [\n {\n \"type\": \"invalidValue\",\n \"location\": \"header\",\n \"path\": [\n \"8x8-apikey\"\n ],\n \"hint\": \"Please provide valid apikey. If you don't have one, please sign up and create a developer account\"\n }\n ]\n}"
schema:
type: object
properties:
status:
type: integer
example: 400
default: 0
message:
type: string
example: Invalid 8x8-apikey
code:
type: string
example: SHA001
details:
type: array
items:
type: object
properties:
type:
type: string
example: invalidValue
location:
type: string
example: header
path:
type: array
items:
type: string
example: 8x8-apikey
hint:
type: string
example: Please provide valid apikey. If you don't have one, please sign up and create a developer account
'401':
description: '401'
content:
application/json:
examples:
Invalid Bearer Token Format:
value: "{\n \"error\": \"invalid_token\",\n \"error_description\": \"Cannot convert access token to JSON\"\n}"
schema:
type: object
properties:
error:
type: string
example: invalid_token
error_description:
type: string
example: Cannot convert access token to JSON
'403':
description: '403'
content:
application/json:
examples:
Result:
value: "{\n \"timeStamp\": \"2022-08-26T19:05:11.224+0000\",\n \"status\": 403,\n \"error\": \"Access Denied\",\n \"exception\": \"user(someuser.acme.com) does not have access to pbxId(pbxName) to make this request.\",\n \"message\": \"user(someuser.acme.com) does not have access to pbxId(pbxName) to make this request.\",\n \"path\": \"/api/analytics/report/external/v2/call-legs\"\n}"
schema:
type: object
properties:
timeStamp:
type: string
example: 2022-08-26T19:05:11.224+0000
status:
type: integer
example: 403
default: 0
error:
type: string
example: Access Denied
exception:
type: string
example: user(someuser.acme.com) does not have access to pbxId(pbxName) to make this request.
message:
type: string
example: user(someuser.acme.com) does not have access to pbxId(pbxName) to make this request.
path:
type: string
example: /api/analytics/report/external/v2/call-legs
deprecated: false
/v2/call-records:
get:
security:
- 8x8-apikey: []
bearerAuth: []
tags:
- Analytics
summary: Call Detail Records
description: '**Not currently Testable from here** The Analytics for 8x8 Work Call Detail Record (CDR) endpoint enables you to see the entire journey for a subject call from start to finish. See [CDR Glossary](https://docs.8x8.com/8x8WebHelp/8x8analytics-virtual-office/Content/VOA/call-detail-record.htm) for details.'
operationId: call-detail-records
parameters:
- name: pbxId
in: query
description: PBX Id for the request or allpbxes for all pbxs in the customer account
required: true
schema:
type: string
- name: startTime
in: query
description: The interval start time for CDR searches - the format is YYYY-MM-DD HH:MM:SS
required: true
schema:
type: string
- name: endTime
in: query
description: The interval end time for CDR searches - the format is YYYY-MM-DD HH:MM:SS.
required: true
schema:
type: string
- name: timeZone
in: query
description: IANA Time Zone https://www.iana.org/time-zones. Examples America/New_York, Europe/London
required: true
schema:
type: string
- name: pageSize
in: query
description: The number of records to return per page (the maximum value is 7000)
required: true
schema:
type: integer
format: int32
default: 100
- name: caller
in: query
description: This is optional, multivalued and exact match filter. Only extensions are supported as of now. (maximum 125 values are allowed) This is not allowed to use with param callerOrCallee. For example, caller=8923,329899
schema:
type: string
- name: callee
in: query
description: This is optional, multivalued and exact match filter. Only extensions are supported as of now. (maximum 125 values are allowed) This is not allowed to use with param callerOrCallee. For example, callee=8923,329899
schema:
type: string
- name: callerOrCallee
in: query
description: This is optional, multivalued and exact match filter. Only extensions are supported as of now. (maximum 125 values are allowed) This is not allowed to use with caller or callee param. For example callerOrCallee=8923,329899
schema:
type: string
- name: scrollId
in: query
description: The scrollId parameter returned from your previous call. You can include this parameter in your next or subsequent calls to retrieve the next page of records.
schema:
type: string
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"meta\": {\n \"totalRecordCount\": 2,\n \"scrollId\": \"c3VwZXJ0ZW5hbnRjc21fMTYzNTU3MTA0ODM0NV8xXzE2NDM4OTc0OTI5MDM\"\n },\n \"data\": [\n {\n \"dnis\": \"12029325720\",\n \"callId\": \"1635571048351\",\n \"startTimeUTC\": 1643898447499,\n \"startTime\": \"2022-02-03T09:27:27.499-0500\",\n \"connectTimeUTC\": 1643898447539,\n \"connectTime\": \"2022-02-03T09:27:27.539-0500\",\n \"disconnectedTimeUTC\": 1643898472253,\n \"disconnectedTime\": \"2022-02-03T09:27:52.253-0500\",\n \"caller\": \"+15555551211\",\n \"callerName\": \"John Smith\",\n \"callee\": \"Voicemail (120088)\",\n \"calleeName\": \"Jane Li\",\n \"lra\": \"120088\",\n \"direction\": \"Incoming\",\n \"callerId\": \"John Smith,+15555551211\",\n \"missed\": \"Missed\",\n \"abandoned\": \"-\",\n \"answered\": \"-\",\n \"answeredTime\": 0,\n \"calleeDisconnectOnHold\": \"\",\n \"callerDisconnectOnHold\": \"\",\n \"pbxId\": \"demonstrationname\",\n \"sipCallId\": \"170437510_134011744@206.147.76.5\",\n \"lastLegDisposition\": \"Voicemail\",\n \"callLegCount\": \"1\",\n \"callTime\": 24760,\n \"ringDuration\": 39,\n \"abandonedTime\": 0,\n \"calleeHoldDurationMS\": 0,\n \"calleeHoldDuration\": \"00:00:00\"\n \"departments\": [\n \"Sales Engineering\"\n ],\n \"branches\": [\n \"Central\"\n ] }\n ]\n}"
schema:
type: object
properties:
meta:
type: object
properties:
totalRecordCount:
type: integer
example: 2
default: 0
scrollId:
type: string
example: c3VwZXJ0ZW5hbnRjc21fMTYzNTU3MTA0ODM0NV8xXzE2NDM4OTc0OTI5MDM
data:
type: array
items:
type: object
properties:
dnis:
type: string
example: '12029325720'
aaDestination:
type: string
example: null
callId:
type: string
example: '1635571048351'
startTimeUTC:
type: integer
example: 1643898447499
default: 0
startTime:
type: string
example: 2022-02-03T09:27:27.499-0500
connectTimeUTC:
type: integer
example: 1643898447539
default: 0
connectTime:
type: string
example: 2022-02-03T09:27:27.539-0500
disconnectedTimeUTC:
type: integer
example: 1643898472253
default: 0
disconnectedTime:
type: string
example: 2022-02-03T09:27:52.253-0500
talkTimeMS:
type: integer
example: 0
default: 0
talkTime:
type: string
example: 00:00:00
caller:
type: string
example: '+15555551211'
callerName:
type: string
example: John Smith
callee:
type: string
example: Voicemail (120088)
calleeName:
type: string
example: Jane Li
direction:
type: string
example: Incoming
callerId:
type: string
example: John Smith,+15555551211
missed:
type: string
example: Missed
abandoned:
type: string
example: '-'
answered:
type: string
example: '-'
answeredTime:
type: integer
example: 0
calleeDisconnectOnHold:
type: string
example: ''
callerDisconnectOnHold:
type: string
example: ''
pbxId:
type: string
example: demonstrationname
sipCallId:
type: string
example: 170437510_134011744@206.147.76.5
lastLegDisposition:
type: string
example: Voicemail
callLegCount:
type: integer
example: 1
callTime:
type: integer
example: 1
default: 24760
ringDuration:
type: integer
example: 1
default: 39
abandonedTime:
type: integer
example: 1
default: 0
calleeHoldDurationMS:
type: integer
example: 0
default: 0
calleeHoldDuration:
type: string
example: 00:00:00
waitTimeMS:
type: integer
example: 0
default: 0
waitTime:
type: string
example: 00:00:00
departments:
type: array
items:
type: string
example: Sales Engineering
branches:
type: array
items:
type: string
example: Central
'400':
description: '400'
content:
application/json:
examples:
Invalid API Key:
value: "{\n \"status\": 400,\n \"message\": \"Invalid 8x8-apikey\",\n \"code\": \"SHA001\",\n \"details\": [\n {\n \"type\": \"invalidValue\",\n \"location\": \"header\",\n \"path\": [\n \"8x8-apikey\"\n ],\n \"hint\": \"Please provide valid apikey. If you don't have one, please sign up and create a developer account\"\n }\n ]\n}"
schema:
type: object
properties:
status:
type: integer
example: 400
default: 0
message:
type: string
example: Invalid 8x8-apikey
code:
type: string
example: SHA001
details:
type: array
items:
type: object
properties:
type:
type: string
example: invalidValue
location:
type: string
example: header
path:
type: array
items:
type: string
example: 8x8-apikey
hint:
type: string
example: Please provide valid apikey. If you don't have one, please sign up and create a developer account
'401':
description: '401'
content:
application/json:
examples:
Invalid Bearer Token Format:
value: "{\n \"error\": \"invalid_token\",\n \"error_description\": \"Cannot convert access token to JSON\"\n}"
schema:
type: object
properties:
error:
type: string
example: invalid_token
error_description:
type: string
example: Cannot convert access token to JSON
'403':
description: '403'
content:
application/json:
examples:
Result:
value: "{\n \"timeStamp\": \"2022-08-26T19:05:11.224+0000\",\n \"status\": 403,\n \"error\": \"Access Denied\",\n \"exception\": \"user(someuser.acme.com) does not have access to pbxId(pbxName) to make this request.\",\n \"message\": \"user(someuser.acme.com) does not have access to pbxId(pbxName) to make this request.\",\n \"path\": \"/api/analytics/report/external/v2/call-records\"\n}"
schema:
type: object
properties:
timeStamp:
type: string
example: 2022-08-26T19:05:11.224+0000
status:
type: integer
example: 403
default: 0
err
# --- truncated at 32 KB (121 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/8x8/refs/heads/main/openapi/8x8-analytics-api-openapi.yml