Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Issue trying to get information via API

Ben Sheppard November 18, 2014

I created a new Trial account, and set up my first project. I added an issue, and several other pieces. I need to access that data via the API using C#.

For right now, I'm using Basic authorization and am including my username and password in the headers. My account is set up as the Admin for the project.

The URL that I'm sending a GET to is http://[my account].atlassian.net/rest/api/latest/issue/TP-1 where TP-1 is the ID for the project I created. With my correct username and password, the result that I'm getting gives the following content:

{

    "errorMessages" :[

        "You do not have the permission to see the specified issue.",

        "Login Required"

    ],

    "errors": {}

}

What am I missing? When I query for my projects, I receive an empty array. Is this a limitation of the Trial version?

I can post my code if necessary, but I haven't seen other references to C# code and didn't want to muddle my question. 

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Zubaidullou November 26, 2014

Hi Ben,

My suggestion for you, try JIRA REST Client. I'm using it and it's cool )).

small example:

SearchResult searchResult = restClient.getSearchClient().searchJql( filter, progressMonitor );
Iterable<BasicIssue> userIssueList = searchResult.getIssues();

 

here, in filter you'll write JQL and get what you want. In userIssueList there is everything about issue.

 

Ben Sheppard December 1, 2014

Except we use C# and now Java.

Zubaidullou December 1, 2014

you mean, now you're using Java.

Ben Sheppard December 1, 2014

No, we do not use Java, sorry.

Zubaidullou December 1, 2014

Aaa ok. )))) This was on Java

0 votes
Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 18, 2014

Wow that looks horrible in a comment but I hope that it helps! I put it in a comment because it is not really an answer but rather a helping hand. :)

0 votes
Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 18, 2014

We place no trial limitations on the REST API because we DO want you to start writing integrations for our products. My suggestion would be: try hitting the rest endpoints with the Rest API Browser (https://developer.atlassian.com/display/DOCS/Using+the+REST+API+Browser) and then just copy what that does in C#. That would be the easiest way to make sure that you are doing it right. If you want an instance that has the REST API Browser for development then just install the atlassian plugin SDK https://developer.atlassian.com/display/DOCS/Set+up+the+Atlassian+Plugin+SDK+and+Build+a+Project and then, in a terminal: 'atlas-run --product jira'. That will bring up a jira at localhost:2990/jira with the Rest API Browser installed. You can get to the Rest API Browser easily by using the 'dot dialog': http://blogs.atlassian.com/2012/08/jira-tip-of-the-month-dot-and-comma-dialog-shortcuts/

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events