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

David Miller justdave at bugzilla.org
Wed Mar 5 12:00:28 UTC 2025


The error message you're getting would happen if you have a "keywords" 
object in your JSON payload. Your example doesn't show one, though, 
which doesn't make sense. Did you simplify the example without actually 
trying it that way?  I tried your example exactly as-is (except with the 
URL and api key changed of course) and it works fine on mine.


On 3/4/25 11:46 PM, Carlo Barrientos wrote:
> 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 /editusers/group 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?
>
> _______________________________________________
> support-list mailing list
> support-list at bugzilla.org
> https://lists.bugzilla.org/listinfo/support-list
-- 
[Bugzilla Logo] 	
*Dave Miller*
Project Leader
*Bugzilla Project*
https://bugzilla.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bugzilla.org/pipermail/support-list/attachments/20250305/24e5c973/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0GXeiLFiHxVinUfZ.png
Type: image/png
Size: 7345 bytes
Desc: not available
URL: <http://lists.bugzilla.org/pipermail/support-list/attachments/20250305/24e5c973/attachment-0001.png>


More information about the support-list mailing list