API v3 Python Patch on user 403 forbidden
I have some old python code (that I didnt write) that uses v1 of the API that does a patch with a super minimal patch data block, just the value needed. Personally, I have Groovy code that does some patching using the retrieved user in a Map object and I make a minimal map with just the stuff v3 requires that I set (which v1 didnt) like roles and password and etc, and I managed to get code working with Groovy v3.
But I'm in a circumstance where I have to use python and patch on a user, and for the life of me, I keep getting a 403 forbidden error. I've found several examples online, and basically I believe I've got everything set up correctly, the code is mostly similar to the old working v1 code except it has the changes that v3 needs. But I get a 403 error (forbidden). But I know the API token has rights to update the user (tho it is still attached to a user with an administrator role, but I dont think thats the issue, I have groovy code using the same API token).
I hate to ask people to look at code but is there anything obviously wrong here that I'm missing for python and v3?
Thanks!
I figured out the issue. I am not doing anything wrong in the code at all. The API just does NOT let me convert a user to "apionly":true ..... I can set "apionly":false all day long because it is already false.
So even though apionly is one of the items in the model for /setting/admins/{id} for PATCH, nothing in the model on the REST API v3 Swagger documentation, on the model tab there, shows that I cant change it.
But it isnt allowed. Oh well.