Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot access JQL filters in Jira-python

Ray Offiah December 18, 2024

Hi there.👋🏾

I've together a Python script which retrieves Jira tickets. It seems to work perfectly well using JQL, but I seem to be getting an AUTHENTICATED_FAILED' error when I try to use a filter:

issues == jira.search_issues("filter=12345")

 I think the problem might be the using the wrong function to access our cloud system.

I have an API token set up which doesn't cause any issues when using a straight JQL call.

I pick up the Jira object with:

 

jira = JIRA(server=user_settings.release_set['url'], basic_auth=(login['username'], login['token']))

which I'm not sure is correct (even though it works with JQL that doesn't involve filters).

Can someone point me in the right direction?

1 answer

0 votes
Tuncay Senturk
Community Champion
December 19, 2024

Hi @Ray Offiah 

Ensure the user accessing the filter is the owner. If not, confirm that your user has the necessary permissions for the filter, as it may be private or limited to specific users or groups.

Ray Offiah December 19, 2024

If I can run the filter through the UI then shouldn’t I be able to run the filter with my API token, or is there a separate set of permissions for running filters?

Tuncay Senturk
Community Champion
December 19, 2024

If you are using a token created from the same account, it should work.

Tuncay Senturk
Community Champion
December 19, 2024

Are you using username and password or a token?

As far as I know In Jira Cloud, Basic Authentication with a password is no longer supported. You should use an API token in place of the password when authenticating.

Ray Offiah December 19, 2024

Yes, I'm using a password and token with `basic_auth`.

What's odd is that it can run JQL without any problem, so it's something I'm missing to do with filter permissions and API Tokens.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events