Skip to content

Add Enterprise Analytics API documentation#38

Merged
hongyi-chen merged 7 commits intomainfrom
hongyi/enterprise-analytics-api-docs
May 8, 2026
Merged

Add Enterprise Analytics API documentation#38
hongyi-chen merged 7 commits intomainfrom
hongyi/enterprise-analytics-api-docs

Conversation

@hongyi-chen
Copy link
Copy Markdown
Collaborator

@hongyi-chen hongyi-chen commented May 8, 2026

Summary

Adds a new reference page documenting the Enterprise Analytics API (Early Access) under enterprise/enterprise-features/analytics-api. The page covers the three endpoints exposed under /api/v1/enterprises/analytics/:

  • GET /summary — team-level rollup with optional time-series grouping
  • GET /users — per-user aggregates split by local/cloud, paginated
  • GET /events — message-level activity events, paginated and filterable

Verified against the current warp-server develop branch (handlers, request/response types, middleware, and feature-flag config), so query parameters, response shapes, defaults, limits, ordering, gating, and the Admin Panel privacy toggle name all match the implementation.

What's in the page

  • Early Access :::note callout pointing readers to their account team and the Admin Panel privacy toggle (Enterprise Usage Reporting (Early Access)).
  • Prerequisites and access (enterprise plan, admin role, personal API key, data-collection toggle).
  • Quickstart curl example.
  • Per-endpoint sections with parameters, response shapes (ungrouped + grouped where applicable), and notes on omitted fields.
  • Pagination semantics, common use cases, roadmap, FAQ, and related-resource links.

Sidebar / nav

  • New entry added under Enterprise > Enterprise features in src/sidebar.ts.

Validation

  • npm run build: 316 pages built; sidebar slug resolves and the new MDX parses cleanly.
  • python3 .agents/skills/style_lint/style_lint.py --all: 0 issues.

Test plan

  • Visit the new page in npm run dev and confirm the sidebar entry shows under Enterprise > Enterprise features.
  • Verify the page renders without MDX errors and all internal links resolve.

Conversation: https://staging.warp.dev/conversation/1a693f95-7a90-4388-8eaa-faf381c85f87

Co-Authored-By: Oz oz-agent@warp.dev

Documents the three endpoints exposed under /api/v1/enterprises/analytics/ (summary, users, events) for enterprise admins on the Early Access program. Covers prerequisites, the Admin Panel privacy toggle, per-endpoint query parameters and response shapes verified against warp-server, pagination semantics, common use cases, roadmap, and FAQ.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 8, 2026 9:19pm

Request Review

hongyi-chen and others added 2 commits May 7, 2026 17:35
Drop the 'may change without notice' claim and clarify that Early Access is available to all enterprise teams. Direct admins to the Privacy toggle to start collecting data.

Co-Authored-By: Oz <oz-agent@warp.dev>
Copy link
Copy Markdown

@yuanben-warp yuanben-warp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, left some comments for suggestion as well as potential internal concept leak concern

Comment thread src/content/docs/enterprise/enterprise-features/analytics-api.mdx
Comment thread src/content/docs/enterprise/enterprise-features/analytics-api.mdx Outdated
Comment thread src/content/docs/enterprise/enterprise-features/analytics-api.mdx
Comment thread src/content/docs/enterprise/enterprise-features/analytics-api.mdx Outdated
Comment thread src/content/docs/enterprise/enterprise-features/analytics-api.mdx
Comment thread src/content/docs/enterprise/enterprise-features/analytics-api.mdx Outdated
Comment thread src/content/docs/enterprise/enterprise-features/analytics-api.mdx Outdated
The `Message.message` proto oneof is not part of the public API contract,
so the docs shouldn't tell readers the `message_type` set 'mirrors' it.
Replace the proto reference with a slightly longer list of common values
and a forward-looking note. Soften 'snake_case proto field names' on
`tool_type` for the same reason.

Co-Authored-By: Oz <oz-agent@warp.dev>
- Clarify in the Early Access callout that the API exposes aggregated
  metrics only; raw conversation contents require cloud-synced
  conversations.
- Add a Performance bullet to the shared endpoints rules noting that
  wider windows and finer group_by_period granularity can be slower.
- Document that periods with no recorded activity are filled with
  default empty values in the grouped summary response.
- Soften the llm_request_ids/model_ids bullet to drop the internal
  multi-partition summarization detail.
- Split was_edited_by_user out as a sub-bullet under code_changes.

Co-Authored-By: Oz <oz-agent@warp.dev>
…casing in Related resources

Co-Authored-By: Oz <oz-agent@warp.dev>
@hongyi-chen hongyi-chen force-pushed the hongyi/enterprise-analytics-api-docs branch from efd3661 to ee2a148 Compare May 8, 2026 21:15
Copy link
Copy Markdown

@yuanben-warp yuanben-warp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

Same pattern as the Message.message proto leak resolved earlier: don't
expose internal auth-backend details to enterprise readers. Replace
'Firebase UID' / 'firebase-uid-abc' with neutral 'user-uuid-abc' and
describe user_id as the unique identifier returned by the API.

Co-Authored-By: Oz <oz-agent@warp.dev>
@hongyi-chen hongyi-chen merged commit 1584d70 into main May 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants