Is there an API Endpoint to Query Usage Data?
You're absolutely right that there's no usage data endpoint in the Projects API. This is a gap that several developers have noticed and requested over the years.
Current situation: The Projects API handles project management operations (creating, listing, updating projects and their settings), but it doesn't include endpoints for retrieving usage metrics like:
- API request counts
- Bandwidth consumption
- Document counts
- Asset storage usage
- CDN traffic
Right now, the only way to view usage data is through the Usage section in your project settings dashboard at manage.sanity.io. You'll need to manually navigate to your project and check the usage/billing section to see these metrics.
Is it coming soon? Based on the community discussion from 2022, Sanity's team indicated that "adding specific usage data to the dashboard is something we're unlikely to tackle in the near future." While that's a couple years old now, there hasn't been a public announcement about this feature being added to the roadmap.
What you can do:
Request detailed usage data from Support - If you need granular usage details for a specific time period, Sanity's support team can pull this data for you if you provide your project ID
Submit a feature request - The more developers request this functionality, the more likely it is to be prioritized. You can reach out through Sanity's support channels or their community Slack
Use the Activity Feed - While not the same as usage metrics, you can programmatically access content change logs if you're tracking editorial activity
Client-side monitoring - If you're primarily concerned with tracking your application's API usage patterns, you could instrument your own client-side requests
Many developers have expressed interest in programmatic access to usage data for monitoring dashboards (like Grafana, as mentioned in the community thread), automated alerting, and internal billing/chargeback systems. Adding your voice to these requests could help prioritize the feature.
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.