Common error messages and debugging tips for the Analytics API
Invalid service key
Invalid service key
Cause: The provided service key is not valid or has been revoked.Solution:Insufficient permissions
Insufficient permissions
Cause: The service key doesn’t have the required “Teams Read-only” permissions.Solution:Missing selections
at least one field or aggregation is required
Cause: The query request doesn’t contain any selections or aggregations.Solution: Add at least one selection to your query request:Invalid data source
invalid query table: QUERY_DATA_SOURCE_UNSPECIFIED
Cause: There’s likely a typo in the data_source
field.Solution: Double-check the spelling of your data source. Valid options:QUERY_DATA_SOURCE_USER_DATA
QUERY_DATA_SOURCE_CHAT_DATA
QUERY_DATA_SOURCE_COMMAND_DATA
QUERY_DATA_SOURCE_PCW_DATA
Mixed aggregation functions
all selection fields should have an aggregation function, or none of them should
Cause: Some selections have aggregation functions while others don’t.Solution: Either add aggregation functions to all selections or remove them from all:Invalid:Invalid aggregation function
invalid aggregation function for string type field ide: QUERY_AGGREGATION_SUM
Cause: The aggregation function is not supported for the specified field type.Solution: Check the Available Fields section to see which aggregation functions are valid for each field. String fields typically only support COUNT
and UNSPECIFIED
.Distinct field aggregation
tried to aggregate on a distinct field: distinct_developer_days. Consider aggregating on the non-distinct fields instead: [api_key date]
Cause: Fields with the “distinct_*” pattern cannot be used in the aggregations section.Solution: Use the suggested alternative fields for aggregation:Invalid:Duplicate field aliases
duplicate field alias for selection/aggregation: num_acceptances
Cause: Multiple selections or aggregations have the same name.Solution: Ensure all field aliases are unique. Remember that if no name is specified, it defaults to {aggregation_function}_{field_name}
.Invalid group name
invalid group name: GroupName
Cause: The specified group name doesn’t exist in your organization.Solution:Invalid timestamp format
invalid timestamp format
Cause: The timestamp is not in the correct RFC 3339 format.Solution: Use the correct timestamp format:2024-01-01T00:00:00Z
2024-12-31T23:59:59Z
2024-06-15T12:30:45Z
Conflicting filters
Cannot use both group_name and emails parameters
Cause: Both group_name
and emails
parameters were provided in a Cascade Analytics request.Solution: Use either group_name
OR emails
, but not both:Invalid:Rate limit exceeded
429 Too Many Requests
Cause: You’ve exceeded the API rate limit.Solution: