mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-25 09:06:02 +03:00
[PR #1397] [MERGED] REST API v1 using django-ninja #4415
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#4415
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/1397
Author: @Brandl
Created: 4/9/2024
Status: ✅ Merged
Merged: 4/24/2024
Merged by: @pirate
Base:
main← Head:main📝 Commits (2)
5f9aac1api v199502bdMerge branch 'main' into main📊 Changes
15 files changed (+2877 additions, -2395 deletions)
View changed files
➕
archivebox/api/__init__.py(+0 -0)➕
archivebox/api/apps.py(+5 -0)➕
archivebox/api/archive.py(+184 -0)➕
archivebox/api/auth.py(+48 -0)➕
archivebox/api/migrations/0001_initial.py(+28 -0)➕
archivebox/api/migrations/__init__.py(+0 -0)➕
archivebox/api/models.py(+30 -0)➕
archivebox/api/tests.py(+27 -0)📝
archivebox/core/settings.py(+1 -0)📝
archivebox/core/urls.py(+9 -0)➕
archivebox/index.sqlite3(+0 -0)📝
package-lock.json(+2371 -2393)📝
pdm.lock(+105 -1)📝
pyproject.toml(+1 -0)📝
requirements.txt(+68 -1)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.