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%3DTSMN%20AND%20issuetype%3DBug
HTTP/2 200
server: AtlassianProxy/1.15.8.1
vary: 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.