Configuration Manager create Snapshot Rest API 504 Error

Richard Snyder November 12, 2024

All, I am using the REST API endpoint to perform a post to create a snapshot of a project in Jira.  I am creating the project with Issues.  When I do this my python script gets a 504 error, or timeout.  I look in the audit logs and see that the snapshot creation hasn't finished yet.  I can wait for the snapshot to be created and then it's listed in snapshots.  I tried setting my timeout variable to None (see below) but I still get a 504.  Is this a server side setting or something I can set in the code to wait until the snapshot completes creation?

snapshot_configurations = {
'name': 'Test Project Snapshot',
'description': 'Here we go',
'scope': 'projectWithIssues',
'projectKey': 'PROJ',
'includeProjectFilters': True,
'includeProjectBoards': True,
'includeProjectDashboards': True,
'options': {
'includeAttachmentFiles':True
}
}

request.post(<jira url>/rest/configuration-manager/api/1.6/snapshots, data=json.dumps(snapshot _configurations), timeout=None, headers=headers, verify=False)

0 answers

Suggest an answer

Log in or Sign up to answer