# Read provider-neutral publication analytics



URL: /docs/reference/analytics/getProjectAnalytics

```json
{"openapi":"3.0.3","info":{"title":"Postdot API","description":"The HTTP API for the lightweight, self-hosted Postdot publication orchestrator.","version":"0.1.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Postdot API key","description":"A user-owned Postdot API key sent as `Authorization: Bearer <token>`. Its project scope is limited by the creator’s current access."},"sessionCookie":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"The Better Auth email/password session cookie used by the web application."}},"schemas":{}},"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"tags":[{"name":"System","description":"Service health and runtime information."},{"name":"Access","description":"Instance membership and invitations."},{"name":"Projects","description":"Project lifecycle and access."},{"name":"Channels","description":"Project publication destinations."},{"name":"Posts","description":"Source posts and publication creation."},{"name":"Publications","description":"Publication workflow operations."},{"name":"Taxonomy","description":"Project categories and publication tags."},{"name":"Media","description":"Project media assets and uploads."},{"name":"Settings","description":"Instance-level runtime configuration."},{"name":"Audit","description":"Project audit history."},{"name":"Notifications","description":"Signed-in user notification inboxes with optional project context."},{"name":"Analytics","description":"Provider-neutral publication and execution analytics."},{"name":"Provider Analytics","description":"Persisted provider-owned metric observations."}],"paths":{"/api/projects/{projectId}/analytics":{"get":{"operationId":"getProjectAnalytics","summary":"Read provider-neutral publication analytics","tags":["Analytics"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"from","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"to","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"channelId","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"provider","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"deliveryMode","in":"query","required":false,"schema":{"type":"string","enum":["manual","automatic"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["contractVersion","projectId","projectTimeZone","observedAt","range","current","historical","coverage"],"properties":{"contractVersion":{"type":"integer","minimum":1},"projectId":{"type":"string","minLength":1},"projectTimeZone":{"type":"string","minLength":1},"observedAt":{"type":"integer","minimum":0},"range":{"type":"object","required":["from","to"],"properties":{"from":{"type":"integer","minimum":0},"to":{"type":"integer","minimum":0}}},"current":{"type":"object","required":["publications","executions","workload"],"properties":{"publications":{"type":"object","required":["total","byState","byDeliveryMode","byDimension"],"properties":{"total":{"type":"integer","minimum":0},"byState":{"type":"array","items":{"type":"object","required":["state","count"],"properties":{"state":{"type":"string","enum":["draft","scheduled","ready","publishing","published","failed","ambiguous","cancelled"]},"count":{"type":"integer","minimum":0}}}},"byDeliveryMode":{"type":"array","items":{"type":"object","required":["deliveryMode","count"],"properties":{"deliveryMode":{"type":"string","enum":["manual","automatic"]},"count":{"type":"integer","minimum":0}}}},"byDimension":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}}}},"executions":{"type":"object","required":["scheduled","due","running","retryablePending","succeeded","failed","ambiguous"],"properties":{"scheduled":{"type":"integer","minimum":0},"due":{"type":"integer","minimum":0},"running":{"type":"integer","minimum":0},"retryablePending":{"type":"integer","minimum":0},"succeeded":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"ambiguous":{"type":"integer","minimum":0}}},"workload":{"type":"object","required":["manualDue","ambiguousReconciliation","oldestDueAt","nextRunAt","futureScheduled","overdue"],"properties":{"manualDue":{"type":"integer","minimum":0},"ambiguousReconciliation":{"type":"integer","minimum":0},"oldestDueAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"nextRunAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"futureScheduled":{"type":"integer","minimum":0},"overdue":{"type":"integer","minimum":0}}}}},"historical":{"type":"object","required":["publications","executions","retries","latency","buckets"],"properties":{"publications":{"type":"object","required":["created","published","failed","ambiguous","lifecycleTransitions","byDimension"],"properties":{"created":{"type":"integer","minimum":0},"published":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"ambiguous":{"type":"integer","minimum":0},"lifecycleTransitions":{"type":"object","required":["total","byState","byDimension"],"properties":{"total":{"type":"integer","minimum":0},"byState":{"type":"array","items":{"type":"object","required":["state","count"],"properties":{"state":{"type":"string","enum":["draft","scheduled","ready","publishing","published","failed","ambiguous","cancelled"]},"count":{"type":"integer","minimum":0}}}},"byDimension":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}}}},"byDimension":{"type":"object","required":["created","published","failed","ambiguous"],"properties":{"created":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}},"published":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}},"failed":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}},"ambiguous":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}}}}}},"executions":{"type":"object","required":["claimed","attempts","succeeded","failed","retryable","ambiguous","directAmbiguous","claimRecoveries","ambiguityRecoveries","cancelled","byDimension"],"properties":{"claimed":{"type":"integer","minimum":0},"attempts":{"type":"integer","minimum":0},"succeeded":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"retryable":{"type":"integer","minimum":0},"ambiguous":{"type":"integer","minimum":0},"directAmbiguous":{"type":"integer","minimum":0},"claimRecoveries":{"type":"integer","minimum":0},"ambiguityRecoveries":{"type":"integer","minimum":0},"cancelled":{"type":"integer","minimum":0},"byDimension":{"type":"object","required":["claimed","attempts","succeeded","failed","retryable","ambiguous","directAmbiguous","claimRecoveries","ambiguityRecoveries","cancelled"],"properties":{"claimed":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}},"attempts":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}},"succeeded":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}},"failed":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}},"retryable":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}},"ambiguous":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}},"directAmbiguous":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}},"claimRecoveries":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}},"ambiguityRecoveries":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}},"cancelled":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}]}}}}}},"retries":{"type":"object","required":["scheduled","rate","attemptsPerPublication"],"properties":{"scheduled":{"type":"integer","minimum":0},"rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"attemptsPerPublication":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}}},"latency":{"type":"object","required":["queueDelay","effectDuration","scheduledToOutcome","manualCompletion"],"properties":{"queueDelay":{"anyOf":[{"type":"object","required":["count","totalMs","minMs","maxMs","averageMs"],"properties":{"count":{"type":"integer","minimum":1},"totalMs":{"type":"integer","minimum":0},"minMs":{"type":"integer","minimum":0},"maxMs":{"type":"integer","minimum":0},"averageMs":{"type":"number","minimum":0}}},{"type":"null"}]},"effectDuration":{"anyOf":[{"type":"object","required":["count","totalMs","minMs","maxMs","averageMs"],"properties":{"count":{"type":"integer","minimum":1},"totalMs":{"type":"integer","minimum":0},"minMs":{"type":"integer","minimum":0},"maxMs":{"type":"integer","minimum":0},"averageMs":{"type":"number","minimum":0}}},{"type":"null"}]},"scheduledToOutcome":{"anyOf":[{"type":"object","required":["count","totalMs","minMs","maxMs","averageMs"],"properties":{"count":{"type":"integer","minimum":1},"totalMs":{"type":"integer","minimum":0},"minMs":{"type":"integer","minimum":0},"maxMs":{"type":"integer","minimum":0},"averageMs":{"type":"number","minimum":0}}},{"type":"null"}]},"manualCompletion":{"anyOf":[{"type":"object","required":["count","totalMs","minMs","maxMs","averageMs"],"properties":{"count":{"type":"integer","minimum":1},"totalMs":{"type":"integer","minimum":0},"minMs":{"type":"integer","minimum":0},"maxMs":{"type":"integer","minimum":0},"averageMs":{"type":"number","minimum":0}}},{"type":"null"}]}}},"buckets":{"type":"array","items":{"type":"object","required":["bucketDate","bucketStartUtc","bucketEndUtc","metrics","dimensions"],"properties":{"bucketDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"bucketStartUtc":{"type":"integer","minimum":0},"bucketEndUtc":{"type":"integer","minimum":0},"metrics":{"type":"object","required":["publicationsCreated","publicationsPublished","publicationsFailed","publicationsAmbiguous","publicationLifecycleTransitions","executionClaimed","executionAttempts","executionSucceeded","executionFailed","executionRetryable","executionAmbiguous","executionClaimRecoveries","executionAmbiguityRecoveries","executionCancelled"],"properties":{"publicationsCreated":{"type":"integer","minimum":0},"publicationsPublished":{"type":"integer","minimum":0},"publicationsFailed":{"type":"integer","minimum":0},"publicationsAmbiguous":{"type":"integer","minimum":0},"publicationLifecycleTransitions":{"type":"integer","minimum":0},"executionClaimed":{"type":"integer","minimum":0},"executionAttempts":{"type":"integer","minimum":0},"executionSucceeded":{"type":"integer","minimum":0},"executionFailed":{"type":"integer","minimum":0},"executionRetryable":{"type":"integer","minimum":0},"executionAmbiguous":{"type":"integer","minimum":0},"executionClaimRecoveries":{"type":"integer","minimum":0},"executionAmbiguityRecoveries":{"type":"integer","minimum":0},"executionCancelled":{"type":"integer","minimum":0}}},"dimensions":{"type":"array","items":{"allOf":[{"type":"object","required":["channelId","channelName","provider","deliveryMode"],"properties":{"channelId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"provider":{"type":"string","minLength":1},"deliveryMode":{"anyOf":[{"type":"string","const":"manual"},{"type":"string","const":"automatic"},{"type":"string","const":"unknown"}]}}},{"type":"object","required":["metrics"],"properties":{"metrics":{"type":"object","required":["publicationsCreated","publicationsPublished","publicationsFailed","publicationsAmbiguous","publicationLifecycleTransitions","executionClaimed","executionAttempts","executionSucceeded","executionFailed","executionRetryable","executionAmbiguous","executionClaimRecoveries","executionAmbiguityRecoveries","executionCancelled"],"properties":{"publicationsCreated":{"type":"integer","minimum":0},"publicationsPublished":{"type":"integer","minimum":0},"publicationsFailed":{"type":"integer","minimum":0},"publicationsAmbiguous":{"type":"integer","minimum":0},"publicationLifecycleTransitions":{"type":"integer","minimum":0},"executionClaimed":{"type":"integer","minimum":0},"executionAttempts":{"type":"integer","minimum":0},"executionSucceeded":{"type":"integer","minimum":0},"executionFailed":{"type":"integer","minimum":0},"executionRetryable":{"type":"integer","minimum":0},"executionAmbiguous":{"type":"integer","minimum":0},"executionClaimRecoveries":{"type":"integer","minimum":0},"executionAmbiguityRecoveries":{"type":"integer","minimum":0},"executionCancelled":{"type":"integer","minimum":0}}}}}]}}}}}}},"coverage":{"type":"object","required":["supportedFactVersions","skippedFactCount","dataQuality"],"properties":{"supportedFactVersions":{"type":"array","items":{"type":"integer","minimum":1}},"skippedFactCount":{"type":"integer","minimum":0},"dataQuality":{"type":"object","required":["unknownEventVersions","unsupportedFacts","invalidMetadata","missingLifecycleState","missingAttemptMetadata","missingHistoricalDimensions","incompleteLatencyPairs","incompleteQueueDelayPairs","contradictoryAttempts","duplicateFacts","duplicateAttemptFacts"],"properties":{"unknownEventVersions":{"type":"integer","minimum":0},"unsupportedFacts":{"type":"integer","minimum":0},"invalidMetadata":{"type":"integer","minimum":0},"missingLifecycleState":{"type":"integer","minimum":0},"missingAttemptMetadata":{"type":"integer","minimum":0},"missingHistoricalDimensions":{"type":"integer","minimum":0},"incompleteLatencyPairs":{"type":"integer","minimum":0},"incompleteQueueDelayPairs":{"type":"integer","minimum":0},"contradictoryAttempts":{"type":"integer","minimum":0},"duplicateFacts":{"type":"integer","minimum":0},"duplicateAttemptFacts":{"type":"integer","minimum":0}}}}}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"servers":[{"url":"https://postbot.example","description":"Replace with your Postdot instance origin."}]}
```
