Hi I have created a rest api via python script and I have encountered an error due to "the anonymous user is not allowed to create, modify or delete saved filters". My role is jira admin. The filter is active and I have update the viewers from private to public (vice-versa) but same result. Here is the script that I have used:
I think you are using .get() in your response, may be try for .delete()
Hi Akhand,
thank you for your respond, I have tried to update the response function to delete but still same result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you quickly check below once.
1. URL passed is something like: url = "https://your-domain.atlassian.net/rest/api/3/filter/{id}"
2. In the auth, you are using Email and API token
3. If you have administer Jira Global permission or you are the creator of the filter.
Status code 400: usually means Bad request and is returned when filter is not found but at the same time error states that anonymous user is not allowed, maybe just recheck once on the above factors.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Akhand Pratap Singh ,
sorry you can forget my last message the script is now working I just need to recreate new api token to execute it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is amazing, my next suggestion would have been that only.
Glad that it is working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Akhand Pratap Singh ,
I have check the this 3 items that you have mentioned here is the update script:
import requests from requests.auth import HTTPBasicAuth import json auth = HTTPBasicAuth("<email>", "<api-token>") jira_url="https://<companyname>.atlassian.net" filter_id = '34382' # Construct the URL for the DELETE request delete_url = f'{jira_url}/rest/api/3/filter/{filter_id}' # Make the DELETE request response = requests.delete(delete_url, auth=auth) # Check the response status if response.status_code == 204: print(f'Filter {filter_id} deleted successfully.') else: print(f'Failed to delete filter {filter_id}. Status code: {response.status_code}') print(response.text)
I have a site-admin role, and the filter I want to delete is owned by me.
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.