REST2 actions as other user


We’re using the REST2 API to integrate RT into another system [0], and are using a service account to create and update tickets. The issue with this setup is that the Requestor for those changes is the service account. While we change the Requestor after the ticket is created, the emails still go out with the service users name. This is confusing for our customers.

Has anyone looked at having the REST2 API impersonate a user? So, using a service user, it then changes identity to ‘Andrew Ruthven’ for next transaction(s).


[0] The Horizon web interface for OpenStack clouds.

If you don’t mind it initially being set to the service owner, you could have a custom field with the “real” requestor and then a scrip running “On Create” that changes the Requestor to be the contents of the custom field?

What happens if you do something like:

curl -X POST -H "Content-Type: application/json" -u 'root:password'
        -d '{ "Queue": "General", "Subject": "Create ticket test",
            "Requestor": "", "Cc": "",
            "Content": "Testing a create",
            "CustomFields": {"Severity": "Low"}}'

Is the requestor not set to for you?

I have tested this and can confirm that setting the Requestor in the API works as expected. Perhaps it was with the old API that we had to set the Requestor as a second action.

The issue is that if we add Correspondance via the API the From address on emails is the API user.