What happened?
When you make the Update Registration call with the App Id in the URI(PATCH /api/user/registration/{userId}/{applicationId}), then it works as expected. However if you only provide the App Id in the request body(which the API doc says is okay) and NOT in the URI(/api/user/registration/{userId}/ ), then whenever you make the PATCH call it will overwrite the arrays(such as registration.data or .roles) on the registration object with whatever is in the request body instead of appending to it. It seems like its doing a JSON Merge Patch(or a PUT) when it does not have the App Id in the URL of the API call. Video below is an example of it.
https://www.loom.com/share/14f3ceaf798e4b508594387c07607a0c
Version
1.56.0
Affects Versions
No response
Alternatives / Workarounds
Treat the PATCH call like a PUT and include the whole array when making a call