I am trying to decline a pull request based using Bitbuket Server api.
This is the uri formed is and I am performing a Post-
/rest/api/1.0/projects/{project}/repos/{repo_slug}/pull-requests/{pr_id}/decline/?{version}
I referred https://docs.atlassian.com/bitbucket-server/rest/6.10.1/bitbucket-rest.html#idp285
But I always get the error -
{u'errors': [{u'context': None, u'message': u'You are attempting to modify a pull request based on out-of-date information.', u'expectedVersion': -1, u'currentVersion': 1, u'exceptionName': u'com.atlassian.bitbucket.pull.PullRequestOutOfDateException', u'pullRequest': {u'closed': False, u'reviewers': [], u'state': u'OPEN', u'toRef': {u'id': u're.....
What am I doing wrong? My u'currentVersion provided though call is 1 and the PR's version is also 1 .