[GH-ISSUE #302] Add bookmarks asynchronously #222

Closed
opened 2026-02-25 23:33:44 +03:00 by kerem · 2 comments
Owner

Originally created by @amitjethani on GitHub (Mar 10, 2021).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/302

I have some feedback on making the API leaner and asynchronous:

If I invoke POST {{host}}/api/bookmarks with the body

	"url": "https://www.nytimes.com/2021/03/10/nyregion/nyc-jail-covid.html",
        "createArchive": true

The response takes approximately 57 seconds. In my opinion, the API should respond back with a 200 OK immediately, and schedule an async task to fetch the archive.

An alternative could be that a nightly job can be scheduled that can fetch archives of unarchived links. In this way, submitting a new bookmark is always a quick operation.

Originally created by @amitjethani on GitHub (Mar 10, 2021). Original GitHub issue: https://github.com/go-shiori/shiori/issues/302 I have some feedback on making the API leaner and asynchronous: If I invoke `POST {{host}}/api/bookmarks` with the body ```json "url": "https://www.nytimes.com/2021/03/10/nyregion/nyc-jail-covid.html", "createArchive": true ``` The response takes approximately 57 seconds. In my opinion, the API should respond back with a 200 OK immediately, and schedule an async task to fetch the archive. An alternative could be that a nightly job can be scheduled that can fetch archives of unarchived links. In this way, submitting a new bookmark is always a quick operation.
Author
Owner

@clach04 commented on GitHub (Jun 20, 2021):

I would prefer the behavior not change. I do like the asynchronous idea, recommend asynchronous if provided payload has an asynchronous key present.

<!-- gh-comment-id:864564331 --> @clach04 commented on GitHub (Jun 20, 2021): I would prefer the behavior not change. I do like the asynchronous idea, recommend asynchronous if provided payload has an asynchronous key present.
Author
Owner

@amitjethani commented on GitHub (Jun 20, 2021):

That’s a good idea, an additional query parameter such as async: true could make this optional.

<!-- gh-comment-id:864568739 --> @amitjethani commented on GitHub (Jun 20, 2021): That’s a good idea, an additional query parameter such as `async: true` could make this optional.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#222
No description provided.