curl --request GET \
--url https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/dimensions \
--header 'X-API-KEY: <api-key>'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/dimensions"
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/dimensions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"reserved": [
{
"path": "platform_analysis",
"key": "sentiment",
"label": "Sentiment",
"type": "string",
"values": [
"positive",
"neutral",
"negative"
]
}
],
"client_analysis": [
{
"path": "client_analysis",
"key": "ptp_obtained",
"label": "PTP obtained",
"type": "boolean"
},
{
"path": "client_analysis",
"key": "disposition",
"label": "Disposition",
"type": "string"
}
]
}{
"message": "invalid channel(s): sms"
}{
"message": "Failed to fetch cohort dimensions!"
}Get Cohort Dimensions
List the fields you can slice call analytics by: built-in fields such as sentiment, and the Advanced Analysis variables configured on your agent.
curl --request GET \
--url https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/dimensions \
--header 'X-API-KEY: <api-key>'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/dimensions"
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/dimensions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"reserved": [
{
"path": "platform_analysis",
"key": "sentiment",
"label": "Sentiment",
"type": "string",
"values": [
"positive",
"neutral",
"negative"
]
}
],
"client_analysis": [
{
"path": "client_analysis",
"key": "ptp_obtained",
"label": "PTP obtained",
"type": "boolean"
},
{
"path": "client_analysis",
"key": "disposition",
"label": "Disposition",
"type": "string"
}
]
}{
"message": "invalid channel(s): sms"
}{
"message": "Failed to fetch cohort dimensions!"
}path and key to Get cohort values for its values, or to Get cohort breakdown for metrics per value.
Notes
- Dimensions come from
agent_version_id, elseagent_id, else the agent that runsbulk_list_id. - Number fields are returned only with
include_numeric=true, because they can’t be grouped. - The goal variable appears as an ordinary Boolean field.
Errors
400: an ID is malformed, orsub_workspace_idwas sent from a workspace that isn’t a primary workspace.401:X-API-KEYis missing or invalid.
Authorizations
Query Parameters
Filter by one or more agent IDs (comma-separated).
"00000000-0000-4000-8000-0000000000a1"
Filter by one or more agent version IDs (comma-separated).
"00000000-0000-4000-8000-0000000000d1"
Filter by one or more campaign (bulk list) IDs (comma-separated). Callback calls inherit the campaign of their parent call.
"00000000-0000-4000-8000-0000000000c1"
Also return number and integer analysis fields. These can't be used for grouping, so they are left out by default.
Primary workspaces only: limit the combined analytics to these Ringg Spaces. Repeat the parameter for multiple IDs. The primary workspace's own ID is accepted; any other workspace sending this parameter gets 400.
["00000000-0000-4000-8000-000000000101"]
Was this page helpful?