Does Bugzilla 5.2 REST API support "Update User" with PUT /rest/user/3 with API key ? .

Carlo Barrientos carlo.barrientos at si2.org
Wed Mar 5 04:46:38 UTC 2025


Is the Update User functionality supported in 5.2?

Documentation for 5.2 says:

6.1.13.5. Update User<https://bugzilla.readthedocs.io/en/5.2/api/core/v1/user.html#update-user>
Updates an existing user account in Bugzilla. You must be authenticated and be in the editusersgroup to perform this action.
Request

PUT /rest/user/(id_or_name)


You can edit a single user by passing the ID or login name of the user in the URL. To edit more than one user, you can specify addition IDs or login names using the ids or names parameters respectively.
name
type
description
id_or_name
mixed
Either the ID or the login name of the user to update.
ids
array
Additional IDs of users to update.
names
array
Additional login names of users to update.
full_name
string
The new name of the user.
===============
However, when I try to make a change to user/3  in my test server, the response is an error as shown below:

 % curl -X PUT "http://localhost/bugzilla/rest.cgi/user/3?api_key=sHpZTMcOL5qZIo4DTW3Ry4jgShbnFpq7iEriuc4n"  -d '{"full_name": "New Real Name"}'

{"message":"The requested method 'Bugzilla::User::set_keywords' was not found.","error":true,"documentation":"https://bugzilla.readthedocs.org/en/5.0/api/","code":67399}%

Also, the error message refers to 5.0 documentation but the API  /rest/version says it's 5.2+

 https://bugzilla.XXXX/rest/version  responds with:

{
   "version" : "5.2+"
}

The api_key is for an admin user who is in the editusers group but it's just not working.
I thought that perhaps I could delete the user in mysql and recreate it with the change but I would be afraid that the user id for the new user would be incorrect and it could wreak havoc with anything that refers to the "old" user id.

Can you suggest a workaround?  Do I need to enable something for Update User to work?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bugzilla.org/pipermail/support-list/attachments/20250305/991c5c64/attachment-0001.html>


More information about the support-list mailing list