Analytics API
Retrieve document generation analytics and metrics.
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/documents/analytics | Get document generation analytics |
| GET | /api/v1/templates/:id/analytics | Get template-specific analytics |
note
Analytics data is available through the Documents and Templates API endpoints, not a separate Analytics API.
Document Analytics
GET /api/v1/documents/analytics
Get document generation analytics for your team.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
startDate | string | Start date (ISO 8601 format) |
endDate | string | End date (ISO 8601 format) |
Response
{
"summary": {
"totalDocuments": 1250,
"successfulDocuments": 1230,
"failedDocuments": 20,
"successRate": 98.4
},
"byFormat": {
"pdf": 850,
"xlsx": 400
},
"byStatus": {
"completed": 1230,
"failed": 20
},
"period": {
"startDate": "2025-01-01T00:00:00Z",
"endDate": "2025-01-31T23:59:59Z"
}
}
Example
curl "https://api.renderdoc.dev/api/v1/documents/analytics?startDate=2025-01-01&endDate=2025-01-31" \
-H "Authorization: Bearer rd_sk_your_api_key"
Template Analytics
GET /api/v1/templates/:id/analytics
Get usage analytics for a specific template.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Template ID |
Response
{
"templateId": "tmpl_abc123",
"templateName": "Invoice Template",
"format": "pdf",
"usage": {
"total": 450,
"last7Days": 45,
"last30Days": 180
},
"performance": {
"successRate": 99.1,
"avgGenerationTimeMs": 2300,
"failedCount": 4
}
}
Example
curl https://api.renderdoc.dev/api/v1/templates/tmpl_abc123/analytics \
-H "Authorization: Bearer rd_sk_your_api_key"
Dashboard Analytics
For comprehensive analytics with wallet, health, and insights views, use the dashboard API:
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/dashboard/analytics/wallet | Wallet/quota analytics |
| GET | /api/dashboard/analytics/health | Operational health metrics |
| GET | /api/dashboard/analytics/insights | Strategic insights |
| GET | /api/dashboard/analytics/export | Export analytics data |
These endpoints provide the data shown in the Analytics Dashboard.
Metrics Definitions
| Metric | Description |
|---|---|
totalDocuments | Total documents generated in the period |
successfulDocuments | Successfully generated documents |
failedDocuments | Failed document generations |
successRate | Percentage of successful generations |
avgGenerationTimeMs | Average generation time in milliseconds |
Related: Documents API | Templates API | Analytics Dashboard