I have extracted all issues from JIRA Cloud. Anyone have tried extracting all assets from Jira Cloud API. I referenced the guide but I dont know how to authenticate for this API as there is no instructions.
Kindly share your thoughts and a sample python query if anyone has..
I used the below query as suggested in the link.. The Assets Platform REST API (atlassian.com)
import requests
import json
url = "https://xxxxxxxx.atlassian.net/rest/assetapi/asset"
auth = HTTPBasicAuth("EMAIL", "API TOKEN")
headers = {
"Accept": "application/json"
}
response = requests.request(
"GET",
url,
headers=headers
)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
Now getting the below error... ERROR MESSAGE
"GET",
url,
headers=headers
)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
{
"errorMessage": "Request must be made by an active logged in user"
}