REST2 actions as other user

Hey,

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).

Cheers,
Andrew

[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": "user1@example.com", "Cc": "user2@example.com",
            "Content": "Testing a create",
            "CustomFields": {"Severity": "Low"}}'
        'https://myrt.com/REST/2.0/ticket'

Is the requestor not set to user1@example.com 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.

Cheers,
Andrew