I generally use a URL like the following in order to see an item in the Jira backlog:
https://{server name}/jira/secure/RapidBoard.jspa?rapidView=6588&view=planning&selectedIssue=C165889-1670
And I use a URL like the following in order to view a specific story:
https://{server name}/jira/browse/C165889-1670
Now I want to create a subtask via C#, so I tried the following code:
public static async Task<string> CreateSubTask()
{
var client = new HttpClient();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
using (var reader = new StreamReader(await (await client.PostAsJsonAsync(
"https://{server name}/jira/secure/rest/api/latest/issue/",
new
{
project = new {key = "My Project"},
parent = new {key = "C165889-1670"},
summary = "My Summary",
description = "My Description",
issuetype = new {id = 5}
})).Content.ReadAsStreamAsync()))
return await reader.ReadToEndAsync();
}
But when I check the returned string, I find a message like the one in https://jira.atlassian.com/secure/attachment/180809/screenshot-2.png - a dead link page.
Can anyone tell me what I am doing wrong?
Thanks in advance,
Itai