Get analytics data
Retrieve comprehensive analytics data for the authenticated tenant including: - Document view and download statistics with breakdowns - Contact activity…
Retrieve comprehensive analytics data for the authenticated tenant including:
- Document view and download statistics with breakdowns
- Contact activity metrics and engagement data
- Access logs with recent user interactions
- Trend analysis with previous period comparisons
Data is automatically filtered by the authenticated tenant and supports configurable time periods for analysis.
Authorization
bearerAuth In: header
Query Parameters
Supported rolling periods use OpenPanel's native 'range' parameter. The all_time period uses explicit startDate/endDate and start/end values, and includes analytics collected from 2024-01-01 onward.
"7d"Value in
- "7d"
- "30d"
- "90d"
- "monthToDate"
- "lastMonth"
- "yearToDate"
- "lastYear"
- "all_time"
Whether to use range parameter (recommended) or fall back to startDate/endDate.
trueCustom start date (YYYY-MM-DD format). Only used when useRange=false or when period is not a valid range. Overrides period parameter when used with endDate.
^\d{4}-\d{2}-\d{2}$dateCustom end date (YYYY-MM-DD format). Only used when useRange=false or when period is not a valid range. Overrides period parameter when used with startDate.
^\d{4}-\d{2}-\d{2}$dateResponse Body
application/json
application/json
application/json
curl -X GET "https://app.orbiqhq.com/api/v1/analytics?period=30d" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Accept: application/json"{ "documentStats": [ { "id": "doc-123", "name": "Privacy Policy", "views": 245, "downloads": 78 }, { "id": "doc-456", "name": "Terms of Service", "views": 189, "downloads": 42 } ], "contactStats": [ { "id": "cust-abc", "name": "Acme Inc", "documentsAccessed": 8, "lastAccess": "2024-03-15T14:32:00Z" }, { "id": "cust-def", "name": "TechCorp", "documentsAccessed": 12, "lastAccess": "2024-03-17T09:45:00Z" } ], "accessLogs": [ { "id": "log-001", "document": "SOC 2 Type II Report", "contact": "TechCorp", "user": "john.doe@techcorp.io", "action": "View", "timestamp": "2024-03-17T09:45:00Z" }, { "id": "log-002", "document": "Penetration Test Results", "contact": "Acme Inc", "user": "security@acme.com", "action": "Download", "timestamp": "2024-03-15T14:32:00Z" } ], "trends": { "totalViews": { "current": 896, "previous": 800, "changePercent": 12, "trend": "up" }, "totalDownloads": { "current": 361, "previous": 334, "changePercent": 8.1, "trend": "up" }, "activeContacts": { "current": 3, "previous": 3, "changePercent": 0, "trend": "flat" } }}How is this guide?