How do I query a list of projects via Atlassin SDK in C#?

Genadij Trimailov October 12, 2019

Hi.


I am trying to use Atlassin.SDK 10.7.1 against our on prem server with version 7.11.1, and as the first step, I am trying to get a list of the projects.

the local address of Jira is http://jira/

the code:

[Test]
public async Task CanGetProject()
{
    Jira jira = Jira.CreateRestClient("http://jira", _userName, _password);
    IEnumerable<Project> projects = await jira.Projects.GetProjectsAsync();
    Assert.IsTrue(projects.Any());
}

The problem is that I get 404 back:

404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

It looks like I do not get to the point of authentication, so it does not fin the right address to start from.

Information about Jira:

Jira v7.11.1
JIRA Agile v7.11.0-DAILY20180712063948

Any ideas on how to fix this?

Thanks!

 

1 answer

1 accepted

0 votes
Answer accepted
Genadij Trimailov October 12, 2019

I figured out that in the address, I had to specify the port and one more parameter after slash, so instead of

"http://jira"

In my case, I need to have:

"http://jira:8080/company"

Suggest an answer

Log in or Sign up to answer