Our development team is looking to perform our first .NET based integration with Jira in order to create tickets for a Service Desk. As such I am writing an initial Hello World style Azure Function to investigate the requirements and capabilities of said integration. The SDK NuGet that we have attempted to use is here https://www.nuget.org/packages/Atlassian.SDK
A simple app to query for issues has been implemented as a first step, but unfortunately this does not seem to work due to a breaking change introduced into the Atlassian API here: https://developer.atlassian.com/changelog/#CHANGE-2046
Error thrown by the SDK:
Response Status Code: 410. Response Content: {"errorMessages":["The requested API has been removed. Please migrate to the /rest/api/3/search/jql API. A full migration guideline is available at https://developer.atlassian.com/changelog/#CHANGE-2046"],"errors":{}})
I see on the bit bucket repo (https://bitbucket.org/farmas/atlassian.net-sdk/src/master/), that the NuGet package is no longer supported. I'm not sure whether introducing a breaking change in the API might mean that it could be updated?
If not, is there an alternative that can be used in .NET (or otherwise), or will I have to roll my own HTTP requests?
The function class is provided below for context (apologies for the lack of spacing, copy paste ain't workin' right!)
Thanks
public class HelloWorld
{
private readonly ILogger<HelloWorld> _logger;
private readonly JiraOptions _jiraOptions;
public HelloWorld(ILogger<HelloWorld> logger, IOptions<JiraOptions> jiraOptions)
{
_logger = logger;
_jiraOptions = jiraOptions.Value;
}
[Function("HelloWorld")]
public async Task<IActionResult> RunAsync([HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequest req)
{
_logger.LogInformation("C# HTTP trigger function processed a request.");
// create a connection to JIRA using the Rest client
var jira = Jira.CreateRestClient(_jiraOptions.BaseUrl, _jiraOptions.Username, _jiraOptions.Password);
var issues = jira.Issues.Queryable.ToList();
foreach (var issue in issues)
{
_logger.LogInformation($"Issue: {issue.Key} - {issue.Summary}");
}
return new OkResult();
}
}