I am not able to assign a ticket using REST API to a user as I used to with the following R code. When I checked the documentation, the example shows id (24 characters long generated by JIRA/Atlassian) is required. I am not sure whether the users would share the secret id to use it in the code. Please enlighten me on how to overcome this issue.
When updating an existing Jira issue, I think it is generally a good practice to retrieve the issue from the REST API, and then edit the fields you want to modify on the response object, and then use that amended issue object to POST the update. This is less likely to cause mistakes than manually crafting a Jira issue object to POST back to Jira.