Get Cohort Values
curl --request GET \
--url https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/values \
--header 'X-API-KEY: <api-key>'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/values"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/values', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"values": [
{
"value": "interested",
"count": 866
},
{
"value": "busy",
"count": 135
}
]
}{
"message": "invalid channel(s): sms"
}{
"message": "Failed to fetch cohort values!"
}Get Cohort Values
Get the distinct values of one analytics field and how many calls have each, most frequent first, to fill a filter list or see how outcomes split.
GET
/
analytics
/
v4
/
cohort
/
values
Get Cohort Values
curl --request GET \
--url https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/values \
--header 'X-API-KEY: <api-key>'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/values"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/values', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"values": [
{
"value": "interested",
"count": 866
},
{
"value": "busy",
"count": 135
}
]
}{
"message": "invalid channel(s): sms"
}{
"message": "Failed to fetch cohort values!"
}Take
path and key from Get cohort dimensions. For example, path=client_analysis&key=disposition lists every disposition your calls ended with.
Notes
- An invalid
pathorkeyreturns400.
Errors
400: a filter is invalid, such as an unknownchannel, a malformed ID, orsub_workspace_idsent from a workspace that isn’t a primary workspace.401:X-API-KEYis missing or invalid.
Query Parameters
Was this page helpful?