YouTrack API Form Data Description

177 Views Asked by At

I am trying to send the description in form data to create an issue but it seems it is only possible through parameters with a length restriction. Does anybody know a way around this or am I doing something wrong?

PUT /rest/issue?project=LSDebug&summary=Debug%2520Log HTTP/1.1
Connection: keep-alive
Content-Length: 266
Accept: application/json, text/plain, */*
Origin: http://localhost:8080
Content-Type: application/x-www-form-urlencoded
Referer: http://localhost:8080/index.html
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6


Query String Parameters
    project:LSDebug
    summary:Debug%20Log
Form Data
    description=Submitted%20Form%20name%3A%20null%2C%20Id%3Anull%0D%0AInput%20name%3A%20null%2C%20Id%3Anull%2C%20NgModel%3Aresult.homeTeamScore.score%2C%20Value%3A%201%0D%0AInput%20name%3A%20null%2C%20Id%3Anull%2C%20NgModel%3Aresult.awayTeamScore.score%2C%20Value%3A%202
2

There are 2 best solutions below

0
On BEST ANSWER

I think you need to embed the data in XML within the body of your PUT request as documented in the Import REST API docs.

0
On

Html forms only support GET or POST. So i would suggest you to post the form data using POST method instead of PUT. So that the form content will go into the body of the message and you will able to evade the URL restriction