Issue #8560 resolved

Why bitbucket api doesn't support the PUT method in version 2 ?!

samuel hints
created an issue

The requests in version 1 :

  • /api/1.0/repositories/accountname/repo

  • DELETE, PUT, GET methods work but the POST method not work.

    • HTTP/1.1 500 Internal Server Error.
{"error": {"message": "create() got an unexpected keyword argument 'username'", "detail": " File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/piston/resource.py\", line 198, in __call__\n result = checked_meth(request, *args, **kwargs)\n File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/piston/resource.py\", line 185, in checked_meth\n return meth(*args, **kwargs)\n File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/newrelic-2.5.0.94/newrelic/hooks/component_piston.py\", line 33, in __call__\n return self._nr_wrapped(*args, **kwargs)\n File \"/opt/python/domains/bitbucket.org/2013-07-25/bitbucket/../bitbucket/apps/api/v10/decorators.py\", line 334, in wrapper\n return func(*args, **kwargs)\n", "id": "61420193b0c14d11b8bb4a5555275ca6"}}

.......................................................................

The requests in version 2 :

  • /api/2.0/repositories/accountname/repo

  • DELETE, POST, GET methods work but the PUT method not work.

    • HTTP/1.1 405 Method Not Allowed.

Comments (6)

  1. Erik van Zijst staff

    Please refer to the documentation regarding the use of the APIs:

    As for the methods supported by the 1.0 repositories endpoint, see:

    https://confluence.atlassian.com/display/BITBUCKET/repository+Resource+1.0

    For the methods supported by the 2.0 repositories endpoint, see:

    https://confluence.atlassian.com/display/BITBUCKET/repository+Resource

  2. samuel hints reporter

    Thanks Erik van Zijst for reply.

    So, this methods (DELETE, POST) deprecated on the version 1.0 , and the PUT method simply not yet implemented on the version 2.0 !!!?

    And current my requests should be like this :

    1. POST /api/2.0/repositories/accountname/repo

    2. PUT /api/1.0/repositories/accountname/repo

    3. GET /api/2.0/repositories/accountname/repo

    4. DELETE /api/2.0/repositories/accountname/repo

    .

  3. Log in to comment