Skip to content

Add GET /api/v1/campaigns/:id/stats endpoint - #545

Open
geniuskidkanyi wants to merge 1 commit into
pentacent:mainfrom
geniuskidkanyi:api-campaign-stats
Open

Add GET /api/v1/campaigns/:id/stats endpoint#545
geniuskidkanyi wants to merge 1 commit into
pentacent:mainfrom
geniuskidkanyi:api-campaign-stats

Conversation

@geniuskidkanyi

Copy link
Copy Markdown

Adds a new API endpoint at GET /api/v1/campaigns/:id/stats that returns campaign delivery and engagement statistics (sent count, open/click counts, time series, etc.) plus the campaign_id.

New controller action with OpenApiSpex spec, StatsResponse schema, stats.json view render, route, and tests for unsent/sent/non-existent campaigns.

Introduces a new API endpoint at /api/v1/campaigns/:id/stats that returns
campaign delivery and engagement statistics (sent count, open/click counts,
time series, etc.) plus the campaign_id.

- Adds ApiCampaignController.stats/2 action with OpenApiSpex spec
- Adds StatsResponse OpenApiSpex schema
- Adds stats.json render to ApiCampaignView
- Adds route GET /campaigns/:id/stats
- Adds tests for unsent, sent, and non-existent campaign cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant