Hi,
i would like to ask about the correct flow of modifying users.
I did something like:
user = api.get_user_id('ba10be03-cba9-4da3-b8cf-6e626720195d')
user.name = 'Test User'
api.patch_user_id('ba10be03-cba9-4da3-b8cf-6e626720195d', user)
But I am getting 400 bad request.
Also how can you change expanded attributes like location
or manager
?
Thank you
I am sorry I put there wrong example.
The bad request is only when I want to change location
or manager
for a user.
There is an issue with the way the contract is written. This doesn't currently work as documented. I've opened API-2438 to correct it.
Thank you.
And could you tell me how it works then? How can I change location
or manager
using PythonSDK or direct API call?
For manager, you can manually make the request by specifying "manager": "guid"
in the request (instead how it's documented like "manager": { "id": "guid" }
). I can't say how long that will work for, however. The fix to the noted issue may change that behavior. There is no way to work around this with the python SDK unless you edit the source and use your own version.
For location, that's actually a documentation shortcoming with the SDK. That property is readonly and cannot be set. The request and response classes are the same, and python doesn't really have a way to identify properties as readonly.