Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to fix response 500 for issues-export api ?

azuma51
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 28, 2020

I want to get a zip file using API 2.0 issues-export.
I tried along the document, but the result was 500.

>>> import requests
>>> ep = 'https://api.bitbucket.org/2.0/repositories/(username)/(repo_slug)/issues/export'
>>> r = requests.post(ep, auth=(username, password))
>>> r
<Response [202]>
>>> r.json()
{'status': 'ACCEPTED', 'count': 0, 'pct': 0, 'phase': 'Initializing', 'total': 0, 'type': 'issue_job_status'}

>>> url = r.headers['location']
>>> url
'https://api.bitbucket.org/2.0/repositories/(username)/(repo_slug)/issues/export/(repo_slug)-issues-ead0042.zip'

>>> r = requests.get(url, auth=(username, password))
>>> r
<Response [500]>
>>> r.json()
{'type': 'error', 'error': {'message': 'Something went wrong', 'id': '9946eb507be141488b04d7a7c3412529'}}


I tride again, but there is no job this time.

>>> r = requests.get(url, auth=(username, password))
>>> r
<Response [200]>
>>> r.json()
{'type': 'error', 'error': {'message': 'No export job started'}}

 

Sure 5 months ago it was successful.
Waht should I do ?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events