Closed lulf closed 2 years ago
Sorry for the spam. I accidentally hit create so I had to update the issue a few times with a more accurate description
@lulf Ulf, thank you for creating this issue. The ids.dev_eui
field is indeed a part of the allowed field mask for the Set
method, because you have to use it when registering the end device. However, when the end device is already created, this field can no longer be changed, i.e. you cannot update the DevEUI. This goes for app ID, device ID, join/app EUI, device EUI and API key ID. You can also notice that TTS Console prevents you from updating these fields as well.
To close this issue, I'll make a PR with a note that IDs cannot be updated.
@nejraselimovic Thanks for clarifying this! We'll update our usage of the API accordingly.
Summary
We have a component that is reconciling the internal state of our device database with TTN API, and it recently started failing with the following error:
I am not sure if this is an expected change on your end or not, but it seems like a regression unless I'm mistaken about it used to work before. It could also be that it just didn't throw the error before and ignored the fields that were not updateable.
In either case it would be useful to know if it's expected or not and if it's expected, make sure it's documented in the API reference.
Steps to Reproduce
Create a device
Attempt to update EUI of device:
I'm using the public TTN service.
What do you see now?
That the device update request fails.
What do you want to see instead?
That I'm allowed to update the EUI OR that the documentation is updated to mention which field_masks are supported and not for Update operations.
Environment
Linux + curl using the REST API
...