Below get is now working and getting 401 error code.
Filter-result = requests.get("https://xyz.atlassian.net/rest/api/2/search?jql=project ="+filterproject+" AND status = 'VERIFY' AND issuetype = 'Bug'&maxResults=1500",auth=(accountid), headers=headers)
Filter-result status: 401
please provide me the correct syntax which fixes above error.
EDIT:
I have found a support request opened by you for the same topic and I can see that it was solved by using an API Token instead of the password to authenticate your calls.
I believe the below reply is not needed anymore. Let me know if this is wrong
Hi @Naresh Gundu , The status/error code 401 means that you are not authorized to execute the call. Now, can you kindly let us know: How are you authenticating the REST API request? Are you using an API Token or anything else? Have you tried to execute the same call using curl and the same credentials? Does it work? Can you copy paste the output in here like below example? curl -D- -u xxxxxxx@atlassian.com:API-TOKEN -H "Accept: application/json" -H "Content-Type: application/json" https://xxxxxxx.atlassian.net/rest/api/2/search?jql=project=TSMN AND issuetype=BugHTTP/2 200 server: AtlassianProxy/1.15.8.1vary: Accept-Encoding...[removed]...{"expand":"schema,names","startAt":0,"maxResults":50,"total":6,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,renderedFields","id":"10513",......... Please let us know. Cheers,Dario
Hi @Naresh Gundu ,
The status/error code 401 means that you are not authorized to execute the call.
Now, can you kindly let us know:
curl -D- -u xxxxxxx@atlassian.com:API-TOKEN -H "Accept: application/json" -H "Content-Type: application/json" https://xxxxxxx.atlassian.net/rest/api/2/search?jql=project=TSMN AND issuetype=BugHTTP/2 200 server: AtlassianProxy/1.15.8.1vary: Accept-Encoding...[removed]...{"expand":"schema,names","startAt":0,"maxResults":50,"total":6,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,renderedFields","id":"10513",.........
Please let us know.
Cheers,Dario
It looks like you're new here. Sign in or register to get started.