GET requests.
This endpoint meets all your enterprise analytics needs,
enabling you to make fine-grained queries in your spreadsheets
or build rich dashboards for AI Agents with your favorite data visualization tool.
Watch this video to get a quick overview of what the OData Analytics endpoint is, how it works, and in which scenarios you can use it:
Limitations
OData Endpoint Field Size and Length Limitations
OData Endpoint Field Size and Length Limitations
- By default, the OData endpoint fields have the following limitations by data type:
- The OData endpoint fields in the following table have a maximum length that differs from the default limitations:
Restrictions
- The Cognigy.AI OData endpoint supports only the OData protocol version 4.
- The Cognigy.AI OData endpoint only supports
GETrequests and doesnโt support any other request types, such asPATCH,DELETE, orPOST. - The data retrieved through the Cognigy.AI OData endpoint isnโt updated in real time and may not reflect the current state.
- The Cognigy.AI OData endpoint supports a limited set of system query options, operators, and query functions. For detailed information about the query syntax, refer to the OData Query Syntax section.
Supported Versions
Data Protection
You can control the data available through the OData endpoint at the Endpoint, Flow, and Node levels:- Endpoint โ go to the Data Protection & Analytics section in the Endpoint settings:
- If you disable the Collect Analytics setting, no analytics data is logged or available in OData.
- If you enable the Mask Sensitive Analytics setting, the
inputTextandinputDatafields are masked.
- Flow โ add a Blind Mode Node to your Flow. This Node disables or masks analytics data available to the OData endpoint.
- Node โ use the Mask and keep analytics data parameter in the Delete Profile Node and the Keep analytics records, mask personal data option in the Deactivate Profile Node. These Nodes can mask personal data while including analytics data across the Analytics, Conversations, and Sessions collections. By default, rows with masked personal data in these collections are included in OData results. To exclude rows where personal data has been masked:
- For SaaS installations, contact Cognigy technical support.
- For on-premises installations, set
ODATA_FILTER_MASKED_ROWS=trueinvalues.yaml.
OData Endpoint Access
You can access the OData endpoint through a different domain than the one from Cognigy.AI:- Cognigy
- NiCE CXone
- Trial โ
https://odata-trial.cognigy.ai. - Shared SaaS โ
https://odata-<your-domain>.cognigy.ai. - Dedicated SaaS โ contact your Customer Success Manager or Cognigy.AI Support to get the OData endpoint URL.
- On-premises โ
https://odata-<backend-url>, where<backend-url>refer to the URL assigned to theBACKEND_BASE_URL_WITH_PROTOCOLinvalues.yaml.
Authentication
To connect to the OData endpoint, you need to have theodata global role and an API Key.
To authenticate your API requests to the OData endpoint, you need the following parameters:
- The Cognigy.AI OData base domain. It is the root URL where your OData service is hosted.
- The API version of the Cognigy.AI OData endpoint. Currently, Cognigy.AI supports OData 2.3 and 2.4.
- The collection in the OData service you want to access.
- The API key that authenticates and authorizes the API access. Generate the API key in your profile.
Authentication Methods
You can use the following methods to authenticate your requests to the OData endpoint:- HTTP Headers โ this method provides more security to access the OData endpoint. HTTP header authentication prevents API keys from exposure in the URL, server access logs, and other security risks. This method doesnโt support Microsoft Excel and Power BI integrations.
- Query Parameters โ allows for Microsoft Excel and Power BI integrations. For this method, ensure appropriate access controls and security measures to prevent security risks.
Examples
The following examples use the following parameters:- Cognigy.AI OData base domain โ
odata-trial.cognigy.ai - Cognigy.AI OData endpoint version โ
v2.4 - OData collection โ
Analytics - API key โ
123abc
- HTTP Headers
- Query Parameters
Migrate from Query Parameters to HTTP Headers
Migrate from Query Parameters to HTTP Headers
https://odata-trial.cognigy.ai/v2.4/Analytics?apikey=123abc, you can migrate to HTTP headers authentication by using the following HTTP headers:Authentication for Microsoft Excel and Power BI
When using Microsoft Excel and Power BI, you might be prompted to authenticate. In this case, select Anonymous Authentication.OData Query Syntax
The following rules define how OData queries must be structured when using system query options, operators, and string functions. These syntax requirements ensure that requests are valid, predictable, and compatible with the OData v4 protocol. They apply to all Cognigy.AI OData endpoint Collections and must be followed when creating query expressions.List of Requirements
List of Requirements
System Query Options
The Cognigy.AI OData endpoint supports a limited set of system query options:Supported Operators and Query Functions
The Cognigy.AI OData endpoint supports a limited set of operators and query functions that you can use in the$filter system query option to create more complex queries.
Comparison Operators
Comparison Operators
Logical Operators
Logical Operators
Query Functions
Query Functions
Examples
The tables contain examples of requests using system query options and operators. Select the OData endpoint version compatible with your Cognigy.AI version.- OData 2.4
- OData 2.3
Cognigy.AI OData Collections
The OData endpoint provides access to several data collections containing information about your interactions and workflows. A collection is similar to a database table or a set of entities containing data. The set of collections varies depending on which version you are using:- Version 2.4
- Version 2.3
v2.4. In this version, the following OData collections are available:- Analytics (
/Analytics) - Conversations (
/Conversations) - Steps (
/Steps) - ExecutedSteps (
/ExecutedSteps) - Sessions (
/Sessions) - LiveAgentEscalations (
/LiveAgentEscalations) - Goals (
/Goals) - GoalSteps (
/GoalSteps) - GoalStepMetrics (
/GoalStepMetrics) - GoalEvents (
/GoalEvents)
https://<odata-domain>/v2.4/<collection>?apikey=<your-api-key>Analytics
The Analytics collection offers a log of comprehensive details such as organizational information, Project identifiers, Flow specifics, and essential performance metrics. Each chat or voice AI Agent session in Cognigy.AI creates an Analytics record for an interaction. Each interaction is logged as a single record. The information is saved only after the end of the session. You can change this data using the Overwrite Analytics Node. Requests Select an API request to extract data from the collection. The API version in the request must match your Cognigy.AI version.- OData 2.4
- OData 2.3
https://odata-trial.cognigy.ai/v2.4/Analytics?apikey=<your-api-key>Response Fields
Response Fields
entityReferenceId field is used.
This field corresponds to either the Node ID or Intent ID assigned as an Analytics step.
The current Analytics step label can be retrieved
by mapping the entityReferenceID field to the Steps record.Conversations
The Conversations collection offers a log of all session messages, including messages from the end user, AI Agent, and human agent. Each time one of these sources sends a message to a Flow, Cognigy.AI creates a record to log the interaction. Each interaction is logged as a single record. Requests Select an API request to extract data from the collection. The API version in the request must match your Cognigy.AI version.- OData 2.4
- OData 2.3
https://odata-trial.cognigy.ai/v2.4/Conversations?apikey=<your-api-key>Response Fields
Response Fields
Steps
The Steps collection provides a list of all entities, which are either Nodes or Intents, assigned as Analytics Steps within any Flow. An Analytics step appear in this OData collection only after it has been triggered at least once in a session within the Flow. Each step is logged as a single record. Requests Select an API request to extract data from the collection. The API version in the request must match your Cognigy.AI version.- OData 2.4
- OData 2.3
https://odata-trial.cognigy.ai/v2.4/Steps?apikey=<your-api-key>Response Fields
Response Fields
ExecutedSteps
The ExecutedSteps collection logs all step events in sessions, including a reference to the prior (parent) step. Whenever a Node or Intent with an assigned step is executed, the collection creates a record for that step. Each step is logged as a single record.- OData 2.4
- OData 2.3
https://odata-trial.cognigy.ai/v2.4/ExecutedSteps?apikey=<your-api-key>Response Fields
Response Fields
Sessions
The Sessions collection contains a list of all sessions that have occurred. The primary objective of this collection is to provide a list of the Analytics steps that took place in any given session, along with the order of execution. This information is included as a comma-separated list within a field calledstepPath.
Each session is logged as a single record.
- OData 2.4
- OData 2.3
https://odata-trial.cognigy.ai/v2.4/Sessions?apikey=<your-api-key>Response Fields
Response Fields
LiveAgentEscalations
The LiveAgentEscalations collection contains records from Cognigy Live Agent and includes the related data about handovers to Live Agent. Each handover (escalation) is logged as a single record.- OData 2.4
- OData 2.3
https://odata-trial.cognigy.ai/v2.4/LiveAgentEscalations?apikey=<your-api-key>Response Fields
Response Fields
Goals
The Goals collection contains records from goals. Each goal is logged as a single record.- OData 2.4
https://odata-trial.cognigy.ai/v2.4/Goals?apikey=<your-api-key>Response Fields
Response Fields
GoalSteps
The GoalSteps collection contains records about a specific Goal step from goals. Each goal is logged as a single record.- OData 2.4
https://odata-trial.cognigy.ai/v2.4/GoalSteps?apikey=<your-api-key>Response Fields
Response Fields
GoalStepMetrics
The GoalStepMetrics collection contains records about specific goal-related events from goals. Each metric is logged as a single record.- OData 2.4
https://odata-trial.cognigy.ai/v2.4/GoalStepMetrics?apikey=<your-api-key>Response Fields
Response Fields
GoalEvents
The GoalEvents collection contains records about specific goal-related events from goals. Each event is logged as a single record.- OData 2.4
https://odata-trial.cognigy.ai/v2.4/GoalEvents?apikey=<your-api-key>Response Fields
Response Fields
Cognigy.AI OData Collections: Entity Relationship Diagram (ERD)
The Entity Relationship Diagram (ERD) describes the relationships between the collection entities.Integrations
The Cognigy.AI OData endpoint can integrate with all tools compatible with the OData protocol version 4. The table outlines popular integration tools, including data visualization tools, recommended for integration.Keyset Pagination
Keyset pagination is a more efficient way to retrieve data from large datasets where you need to set$skip to high values, such as 10000. To use keyset pagination, follow these steps:
Keyset Pagination
Keyset Pagination
- Retrieve the first page with the
$topand$orderbyquery options, for example,https://odata-trial.cognigy.ai/v2.4/Conversations?apikey=<your-api-key>&$top=10000&$orderby=timestamp asc. - Use the last
timestampvalue from the previous page in the next page request, for example,https://odata-trial.cognigy.ai/v2.4/Conversations?apikey=<your-api-key>&$filter=timestamp gt <LAST_TIMESTAMP_FROM_PREVIOUS_PAGE>&$top=10000&$orderby=timestamp asc. - Repeat step 2 until you have retrieved all the records.
More Information
1: Microsoft Excel and Power BI do not support for the
$count query. Use Postman or other options. To perform this query, consider using tools such as Postman or other applications that support advanced API querying.