• Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      We'd like to create tasks on a Pull Request, get all tasks of a Pull Request together with their status (done/open) using API calls.
      This currently is not listed as an option in your documentation:

      https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/pullrequests/%7Bpull_request_id%7D

            [BCLOUD-16682] Pull request task APIs

            Hi all,

            We've added public API endpoints for managing pull request tasks, please see the docs for more information:

            We will eventually be removing the internal endpoints referenced in some comments here as a workaround. If you're utilising these internal endpoints you will need to switch over to using the public ones.

             

            Cheers,

            Justin

            Justin Venkitachalam added a comment - Hi all, We've added public API endpoints for managing pull request tasks, please see the docs for more information: List tasks on a pull request Create a task on a pull request Get a task on a pull request Update a task on a pull request Delete a task on a pull request We will eventually be removing the internal endpoints referenced in some comments here as a workaround. If you're utilising these internal endpoints you will need to switch over to using the public ones.   Cheers, Justin

            Ebrahim Moshaya added a comment - - edited

             

            @Dustin DeHaven using the public or internal endpoint using the api endpoint 

            https://api.bitbucket.org/2.0/repositories/${owner}/${repo}/pullrequests/${prId}/tasks/ 

             or

            https://api.bitbucket.org/2.0/internal/repositories/${owner}/${repo}/pullrequests/${prId}/tasks/ 

             

            both give me the following errors:

            {"type": "error", "error": {"message": "Resource not found", "detail": "There is no API hosted at this URL.\n\nFor information about our API's, please refer to the documentation at: https://developer.atlassian.com/bitbucket/api/2/reference/"}}% 

            Ebrahim Moshaya added a comment - - edited   @Dustin DeHaven using the public or internal endpoint using the api endpoint  https: //api.bitbucket.org/2.0/repositories/${owner}/${repo}/pullrequests/${prId}/tasks/  or https: //api.bitbucket.org/2.0/internal/repositories/${owner}/${repo}/pullrequests/${prId}/tasks/   both give me the following errors: { "type" : "error" , "error" : { "message" : "Resource not found" , "detail" : "There is no API hosted at this URL.\n\nFor information about our API's, please refer to the documentation at: https: //developer.atlassian.com/bitbucket/api/2/reference/" }}%

            Hi everyone,

            Thank you for your feedback on Pull request task APIs.

            We reviewed this as a team recently and want to be transparent and update everyone that we won’t be publishing this in Public v2.0 API and closing this BCLOUD to focus on our upcoming roadmap (You can find our public roadmap here: https://www.atlassian.com/roadmap/cloud?selectedProduct=bitbucket)

            That said, there is an internal endpoint available as a workaround that behaves just like public endpoints.

            https://bitbucket.org/!api/internal/repositories/\{workspace}/{repository}/pullrequests/{pull request ID}/tasks

            Please be aware that internal endpoints are subject to change.

            We will update this thread if there are changes to our roadmap to accommodate this suggestion. Thank you again for providing valuable feedback to our team!

             

            Thanks
            Vinitha

            Vinitha Raja (Inactive) added a comment - Hi everyone, Thank you for your feedback on Pull request task APIs. We reviewed this as a team recently and want to be transparent and update everyone that we won’t be publishing this in Public v2.0 API and closing this BCLOUD to focus on our upcoming roadmap (You can find our public roadmap here: https://www.atlassian.com/roadmap/cloud?selectedProduct=bitbucket ) That said, there is an internal endpoint available as a workaround that behaves just like public endpoints. https://bitbucket.org/!api/internal/repositories/\ {workspace}/{repository}/pullrequests/{pull request ID}/tasks Please be aware that internal endpoints are subject to change. We will update this thread if there are changes to our roadmap to accommodate this suggestion. Thank you again for providing valuable feedback to our team!   Thanks Vinitha

            Joshua Wolsborn added a comment - - edited

            Is there a possible example of the request object available?  Our version of Bitbucket cloud seems to still be using the internal api 

            Joshua Wolsborn added a comment - - edited Is there a possible example of the request object available?  Our version of Bitbucket cloud seems to still be using the internal api 

            burbigo deen added a comment - - edited

            Hey, do you still have this issue? 
             Appvalley TutuApp Tweakbox

            burbigo deen added a comment - - edited Hey, do you still have this issue?    Appvalley   TutuApp   Tweakbox

            791116cf34b2 That is the API for Bitbucket Server. This issue is specifically for Bitbucket Cloud.

            seanaty (Inactive) added a comment - 791116cf34b2  That is the API for Bitbucket Server. This issue is specifically for Bitbucket Cloud.

            Something that I found is that a Task is just a Comment with the "severity: blocker" flag set

            https://docs.atlassian.com/bitbucket-server/rest/7.11.2/bitbucket-rest.html#idp323

            I assume it works the same in API 2.0

             

             

            Tasks are just comments with the attribute 'severity' set to 'BLOCKER':

            { "text": "A task on a pull request.", "severity": "BLOCKER" }

            Ben Burdick added a comment - Something that I found is that a Task is just a Comment with the "severity: blocker" flag set https://docs.atlassian.com/bitbucket-server/rest/7.11.2/bitbucket-rest.html#idp323 I assume it works the same in API 2.0     Tasks are just comments with the attribute 'severity' set to 'BLOCKER': { "text" : "A task on a pull request." , "severity" : "BLOCKER" }

            mramos1that's correct.

            seanaty (Inactive) added a comment - mramos1 that's correct.

            MRamos_ added a comment -

            Are you saying the API is currently available to use, however there is no documentation currently available?

            MRamos_ added a comment - Are you saying the API is currently available to use, however there is no documentation currently available?

            Please do not use any APIs with /internal/ in the path. Although we don't actually do anything to prevent their usage, we make no commitments about them whatsoever and will change them anytime without adhering to the 6 month change notice policy.

            That said, we have a public API at 

            https://api.bitbucket.org/2.0/repositories/${owner}/${repo}/pullrequests/${prId}/tasks/
            

            This is what the Bitbucket web UI uses and you can view that to see how it works. We are only waiting to publish the documentation which we hope to do shortly.

            I appreciate everyone's patience and happy that it's such a useful feature for everyone. I'll document when it's live.

            seanaty (Inactive) added a comment - Please do not use any APIs with /internal/ in the path. Although we don't actually do anything to prevent their usage, we make no commitments about them whatsoever and will change them anytime without adhering to the 6 month change notice policy. That said, we have a public API at  https: //api.bitbucket.org/2.0/repositories/${owner}/${repo}/pullrequests/${prId}/tasks/ This is what the Bitbucket web UI uses and you can view that to see how it works. We are only waiting to publish the documentation which we hope to do shortly. I appreciate everyone's patience and happy that it's such a useful feature for everyone. I'll document when it's live.

              cc636e5e7862 Vinitha Raja (Inactive)
              gmarcolino+atlassian_conflict Gabriel M (Inactive)
              Votes:
              78 Vote for this issue
              Watchers:
              60 Start watching this issue

                Created:
                Updated:
                Resolved: