So for about a couple of months now on and off, I've been trying to make a tiny little C# console web app to filter through our Jira Cloud instance for open bugs, download their error logs, dump them in the description and then check if any other bugs have the same error and link them as duplicates.
I've read through the documentation - https://developer.atlassian.com/cloud/jira/platform/rest/v3/?utm_source=%2Fcloud%2Fjira%2Fplatform%2Frest%2F&utm_medium=302
I tried with my user, because I am an admin for the project, I tried with another user I created which I also made an admin, but in both cases, when I try running Postman GET for the filter ID, with basic auth, it works, but when I try it from my console app, it returns a 401.
I even tried with cURL and got the same result...
Perhaps I should be using these api tokens, but I tried once with one and didn't work either...
Many thanks in advance for your help!
@Elena BolpachovaAPI Token are must for accessing Jira cloud rest API using BasicAuthenticatoin.
Here is curl example,
curl --request GET \
--url 'https://<SITE_NAME>.atlassian.net/rest/api/3/issue/<SOME_ISSUE_KEY>' \
--user '<EMAIL>:<API_TOKE>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
In above snippet, replace
Also, if you can share CURL command you are using I can assist.
Thanks @DPK J !
The issue was Windows doesn't like curl's single quotes :D
My only follow up would be, once I get the filter, how do I get the issue Ids from it? Can the Columns property help me?
curl --request GET --url "https://mycompanysite.atlassian.net/rest/api/3/filter/10023"
--header "Accept: application/json"
@Elena BolpachovaMy bad, was on Linux.
When you call a filter API it return detail of filter and not issues in filter. But the JSON response of filter API will contain a key name "searchUrl" you can use this URL and make another request to get issues in filter. I am attaching a sample JSON response of filter API for reference.
This 'searchUrl' is basically calling search API. Reference here - https://developer.atlassian.com/cloud/jira/platform/rest/v3/?#api-group-Issue-search
I've check these similar content in the community, hope it helps:
Learn how to use two new reports for next-gen projects in Jira Cloud: Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events