[GH-ISSUE #17146] feat: Improving the API #56852

Closed
opened 2026-05-05 20:10:18 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @DirkRemmers on GitHub (Sep 2, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17146

Check Existing Issues

  • I have searched the existing issues and discussions.

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:

  1. PUT / PATCH methods are rarely used. I think it is good practice to also use these methods, and to reduce the POST method usage. There are obvious places that only update existing items in the database, meaning that a POST should not be used. Instead, a PATCH is better here. There are lots of use cases where the usage of these can be improved.
  2. The level of consistency within the endpoints is not high. If I for example look at how I need to get a user with an id, the endpoint looks like this: /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 the user endpoint not have id in it, it also uses a full user_id instead of just id. There are many more instances like this throughout all endpoints, and a clean-up might be good to do here.
  3. Documentation needs to be added to these endpoints. I am mainly getting my information from the /docs page, 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

  1. More usage of PUT and PATCH methods
  2. Higher consistency in the endpoint formats
  3. Increased documentation

Alternatives Considered

No response

Additional Context

No response

Originally created by @DirkRemmers on GitHub (Sep 2, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/17146 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### 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: 1. `PUT / PATCH` methods are rarely used. I think it is good practice to also use these methods, and to reduce the `POST` method usage. There are obvious places that only update existing items in the database, meaning that a `POST` should not be used. Instead, a `PATCH` is better here. There are lots of use cases where the usage of these can be improved. 2. The level of consistency within the endpoints is not high. If I for example look at how I need to get a user with an id, the endpoint looks like this: `/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 the `user` endpoint not have `id` in it, it also uses a full `user_id` instead of just `id`. There are many more instances like this throughout all endpoints, and a clean-up might be good to do here. 3. Documentation needs to be added to these endpoints. I am mainly getting my information from the `/docs` page, 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 1. More usage of `PUT` and `PATCH` methods 2. Higher consistency in the endpoint formats 3. Increased documentation ### Alternatives Considered _No response_ ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#56852