Get Contact Summary (v2)
curl --request GET \
--url https://api.operata.io/v2/data/calls/{contactId} \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.operata.io/v2/data/calls/{contactId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.operata.io/v2/data/calls/{contactId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.operata.io/v2/data/calls/{contactId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"accountProperties": {
"service": "Amazon Connect",
"serviceAccountNumber": "123456789012",
"serviceInstanceId": "205474d3-428f-4473-82e3-4f80580ef5b9",
"region": "ap-southeast-2",
"operataGroupId": "0841f5f7-e9c0-4454-8cb3-0eb3230e899b"
},
"contact": {
"id": {
"current": "e5c6ca6a-a061-42e8-989d-a06d7cb09cbb",
"previous": "",
"next": "",
"initial": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"systemEndpoint": "+61255500100",
"durationSec": 11,
"type": "VOICE",
"direction": "Inbound",
"initiation": "INBOUND",
"events": {
"enqueued": "2021-06-28T09:26:30Z",
"incomingToPlatform": "2021-06-28T09:26:29Z",
"connectingToAgent": "2021-06-28T09:26:30.807Z",
"connectedToAgent": "2021-06-28T09:26:31Z",
"disconnected": "2021-06-28T09:26:40Z"
},
"endedBy": "Customer",
"disconnectReason": "CUSTOMER_DISCONNECT"
},
"serviceAgent": {
"username": "agent_42",
"serviceId": "1d6a6efa-cd42-469e-8846-af01255a03d8",
"machine": {
"cpu": {
"modelName": "Intel Pentium 3.0",
"idlePercentage": {
"avg": 96.4
},
"utilisedPercentage": {
"min": 3.4,
"max": 3.7,
"avg": 3.6
}
},
"memory": {
"availableGb": 32,
"utilisedPercentage": {
"min": 93.4,
"max": 96.5,
"avg": 94.4
}
}
},
"network": {
"internetGatewayIp": "203.0.113.24",
"mediaIpAddress": "e35e8a3b-2c57-4b28-8a1c-3946bdcd697f.local",
"type": "wildcard",
"availableInterfaces": [
{
"address": "e35e8a3b-2c57-4b28-8a1c-3946bdcd697f.local",
"type": ""
}
],
"isp": "Google LLC",
"geolocation": {
"city": "Sydney",
"region": "New South Wales",
"country": "Australia"
},
"agentIpAddress": "",
"agentIsp": ""
},
"browser": {
"name": "Chrome",
"version": "88.0.4298.0"
},
"softphone": {
"softphoneUrl": "https://example.my.connect.aws/ccp-v2",
"operataCollectorVersion": "v1.0.22",
"connectStreamsVersion": "1.5.0"
},
"interaction": {
"totalDurationSec": 9,
"onHoldDurationSec": 0,
"talkingDurationSec": 9,
"onMuteDurationSec": 0
}
},
"webRTCSession": {
"metrics": {
"inbound": {
"packetsReceived": 331,
"packetsLost": 0,
"packetsLostPercentage": 0,
"bytesReceived": 31401,
"audioLevel": {
"max": 13889,
"avg": 3168
},
"jitterBufferMils": {
"min": 0,
"max": 0,
"avg": 0
}
},
"outbound": {
"packetsSent": 445,
"packetsLost": 0,
"packetsLostPercentage": 0,
"bytesSent": 15052,
"audioLevel": {
"max": 5709,
"avg": 1064.75
},
"jitterBufferMils": {
"min": 8,
"max": 40,
"avg": 24.13
}
},
"rtt": {
"max": 32,
"avg": 29
},
"jitter": {
"max": 3,
"avg": 2
},
"mos": {
"min": 3.48,
"max": 4.43,
"avg": 4.31
}
},
"serviceEndpoint": {
"fqdn": "wss://tufsuyburufn.transport.connect.ap-southeast-2.amazonaws.com/?[redacted]",
"transportLifeTimeSeconds": 3942,
"expiry": "2021-06-28T10:32:03.922Z"
},
"mediaEndpoint": {
"fqdn": "turnnlb-93f2de0c97c4316b.elb.ap-southeast-2.amazonaws.com.",
"destinationPort": "3478",
"sourcePort": "55662",
"transport": "udp",
"privateIp": "10.4.3.192"
},
"signallingEndpoint": {
"fqdn": "wss://rtc.connect-telecom.ap-southeast-2.amazonaws.com/LilyRTC"
},
"eventTimer": {
"gumTimeMillis": 0,
"initializationTimeMillis": 0,
"iceCollectionTimeMillis": 0,
"signallingConnectTimeMillis": 0,
"handshakingTimeMillis": 0,
"preTalkingTimeMillis": 0,
"cleanupTimeMillis": 0
},
"eventFailure": {
"iceCollectionFailure": false,
"signallingConnectionFailure": false,
"handshakingFailure": false,
"gumOtherFailure": false,
"gumTimeoutFailure": false,
"createOfferFailure": false,
"setLocalDescriptionFailure": false,
"userBusyFailure": false,
"invalidRemoteSDPFailure": false,
"noRemoteIceCandidateFailure": false,
"setRemoteDescriptionFailure": false
}
},
"headset": {
"modelName": "Jabra Link 380",
"firmwareVersion": "1234ABCD",
"serialNumber": "ABCD1234",
"apiVersion": "3.0.0-beta.4",
"metrics": {
"speech": {
"crossTalkTotal": 0,
"crossTalkTotalPct": 0,
"rxSpeechTotal": 0,
"rxSpeechTotalPct": 0,
"silenceTotal": 12.07,
"silenceTotalPct": 100,
"totalSeconds": 12.07,
"txSpeechTotal": 0,
"txSpeechTotalPct": 0
},
"exposureDb": {
"min": 62,
"max": 71,
"avg": 66
},
"backgroundNoiseDb": {
"min": 1,
"max": 20,
"avg": 2
},
"misalignedBoomArmCount": 3,
"deviceMuteCount": 0,
"deviceVolumeAdjustCount": 0
}
},
"billing": {
"durationRoundedMin": 1
}
}<string><string><string>Endpoints — Contact data
Get a contact summary (v2)
Fetch the v2 summary for one contact, with account, contact, agent, WebRTC session, headset, billing, and insights objects.
GET
/
v2
/
data
/
calls
/
{contactId}
Get Contact Summary (v2)
curl --request GET \
--url https://api.operata.io/v2/data/calls/{contactId} \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.operata.io/v2/data/calls/{contactId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.operata.io/v2/data/calls/{contactId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.operata.io/v2/data/calls/{contactId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"accountProperties": {
"service": "Amazon Connect",
"serviceAccountNumber": "123456789012",
"serviceInstanceId": "205474d3-428f-4473-82e3-4f80580ef5b9",
"region": "ap-southeast-2",
"operataGroupId": "0841f5f7-e9c0-4454-8cb3-0eb3230e899b"
},
"contact": {
"id": {
"current": "e5c6ca6a-a061-42e8-989d-a06d7cb09cbb",
"previous": "",
"next": "",
"initial": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"systemEndpoint": "+61255500100",
"durationSec": 11,
"type": "VOICE",
"direction": "Inbound",
"initiation": "INBOUND",
"events": {
"enqueued": "2021-06-28T09:26:30Z",
"incomingToPlatform": "2021-06-28T09:26:29Z",
"connectingToAgent": "2021-06-28T09:26:30.807Z",
"connectedToAgent": "2021-06-28T09:26:31Z",
"disconnected": "2021-06-28T09:26:40Z"
},
"endedBy": "Customer",
"disconnectReason": "CUSTOMER_DISCONNECT"
},
"serviceAgent": {
"username": "agent_42",
"serviceId": "1d6a6efa-cd42-469e-8846-af01255a03d8",
"machine": {
"cpu": {
"modelName": "Intel Pentium 3.0",
"idlePercentage": {
"avg": 96.4
},
"utilisedPercentage": {
"min": 3.4,
"max": 3.7,
"avg": 3.6
}
},
"memory": {
"availableGb": 32,
"utilisedPercentage": {
"min": 93.4,
"max": 96.5,
"avg": 94.4
}
}
},
"network": {
"internetGatewayIp": "203.0.113.24",
"mediaIpAddress": "e35e8a3b-2c57-4b28-8a1c-3946bdcd697f.local",
"type": "wildcard",
"availableInterfaces": [
{
"address": "e35e8a3b-2c57-4b28-8a1c-3946bdcd697f.local",
"type": ""
}
],
"isp": "Google LLC",
"geolocation": {
"city": "Sydney",
"region": "New South Wales",
"country": "Australia"
},
"agentIpAddress": "",
"agentIsp": ""
},
"browser": {
"name": "Chrome",
"version": "88.0.4298.0"
},
"softphone": {
"softphoneUrl": "https://example.my.connect.aws/ccp-v2",
"operataCollectorVersion": "v1.0.22",
"connectStreamsVersion": "1.5.0"
},
"interaction": {
"totalDurationSec": 9,
"onHoldDurationSec": 0,
"talkingDurationSec": 9,
"onMuteDurationSec": 0
}
},
"webRTCSession": {
"metrics": {
"inbound": {
"packetsReceived": 331,
"packetsLost": 0,
"packetsLostPercentage": 0,
"bytesReceived": 31401,
"audioLevel": {
"max": 13889,
"avg": 3168
},
"jitterBufferMils": {
"min": 0,
"max": 0,
"avg": 0
}
},
"outbound": {
"packetsSent": 445,
"packetsLost": 0,
"packetsLostPercentage": 0,
"bytesSent": 15052,
"audioLevel": {
"max": 5709,
"avg": 1064.75
},
"jitterBufferMils": {
"min": 8,
"max": 40,
"avg": 24.13
}
},
"rtt": {
"max": 32,
"avg": 29
},
"jitter": {
"max": 3,
"avg": 2
},
"mos": {
"min": 3.48,
"max": 4.43,
"avg": 4.31
}
},
"serviceEndpoint": {
"fqdn": "wss://tufsuyburufn.transport.connect.ap-southeast-2.amazonaws.com/?[redacted]",
"transportLifeTimeSeconds": 3942,
"expiry": "2021-06-28T10:32:03.922Z"
},
"mediaEndpoint": {
"fqdn": "turnnlb-93f2de0c97c4316b.elb.ap-southeast-2.amazonaws.com.",
"destinationPort": "3478",
"sourcePort": "55662",
"transport": "udp",
"privateIp": "10.4.3.192"
},
"signallingEndpoint": {
"fqdn": "wss://rtc.connect-telecom.ap-southeast-2.amazonaws.com/LilyRTC"
},
"eventTimer": {
"gumTimeMillis": 0,
"initializationTimeMillis": 0,
"iceCollectionTimeMillis": 0,
"signallingConnectTimeMillis": 0,
"handshakingTimeMillis": 0,
"preTalkingTimeMillis": 0,
"cleanupTimeMillis": 0
},
"eventFailure": {
"iceCollectionFailure": false,
"signallingConnectionFailure": false,
"handshakingFailure": false,
"gumOtherFailure": false,
"gumTimeoutFailure": false,
"createOfferFailure": false,
"setLocalDescriptionFailure": false,
"userBusyFailure": false,
"invalidRemoteSDPFailure": false,
"noRemoteIceCandidateFailure": false,
"setRemoteDescriptionFailure": false
}
},
"headset": {
"modelName": "Jabra Link 380",
"firmwareVersion": "1234ABCD",
"serialNumber": "ABCD1234",
"apiVersion": "3.0.0-beta.4",
"metrics": {
"speech": {
"crossTalkTotal": 0,
"crossTalkTotalPct": 0,
"rxSpeechTotal": 0,
"rxSpeechTotalPct": 0,
"silenceTotal": 12.07,
"silenceTotalPct": 100,
"totalSeconds": 12.07,
"txSpeechTotal": 0,
"txSpeechTotalPct": 0
},
"exposureDb": {
"min": 62,
"max": 71,
"avg": 66
},
"backgroundNoiseDb": {
"min": 1,
"max": 20,
"avg": 2
},
"misalignedBoomArmCount": 3,
"deviceMuteCount": 0,
"deviceVolumeAdjustCount": 0
}
},
"billing": {
"durationRoundedMin": 1
}
}<string><string><string>Returns the v2 summary for one contact. It has the same objects as List contact summaries (v2), plus
The response has every field described in List contact summaries (v2), plus this one:
See Errors for errors every endpoint can return.
insights when Operata recorded any for the contact. For the v1 format, use Get a contact summary.
Endpoint
GET https://api.operata.io/v2/data/calls/{contactId}
Parameters
Path
| Name | Type | Required | Description |
|---|---|---|---|
contactId | string | yes | Amazon Connect contact ID. |
Response
200 OK with one JSON object.
{
"accountProperties": {
"service": "Amazon Connect",
"serviceAccountNumber": "123456789012",
"serviceInstanceId": "205474d3-428f-4473-82e3-4f80580ef5b9",
"region": "ap-southeast-2",
"operataGroupId": "0841f5f7-e9c0-4454-8cb3-0eb3230e899b"
},
"contact": {
"id": {
"current": "e5c6ca6a-a061-42e8-989d-a06d7cb09cbb",
"previous": "",
"next": "",
"initial": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"systemEndpoint": "+61255500100",
"durationSec": 11,
"type": "VOICE",
"direction": "Inbound",
"initiation": "INBOUND",
"events": {
"enqueued": "2021-06-28T09:26:30Z",
"incomingToPlatform": "2021-06-28T09:26:29Z",
"connectingToAgent": "2021-06-28T09:26:30.807Z",
"connectedToAgent": "2021-06-28T09:26:31Z",
"disconnected": "2021-06-28T09:26:40Z"
},
"endedBy": "Customer",
"disconnectReason": "CUSTOMER_DISCONNECT"
},
"serviceAgent": {
"username": "agent_42",
"serviceId": "1d6a6efa-cd42-469e-8846-af01255a03d8",
"machine": {
"cpu": {
"modelName": "Intel Pentium 3.0",
"idlePercentage": {
"avg": 96.4
},
"utilisedPercentage": {
"min": 3.4,
"max": 3.7,
"avg": 3.6
}
},
"memory": {
"availableGb": 32,
"utilisedPercentage": {
"min": 93.4,
"max": 96.5,
"avg": 94.4
}
}
},
"network": {
"internetGatewayIp": "203.0.113.24",
"mediaIpAddress": "e35e8a3b-2c57-4b28-8a1c-3946bdcd697f.local",
"type": "wildcard",
"availableInterfaces": [
{
"address": "e35e8a3b-2c57-4b28-8a1c-3946bdcd697f.local",
"type": ""
}
],
"isp": "Google LLC",
"geolocation": {
"city": "Sydney",
"region": "New South Wales",
"country": "Australia"
},
"agentIpAddress": "",
"agentIsp": ""
},
"browser": {
"name": "Chrome",
"version": "88.0.4298.0"
},
"softphone": {
"softphoneUrl": "https://example.my.connect.aws/ccp-v2",
"operataCollectorVersion": "v1.0.22",
"connectStreamsVersion": "1.5.0"
},
"interaction": {
"totalDurationSec": 9,
"onHoldDurationSec": 0,
"talkingDurationSec": 9,
"onMuteDurationSec": 0
}
},
"webRTCSession": {
"metrics": {
"inbound": {
"packetsReceived": 331,
"packetsLost": 0,
"packetsLostPercentage": 0,
"bytesReceived": 31401,
"audioLevel": {
"max": 13889,
"avg": 3168
},
"jitterBufferMils": {
"min": 0,
"max": 0,
"avg": 0
}
},
"outbound": {
"packetsSent": 445,
"packetsLost": 0,
"packetsLostPercentage": 0,
"bytesSent": 15052,
"audioLevel": {
"max": 5709,
"avg": 1064.75
},
"jitterBufferMils": {
"min": 8,
"max": 40,
"avg": 24.13
}
},
"rtt": {
"max": 32,
"avg": 29
},
"jitter": {
"max": 3,
"avg": 2
},
"mos": {
"min": 3.48,
"max": 4.43,
"avg": 4.31
}
},
"serviceEndpoint": {
"fqdn": "wss://tufsuyburufn.transport.connect.ap-southeast-2.amazonaws.com/?[redacted]",
"transportLifeTimeSeconds": 3942,
"expiry": "2021-06-28T10:32:03.922Z"
},
"mediaEndpoint": {
"fqdn": "turnnlb-93f2de0c97c4316b.elb.ap-southeast-2.amazonaws.com.",
"destinationPort": "3478",
"sourcePort": "55662",
"transport": "udp",
"privateIp": "10.4.3.192"
},
"signallingEndpoint": {
"fqdn": "wss://rtc.connect-telecom.ap-southeast-2.amazonaws.com/LilyRTC"
},
"eventTimer": {
"gumTimeMillis": 0,
"initializationTimeMillis": 0,
"iceCollectionTimeMillis": 0,
"signallingConnectTimeMillis": 0,
"handshakingTimeMillis": 0,
"preTalkingTimeMillis": 0,
"cleanupTimeMillis": 0
},
"eventFailure": {
"iceCollectionFailure": false,
"signallingConnectionFailure": false,
"handshakingFailure": false,
"gumOtherFailure": false,
"gumTimeoutFailure": false,
"createOfferFailure": false,
"setLocalDescriptionFailure": false,
"userBusyFailure": false,
"invalidRemoteSDPFailure": false,
"noRemoteIceCandidateFailure": false,
"setRemoteDescriptionFailure": false
}
},
"headset": {
"modelName": "Jabra Link 380",
"firmwareVersion": "1234ABCD",
"serialNumber": "ABCD1234",
"apiVersion": "3.0.0-beta.4",
"metrics": {
"speech": {
"crossTalkTotal": 0,
"crossTalkTotalPct": 0,
"rxSpeechTotal": 0,
"rxSpeechTotalPct": 0,
"silenceTotal": 12.07,
"silenceTotalPct": 100,
"totalSeconds": 12.07,
"txSpeechTotal": 0,
"txSpeechTotalPct": 0
},
"exposureDb": {
"min": 62,
"max": 71,
"avg": 66
},
"backgroundNoiseDb": {
"min": 1,
"max": 20,
"avg": 2
},
"misalignedBoomArmCount": 3,
"deviceMuteCount": 0,
"deviceVolumeAdjustCount": 0
}
},
"billing": {
"durationRoundedMin": 1
}
}
| Field | Type | Description |
|---|---|---|
insights | object | count of insights and their tags, each with pattern, description, and type. See Insights. Omitted when the contact has none. |
Example
curl -u "$OPERATA_GROUP_ID:$OPERATA_API_TOKEN" \
"https://api.operata.io/v2/data/calls/e5c6ca6a-a061-42e8-989d-a06d7cb09cbb"
const groupId = process.env.OPERATA_GROUP_ID;
const apiToken = process.env.OPERATA_API_TOKEN;
const auth = Buffer.from(`${groupId}:${apiToken}`).toString("base64");
const contactId = "e5c6ca6a-a061-42e8-989d-a06d7cb09cbb";
const response = await fetch(`https://api.operata.io/v2/data/calls/${contactId}`, {
headers: { Authorization: `Basic ${auth}` },
});
const summary = await response.json();
import os, requests
contact_id = "e5c6ca6a-a061-42e8-989d-a06d7cb09cbb"
response = requests.get(
f"https://api.operata.io/v2/data/calls/{contact_id}",
auth=(os.environ["OPERATA_GROUP_ID"], os.environ["OPERATA_API_TOKEN"]),
)
response.raise_for_status()
summary = response.json()
Errors
Error bodies are plain text.| Status | Body | When | Recover |
|---|---|---|---|
| 401 | An HTML 401 Authorization Required page | Credentials are missing or wrong. | See Authentication. |
| 404 | Call Summary record could not be found | Your Operata Group has no summary for this contact ID. | Check the ID with List contact summaries (v2). |
| 422 | An error occurred while retrieving call stats log | OpenSearch rejected or failed the lookup. | Retry later. Contact support if it persists. |
Related
- List contact summaries (v2): find contact IDs in a time window.
- Get detailed contact stats (v2): per-second metrics for the same contact.
- Get a contact summary: the same contact in the v1 format.
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
Amazon Connect contact ID.
Was this page helpful?