[rt-users] Creating links with the REST interface

Alessandro Di Bella aldibella at gmail.com
Tue May 29 05:34:39 EDT 2012


Hi,

I'm trying to use the REST interface to create link two tickets
without any success.
Accordingly to the documentation, it should be enough to POST to
http://myserver/REST/1.0/ticket/<ticket-id>/links but it doesn't seem
to work.

If I issue the POST request http://rt/REST/1.0/ticket/91/links with
body content=MemberOf%3A+90, I get the reply:

RT/4.0.5 409 Syntax Error

# MemberOf: Can't link to a deleted ticket

id:
DependsOn:
DependedOnBy:
RefersTo:
ReferredToBy:
Members:
MemberOf: 90

Both tickets 90 and 91 are NOT in state deleted and same thing happens
with any other key (DependsOn, Members, etc.).  I don't understand the
reason for error message.

I also put a sniffer in place to check what the command line tools
sends to the server and it turns out that it's nothing like the API
specification:


POST /REST/1.0/ticket/link HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: rt:9980
User-Agent: RT/3.0b
Content-Length: 379
Content-Type: multipart/form-data; boundary=xYzZY

--xYzZY
Content-Disposition: form-data; name="		"

dependson
--xYzZY
Content-Disposition: form-data; name="to"

76
--xYzZY
Content-Disposition: form-data; name="del"

0
--xYzZY
Content-Disposition: form-data; name="id"

77
--xYzZY
Content-Disposition: form-data; name="user"

root
--xYzZY
Content-Disposition: form-data; name="pass"

password
--xYzZY--

The multipart request works but is it an altenative to the documented
one or is is the documentation wrong?

Any help would be much appreciated.

Regards,

Alessandro



More information about the rt-users mailing list