API Access in Analytics allows eligible users to retrieve data through APIs for integration with external applications, reporting tools, and custom data workflows.
Users can generate and revoke API tokens, view available data models, and use the provided API endpoints to query analytics data.
API Access is only available to users with an active Product Analytics subscription.
Accessing API Access
- Navigate to the Analytics page.
- Click on the API Access button at the top right of the page
- The API Access page displays your available API keys.
If you do not see the API Access option, check whether your account has an active Product Analytics subscription.
Managing API Tokens
API tokens are used to authenticate requests when accessing analytics data through the API.
Generate an API Token
- Click Create API Key.
- Enter a name for your token to help identify its purpose.
- Click Create.
- Copy and securely store the generated token.
Important: Keep your API token confidential. Anyone with access to your token may be able to retrieve analytics data within the permissions granted to your account.
Do not share your token publicly or include it in client-side code, public repositories, or unsecured documents.
Revoke an API Token
If a token is no longer needed or may have been compromised:
- Locate the token you want to revoke.
- Select Revoke.
- Confirm the action.
Once revoked, the token can no longer be used to authenticate API requests. Any application using that token must be updated with a new valid token.
Viewing Available Data Models
The Browse Available Cubes section displays the data models that are available for API queries.
Each available model defines the analytics data that can be retrieved through the API, including its supported dimensions and measures.
Only models made available for API access can be queried.
Understanding Dimensions and Measures in API Queries
When querying analytics data through the API, you can use Dimensions and Measures to specify how your data is grouped and what values you want to retrieve.
Understanding these two components will help you build API queries and retrieve the analytics data you need.
1. Dimensions
Dimensions define how your analytics data is grouped or categorized. They represent attributes of your data that you want to analyze.
For example, you can use dimensions to group data by:
- Class/package
- Function
- Date or time period
- Other attributes supported by the selected data model
In the example below, two dimensions are used:
"dimensions": [
"cet_events.toolbox_library_info__class_pkg",
"cet_events.toolbox_library_info__function"
]toolbox_library_info__class_pkg: Groups data by toolbox class/package.toolbox_library_info__function: Groups data by toolbox function.
Using both dimensions allows you to analyze toolbox usage by class/package and function.
2. Measures
Measures define the numerical values or metrics you want to retrieve from your analytics data. They are used to calculate and quantify information for each group of dimensions.
For example, measures may include:
- Unique user count
- Total event count
- Other calculated metrics supported by the selected data model
In the example below, two measures are requested:
"measures": [
"cet_events.unique_user_count",
"cet_events.count_distinct"
]unique_user_count: Returns the number of unique users associated with the records.count_distinct: Returns the count of distinct values based on its defined calculation in the data model.
3. Using Dimensions and Measures Together
Dimensions and measures can be combined in a single API query to retrieve more detailed analytics results.
For example, if you want to analyze toolbox usage by class/package and function, together with the number of unique users and distinct records, you can use:
{
"query": {
"dimensions": [
"cet_events.toolbox_library_info__class_pkg",
"cet_events.toolbox_library_info__function"
],
"filters": [
{
"member": "cet_events.cet_action",
"operator": "equals",
"values": [
"toolbox_click"
]
}
],
"limit": 5,
"measures": [
"cet_events.unique_user_count",
"cet_events.count_distinct"
],
"order": {
"cet_events.count_distinct": "desc",
"cet_events.created_at": "desc"
},
"timeDimensions": [
{
"dateRange": "Last 30 days",
"dimension": "cet_events.created_at"
}
]
}
}The API will return results grouped by toolbox class/package and function, along with the corresponding measure values.
Example API Response
{
"query": {
"measures": [
"cet_events.unique_user_count",
"cet_events.count_distinct"
],
"dimensions": [
"cet_events.toolbox_library_info__class_pkg",
"cet_events.toolbox_library_info__function"
],
"timeDimensions": [
{
"dimension": "cet_events.created_at",
"dateRange": [
"2026-10-07T00:00:00.000",
"2026-11-05T23:59:59.999"
]
}
],
"limit": 5,
"timezone": "UTC",
"filters": [
{
"member": "cet_events.cet_action",
"operator": "equals",
"values": [
"toolbox_click"
]
},
{
"and": [
{
"member": "cet_events.manufacturer_id",
"operator": "equals",
"values": [
"0",
"9999"
]
},
{
"member": "cet_events.is_configura_user",
"operator": "equals",
"values": [
"false"
]
}
]
}
],
"rowLimit": 5,
"order": [
{
"id": "cet_events.count_distinct",
"desc": true
},
{
"id": "cet_events.created_at",
"desc": true
}
]
},
"lastRefreshTime": "2026-11-06T06:20:13.984Z",
"annotation": {
"measures": {
"cet_events.count_distinct": {
"title": "Cet Events Event Count",
"shortTitle": "Event Count",
"type": "number",
"drillMembers": [],
"drillMembersGrouped": {
"measures": [],
"dimensions": []
}
},
"cet_events.unique_user_count": {
"title": "Cet Events Unique User Count",
"shortTitle": "Unique User Count",
"type": "number",
"drillMembers": [],
"drillMembersGrouped": {
"measures": [],
"dimensions": []
}
}
},
"dimensions": {
"cet_events.toolbox_library_info__class_pkg": {
"title": "Cet Events pkg",
"shortTitle": "pkg",
"type": "string"
},
"cet_events.toolbox_library_info__function": {
"title": "Cet Events function",
"shortTitle": "function",
"type": "string"
}
},
"segments": {},
"timeDimensions": {}
},
"dataSource": "default",
"dbType": "redshift",
"extDbType": "cubestore",
"external": false,
"slowQuery": false,
"data": [
{
"cet_events.toolbox_library_info__class_pkg": "custom.tools",
"cet_events.toolbox_library_info__function": ToolsLibrary",
"cet_events.unique_user_count": "9140",
"cet_events.count_distinct": "150616"
},
{
"cet_events.toolbox_library_info__class_pkg": "cm.samplewall",
"cet_events.toolbox_library_info__function": "WallLibrary",
"cet_events.unique_user_count": "8406",
"cet_events.count_distinct": "136491"
},
{
"cet_events.toolbox_library_info__class_pkg": "cm.3DThings",
"cet_events.toolbox_library_info__function": "3DLibrary",
"cet_events.unique_user_count": "7428",
"cet_events.count_distinct": "120485"
},
{
"cet_events.toolbox_library_info__class_pkg": "custom.fika",
"cet_events.toolbox_library_info__function": "FikaLibrary",
"cet_events.unique_user_count": "5076",
"cet_events.count_distinct": "75890"
},
{
"cet_events.toolbox_library_info__class_pkg": "cm.architectural",
"cet_events.toolbox_library_info__function": "ArchitecturalLibrary",
"cet_events.unique_user_count": "6507",
"cet_events.count_distinct": "63236"
}
]
}The following is a sample response to illustrate how dimensions and measures are returned. Actual results may vary depending on the query parameters and available data.
4. Additional Query Parameters
Besides dimensions and measures, you can use additional parameters to refine your API query.
| Parameter | Description |
|---|---|
filters | Filters the records based on specified conditions. For example, retrieve only events where cet_action equals toolbox_click. |
limit | Sets the maximum number of records returned. |
order | Specifies the sorting order of the results. |
timeDimensions | Filters analytics data by a specified date or time range. |
Comments
0 comments
Please sign in to leave a comment.