1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #9481 invalid

API call to issues endpoint fails if parameters provided

Alexey Strelkov
created an issue

I'm using an example from https://confluence.atlassian.com/display/BITBUCKET/OAuth+consumer+examples

Everything seems fine until I try to get only closed issues, so I change

url = 'https://bitbucket.org/api/1.0/repositories/%s/%s/issues/' % (username, repo_slug)


url = 'https://bitbucket.org/api/1.0/repositories/%s/%s/issues/?status=closed' % (username, repo_slug)

And I get a 401 HTTP status. If I change it back - it works fine.

Comments (3)

  1. Alexey Strelkov reporter

    Nevermind, I forgot that you need to pass querystring as a dict, because the lib is built on top of Requests, like that:

    url = 'https://bitbucket.org/api/1.0/repositories/%s/%s/issues/' % (username, repo_slug)
    resp = session.get(url,params={"limit":5,"status":"closed"})
  2. Log in to comment