-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
REST API v1 using django-ninja
#1397
Conversation
Awesome work, thanks for doing this! I'll review + merge it ASAP 🎉 The REST API has been a long-requested feature, this contribution will have a big impact. If you DM me your T-shirt size & a mailing address I'd love to send you an ArchiveBox T-shirt + stickers.
100% agree, sounds good.
I've been using
I'm planning on integrating
We are actually on Django 4.2 already on |
I've since made a bunch of API changes and refactors building on this Let me know if you have any questions/comments :) For users who want to try it out, visit ![]() |
Summary
I recently integrated Archivebox with a small python script. The current approach of setting up the full django environment is somewhat cumbersome and limits usecases where the interaction is triggered by remote systems/containers.
So here goes my initial draft of a REST API based on django ninja.
For Auth I implemented Token/Bearer Auth. Token can be obtained and validated via API Endpoints.
Ideally there should be a UI (Django Admin,...) to make obtaining them more friendly to users.
The current API resembles the CLI for compatibility and simplicity.
Adding CRUD Endpoints should be rather straight forward.
Ideally Endpoints should return a TASK-ID for long running tasks for long polling or allow for SSE subscription.
This would require to update to Django 4.2 for async support.
Related issues
Touches on all the API issues:
#496
#1126
Changes these areas