mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #17146] feat: Improving the API #56852
Reference in New Issue
Block a user
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 @DirkRemmers on GitHub (Sep 2, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17146
Check Existing Issues
Problem Description
Hello,
I am currently working a lot with the API endpoints, and I noticed that the API seems a bit messy to me.
Here are some things that I noticed that I think could use some improvement:
PUT / PATCHmethods are rarely used. I think it is good practice to also use these methods, and to reduce thePOSTmethod usage. There are obvious places that only update existing items in the database, meaning that aPOSTshould not be used. Instead, aPATCHis better here. There are lots of use cases where the usage of these can be improved./api/v1/users/{user_id}. If we then look at how to get a group by its id, it looks like this:/api/v1/groups/id/{id}. Not only does theuserendpoint not haveidin it, it also uses a fulluser_idinstead of justid. There are many more instances like this throughout all endpoints, and a clean-up might be good to do here./docspage, since I don't know of any other place where all the endpoints are listed and documented in a nice way. Adding additional documentation might help with other issues I'm seeing ( #17144 , #17143) as well.I realize making changes to the API might be breaking for some users. However, I also believe that a larger cleanup is extremely beneficial for the maintenance of the entire system, especially since this is growing so rapidly.
Cheers,
Dirk
Desired Solution you'd like
PUTandPATCHmethodsAlternatives Considered
No response
Additional Context
No response