I recognize that this is not an official SDK but since Atlassian doesn’t have one for C# thought I’d post this here.
I am trying to use the Atlassian.SDK in an Azure function project and it won’t even connect. This is jira cloud so I’m using https://mycompany.atlassian.net as the URL. The one thing that wasn’t clear in the docs was if you need the entire API endpoint or just the FQDN as above. That said, I tried it both ways.
var jira = Jira.CreateRestClient(jiraUrl, "user@domain","apikey");
When that executes it throws the following exception:
System.MissingMethodException: Method not found: 'Void RestSharp.RestClient..ctor(System.String)'.
at Atlassian.Jira.Remote.JiraRestClient..ctor(String url, IAuthenticator authenticator, JiraRestClientSettings settings)
at Atlassian.Jira.Remote.JiraRestClient..ctor(String url, String username, String password, JiraRestClientSettings settings)
at Atlassian.Jira.Jira.CreateRestClient(String url, String username, String password, JiraRestClientSettings settings)
Using the exact same credentials with a RestSharp RestClient works fine.
var auth = new HttpBasicAuthenticator("user@domain", "apikey");
var jiraOptions = new RestClientOptions(jiraUrl) {Authenticator = auth };
var jira = new RestClient(jiraOptions);
Versions
Item | Version |
---|---|
.NET | Core 3.1 |
Atlassian.SDK | 13.0.0 |
RestSharp | 110.2.0 |
Newtonsoft.Json | 13.0.3 (added this explicitly to see if it would help … it did not). |