I have a small problem with getting all projects from JIRA with Python.
I'm using this code with my access token:
import requests
import json
url = "https://mydomain.atlassian.net/rest/api/3/project/"
headers = {
"Accept": "application/json",
"Bearer": "Access_token"
}
response = requests.request(
"GET",
url,
headers=headers
)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
This returns 200, but with an empty array. I've also tried getting a single project with
/rest/api/3/project/{projectkey}
but this gives an error that this projectid is not found or I don't have the access rights (which I do have).
Any thoughts on what might be the problem here? What should I add or change or try to get this working?
Thanks!