Update the issue via the API with user input.

Added by Andrii Kurochkin 3 months ago

How can I add a comment to a issue on behalf of a specific user? At the moment, the comment is added from the owner of the API key.

This method doesn't work.

curl https://redmine.my.ua/issues/5152.json -H "Content-Type: application/json" -H "X-Redmine-API-Key: 1367223423423234bbf0402f4259" --request PUT --data '{"issue": {"notes": "test2", "user": {"id": 74}}}'

Replies (2)

RE: Update the issue via the API with user input. - Added by Holger Just 3 months ago

If the API key belongs to an administrator user, you can impersonate another user by setting an X-Redmine-Switch-User header in your request. See Rest Api for details.

User impersonation is not possible if your key only belongs to a "normal" user to avoid arbitrary impersonation.

RE: Update the issue via the API with user input. - Added by Andrii Kurochkin 3 months ago

Yes, it's definitely needed. Thank you!

(1-2/2)