/rest/issue/{issue}/execute doesn't seem to decode post parameters

I'm noticing that if I encode the post parameters, the update fails.  However, when I don't encode the post parameters, things seem to work.  Is this intentional?

Also, is there a reason that the rest interface seems to be so inconsistent?  Here are some examples:

  • create an issue => issue id returned via Location HTTP header
  • query => issues returned as XML content in body
  • update an issue => acknowledgement returned as plain text in body

Can I make a request in 4.0 that there's just 1 way for rest data to come back?  Prerably as XML content.

4 comments
Comment actions Permalink

Another issue with the /rest/issue/{issue}/execute command is that it seems to want to lower case my input.  So that FOO-123 becomes foo-123.

0
Comment actions Permalink

Dear Matt,

Issue parameter of execute command is case insensitive.

0
Comment actions Permalink

savaki wrote:

I'm noticing that if I encode the post parameters, the update fails.  However, when I don't encode the post parameters, things seem to work.  Is this intentional?

What library do you use to call YouTrack REST API?

savaki wrote:

Also, is there a reason that the rest interface seems to be so inconsistent?

No, there is no special reason but backward compatibility.

0
Comment actions Permalink

For me I have to include a second parameter for the execute to work.

String data = URLEncoder.encode("command", "UTF-8") + "=" + URLEncoder.encode(command, "UTF-8");

Does not work (error 400)

String data = URLEncoder.encode("command", "UTF-8") + "=" + URLEncoder.encode(command, "UTF-8");
data += "&" + URLEncoder.encode("disableNotifications", "UTF-8") + "=" + URLEncoder.encode("true", "UTF-8");

Does work

0

Please sign in to leave a comment.