Hey guys!
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!
I've check these similar content in the community, hope it helps:
@[deleted]API 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @DPKJ !
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?
Thanks again!
curl --request GET --url "https://mycompanysite.atlassian.net/rest/api/3/filter/10023"
--ssl
--user "elena.bolpachova@companydomain.com:token"
--header "Accept: application/json"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[deleted]My 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.