REST API 2.0 and linking RT::IR tickets

Hi,

Following the examples on the RT::Extension::REST2 - Adds a modern REST API to RT under /REST/2.0/ - metacpan.org page I can get the basic things of ticket search, creation etc working. However, RT::IR also requires incidents, incident reports and investigations to be linked to one another. Does anyone know how ticket linking could be achieved using the REST API 2.0 ? What calls are needed and in what order?

All help is very much appreciated.

Cheers, Mika

Hmm … answering my own question here. It seems that linking of tickets is not supported by RT-Extension-REST2 although there is a patch available (that hasn’t made its way to the RT main distribution?) see REST2 - Linking tickets .

A work-around to link an incident report to an incident for the moment is (ab)using the ordinary web interface:

curl -H 'Authorization: token XX_TOKEN_XX'
       -H 'Content-Type: application/x-www-form-urlencoded'
       -d 'id=<incident_id_here>&BulkLink=1&SelectedTickets=<incident_report_id_here>&SubmitTicket=Link'  $RTIR_BASE_URL/RTIR/Incident/Display.html'

And the usual disclaimers: the above worked against RT 4.2.12 and RT::IR 3.2.1 and will probably crumble at any subsequent RT version update that happens to change the names of the web form parameters.

It’s worth noting this feature will be available in the 5.0.1 release:

1 Like