POST
/
api
/
v1
/
CascadeAnalytics
Get Cascade Analytics
curl --request POST \
  --url https://server.codeium.com/api/v1/CascadeAnalytics \
  --header 'Content-Type: application/json' \
  --data '{
  "service_key": "<string>",
  "group_name": "<string>",
  "start_timestamp": "<string>",
  "end_timestamp": "<string>",
  "emails": [
    {}
  ],
  "ide_types": [
    {}
  ],
  "query_requests": [
    {}
  ]
}'
{
  "queryResults": [
    {
      "cascadeLines": {
        "cascadeLines": [
          {
            "day": "<string>",
            "linesSuggested": "<string>",
            "linesAccepted": "<string>"
          }
        ]
      },
      "cascadeRuns": {
        "cascadeRuns": [
          {
            "day": "<string>",
            "model": "<string>",
            "mode": "<string>",
            "messagesSent": "<string>",
            "cascadeId": "<string>",
            "promptsUsed": "<string>"
          }
        ]
      },
      "cascadeToolUsage": {
        "cascadeToolUsage": [
          {
            "tool": "<string>",
            "count": "<string>"
          }
        ]
      }
    }
  ]
}

Overview

Retrieve Cascade-specific analytics data including lines suggested/accepted, model usage, credit consumption, and tool usage statistics.

Request

service_key
string
required
Your service key with “Teams Read-only” permissions
group_name
string
Filter results to users in a specific group. Cannot be used with emails parameter.
start_timestamp
string
Start time in RFC 3339 format (e.g., 2023-01-01T00:00:00Z)
end_timestamp
string
End time in RFC 3339 format (e.g., 2023-12-31T23:59:59Z)
emails
array
Array of email addresses to filter results. Cannot be used with group_name parameter.
ide_types
array
Filter by IDE type. Available options:
  • "editor" - Windsurf Editor
  • "jetbrains" - JetBrains Plugin
If omitted, returns data for both IDEs.
query_requests
array
required
Array of data source queries to execute. Each object should contain one of the supported data sources.

Data Sources

cascade_lines

Query for daily Cascade lines suggested and accepted.
{
  "cascade_lines": {}
}
Response Fields:
  • day - Date in RFC 3339 format
  • linesSuggested - Number of lines suggested
  • linesAccepted - Number of lines accepted

cascade_runs

Query for model usage, credit consumption, and mode data.
{
  "cascade_runs": {}
}
Response Fields:
  • day - Date in RFC 3339 format
  • model - Model name used
  • mode - Cascade mode (see modes below)
  • messagesSent - Number of messages sent
  • cascadeId - Unique conversation ID
  • promptsUsed - Credits consumed (in cents)
Cascade Modes:
  • CONVERSATIONAL_PLANNER_MODE_DEFAULT - Write mode
  • CONVERSATIONAL_PLANNER_MODE_READ_ONLY - Read mode
  • CONVERSATIONAL_PLANNER_MODE_NO_TOOL - Legacy mode
  • UNKNOWN - Unknown mode

cascade_tool_usage

Query for tool usage statistics (aggregate counts).
{
  "cascade_tool_usage": {}
}
Response Fields:
  • tool - Tool identifier (see tool mappings below)
  • count - Number of times tool was used

Tool Usage Mappings

Tool IdentifierDisplay Name
CODE_ACTIONCode Edit
VIEW_FILEView File
RUN_COMMANDRun Command
FINDFind tool
GREP_SEARCHGrep Search
VIEW_FILE_OUTLINEView File Outline
MQUERYRiptide
LIST_DIRECTORYList Directory
MCP_TOOLMCP Tool
PROPOSE_CODEPropose Code
SEARCH_WEBSearch Web
MEMORYMemory
PROXY_WEB_SERVERBrowser Preview
DEPLOY_WEB_APPDeploy Web App

Example Request

curl -X POST --header "Content-Type: application/json" \
--data '{
  "service_key": "your_service_key_here",
  "group_name": "engineering_team",
  "start_timestamp": "2025-01-01T00:00:00Z",
  "end_timestamp": "2025-01-02T00:00:00Z",
  "emails": ["user1@windsurf.com", "user2@windsurf.com"],
  "ide_types": ["editor"],
  "query_requests": [
    {
      "cascade_lines": {}
    },
    {
      "cascade_runs": {}
    },
    {
      "cascade_tool_usage": {}
    }
  ]
}' \
https://server.codeium.com/api/v1/CascadeAnalytics

Response

queryResults
array
Array of query results, one for each query request

Example Response

{
  "queryResults": [
    {
      "cascadeLines": {
        "cascadeLines": [
          {
            "day": "2025-05-01T00:00:00Z",
            "linesSuggested": "206",
            "linesAccepted": "157"
          },
          {
            "day": "2025-05-02T00:00:00Z",
            "linesSuggested": "16"
          }
        ]
      }
    },
    {
      "cascadeRuns": {
        "cascadeRuns": [
          {
            "day": "2025-05-01T00:00:00Z",
            "model": "Claude 3.7 Sonnet (Thinking)",
            "mode": "CONVERSATIONAL_PLANNER_MODE_DEFAULT",
            "messagesSent": "1",
            "cascadeId": "0d35c1f7-0a85-41d0-ac96-a04cd2d64444"
          }
        ]
      }
    },
    {
      "cascadeToolUsage": {
        "cascadeToolUsage": [
          {
            "tool": "CODE_ACTION",
            "count": "15"
          },
          {
            "tool": "LIST_DIRECTORY",
            "count": "20"
          }
        ]
      }
    }
  ]
}

Notes

  • The API returns raw data which may contain “UNKNOWN” values
  • For metrics analysis, aggregate by specific fields of interest (e.g., sum promptsUsed for usage patterns)
  • Mode and prompt data may be split across multiple entries
  • Credit consumption (promptsUsed) is returned in cents (100 = 1 credit)