mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-25 06:25:54 +03:00
[GH-ISSUE #1176] POST /api/bookmarks not working? #481
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#481
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?
Originally created by @lifepillar on GitHub (Dec 22, 2025).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/1176
I am a bit confused about the status of the API after upgrading to v1.8.0. In v1.7.x I was able to create bookmarks by posting to api/bookmarks and to get tags by accessing api/tags. None of those endpoints seem to be available any longer. On the other hand, api/v1/bookmarks and api/v1/tags are still todo's afaict.
Is it possible to add a bookmark via API in v1.8.0?
@lifepillar commented on GitHub (Jan 12, 2026):
I may not fully grasp how Shiori is evolving, but if https://github.com/go-shiori/shiori/issues/640 is current, my understanding is that there is no way to add a bookmark via the new API in v1.8.0 (api/v1/tags works, however). On the other hand, it seems that the old API for adding bookmarks has been removed. So, was the feature removed without providing a replacement?
For now, I've downgraded to v1.7.4.
@fmartingr commented on GitHub (Jan 12, 2026):
Hey folks, the add bookmark API should be available under
/api/bookmarksas it were before, either that or I did something terribly wrong in the 1.8.0 release. The UI uses the same API call to create a bookmark, so that should be working with that API.I'm running a branch on my server so I can't test this right now, but will do so later.
@fmartingr commented on GitHub (Jan 12, 2026):
Can confirm that
/api/bookmarksworks on 1.8.0 (if not, the bookmark creation will be broken). The new API will be implemented when I finish with #1157 and that will be a major release (v2.0.0).What problems do you folks see using the
/api/bookmarksendpoint?@lifepillar commented on GitHub (Jan 13, 2026):
Strange, let me dig deeper then. I have a script that adds bookmarks via the API, and it started to return
501502 after upgrading to v1.8.0.On a related note, can you confirm that the API documentation should still be reachable at
http://<shioriurl>/swagger? Because I can't access that either. Maybe I have a broken build.@fmartingr commented on GitHub (Jan 13, 2026):
Swagger was changed in an old release to be disabled by default. You can enable it again by using
SHIORI_HTTP_SERVE_SWAGGER.@lifepillar commented on GitHub (Jan 13, 2026):
Thanks for the tip on serving Swagger: that worked.
I've just built v1.8.0 from source, but I have the same issue. Using curl, I get an empty reply:
Adding session headers doesn't change anything. This is what Shiori logs when I try to access the URL from an authenticated session in the browser:
@fmartingr commented on GitHub (Jan 14, 2026):
That request is authenticated, you need to provide the auth token or cookie.
Just tried it with a fresh 1.8.0:
@lifepillar commented on GitHub (Jan 14, 2026):
Ah, got it. The new API seems to require a Cookie header, so I had replaced the Authorization header with Cookie, but I did it for all requests including those to
api/bookmarks, which still require the Authorization header. Feel free to close this.@lifepillar commented on GitHub (Jan 14, 2026):
There's still the problem that an empty response is returned in some cases, e.g., when the request is not authenticated.
@mariusrugan commented on GitHub (Jan 24, 2026):
@fmartingr this is also related https://github.com/go-shiori/shiori/issues/1167
tldr; PUT to
/api/bookmarkswith a deleted tag from a bookmark with 3 tags, is not being processed correctly,i'm debugging locally too, was looking to see if i can fix it, don't know if you already have a fix for it or not ?
thanks in advance!
github.com/go-shiori/shiori@585ea341aa/internal/webserver/handler-api.go (L407)sorry for the EDIT
the question is, this soft delete functionality - the deleted true/false on a tag - seems has no effect.
@mariusrugan commented on GitHub (Jan 25, 2026):
I've succeeded to localize the source:
I'm using a Postgres db,
tldr;
t := tag.ToDTO()is not creating a correct DTO; theDeleted = trueproperty of the Tag object is not getting into the DTO. In the history of the codebase that check (and i also am using it) is:github.com/go-shiori/shiori@585ea341aa/internal/database/pg.go (L228)@stale[bot] commented on GitHub (Feb 24, 2026):
This issue has been automatically marked as stale because it has not had any activity for quite some time.
It will be closed if no further activity occurs.
Thank you for your contributions.