Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New API endpoint: Failed and delivered messages by month (notification_status) #1007

Closed
3 tasks
ccostino opened this issue May 17, 2024 · 0 comments
Closed
3 tasks
Assignees
Labels
engineering python Pull requests that update Python code

Comments

@ccostino
Copy link
Contributor

We need a new API endpoint that will provide us the following information: the number of failed and delivered messages by month (notification_status)

As a part of this work, we'll also have to come up with an approach to how we want to structure and organize these new endpoints. Ideally this would be an ADR, but it'd be helpful to have a working example to review and discuss as a team so we can see what direction we want to go in.

As discussed, these are some of the considerations we've come up with for the new endpoints:

  • Keep them well-focused and well-scoped so they're specific and only working with/retrieving the data they're intended for.
  • Keep endpoints focused on a specific object (e.g., data related to just a service; data related to just a user; etc.).
  • Make them as flexible as possible:
    • If someone is requesting data about a service, then the endpoint ought to have something like service/<service_id> in its route to specify the service
    • Conversely, if someone is trying to sort, filter, etc., data on that endpoint, e.g., by a date or a time window, then that should be a query parameter that is passed in instead of being hardcoded anywhere

Lastly, note that creating the new endpoint in the API may not be enough! We will also likely have to add support for it in one of the API clients in the admin.

Implementation Sketch and Acceptance Criteria

  • Create the new endpoint to support the frontend data visualization in a place that makes sense
    • Create the route, view function, JSON serialization, and any support methods necessary
  • Add tests for the new endpoint
  • If needed, add support for the new endpoint on the admin side in the most appropriate API client in the admin project
    • Add tests there as well as needed

Security Considerations

  • Be mindful of the data that we're going to expose with the new endpoint; by and large it should be what's already visible, just not grouped together and/or formatted as we need it yet, but any new data we need to double check that it's appropriate to expose and share.
  • Make sure any permissions checks and/or decorators used for other endpoints are also on this new endpoint to maintain the proper access to the new endpoint.
@ccostino ccostino added engineering python Pull requests that update Python code labels May 17, 2024
@ccostino ccostino moved this to ⬇ Up-Next in Notify.gov product board May 17, 2024
@anagradova anagradova self-assigned this May 20, 2024
anagradova added a commit that referenced this issue May 22, 2024
anagradova added a commit that referenced this issue May 26, 2024
@anagradova anagradova moved this from ⬇ Up-Next to 🏗 In progress (WIP: ≤ 3 per person) in Notify.gov product board Jun 13, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress (WIP: ≤ 3 per person) to ✅ Done in Notify.gov product board Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering python Pull requests that update Python code
Projects
Archived in project
Development

No branches or pull requests

3 participants