Docs: Document 1-month maximum date range on AiUsageData GraphQL queries

Problem to solve

The AiUsageData GraphQL endpoint (all and codeSuggestionEvents attributes) enforces a maximum date range of one month between startDate and endDate. This limit is not documented. Customers querying for multi-month periods receive:

{
  "message": "maximum date range is 1 month"
}

The error is clear once encountered, but customers building dashboards or export scripts have no way to know about the constraint in advance. The existing documentation describes the startDate and endDate parameters without mentioning any range restriction.

Source verification: UsageEventsResolver#validate_params! at ee/app/graphql/resolvers/analytics/ai_usage/usage_events_resolver.rb raises ArgumentError when start_date <= end_date - 1.month. CodeSuggestionEventsResolver inherits this validation.

Further details

Affected docs:

  • doc/api/graphql/duo_and_sdlc_trends.mdAiUsageData section, all and codeSuggestionEvents attribute descriptions

Audience: Administrators and data engineers building automated exports or BI integrations against the Duo analytics GraphQL API.

Proposal

Add a note to the AiUsageData section:

The all and codeSuggestionEvents attributes have a maximum date range of one month. If you need data spanning multiple months, run separate queries for each month.