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

JSON Export API #1531

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

JSON Export API #1531

wants to merge 3 commits into from

Conversation

matti-lamppu
Copy link
Collaborator

@matti-lamppu matti-lamppu commented Feb 6, 2025

🛠️ Changelog

  • Add two new endpoints for exporting: One for reservation units and one for reservation statistics

🧪 Test plan

  • Automated tests

🚧 Dependencies

  • Add EXPORT_AUTHORIZATION_TOKEN to Azure key vaults and sync to OpenShift.

🎫 Tickets

@matti-lamppu matti-lamppu added the feature Adds a new feature label Feb 6, 2025
@matti-lamppu matti-lamppu self-assigned this Feb 6, 2025
@matti-lamppu matti-lamppu marked this pull request as ready for review February 6, 2025 13:54
@matti-lamppu matti-lamppu requested review from ranta and vergama February 6, 2025 13:54
Copy link
Collaborator

@ranta ranta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider renaming services/csv_export to services/file_export or something similar, now that we support exporting csv and json

@matti-lamppu matti-lamppu force-pushed the statistics-export-api branch 2 times, most recently from f6bfb73 to dc4d316 Compare February 7, 2025 06:58
msg = "Not authorized to export reservation statistics."
return HttpResponseForbidden(msg)

queryset = ReservationStatistic.objects.all()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess some kind of filter is needed but that could be added later after agreeing what it should be. (The data can be updated until the reservations are in the past, so the client can't just naively query today's statistics but maybe doesn't want a full update every time either. But if there is no need not know about upcoming reservations until they have taken place, a chunk containing the recent past could be queried on a weekly or daily basis.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should ask Milla to find out what kind of filter they would like, if any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants