BitbucketPS icon indicating copy to clipboard operation
BitbucketPS copied to clipboard

Branches API call does not expose ID number

Open martin9700 opened this issue 7 years ago • 3 comments

Not sure if this is the right place to mention this, but! When calling the

$server/rest/api/1.0/projects/$ProjectKey/repos/$Repo/branches

API call, it does not expose the branch ID number, making it impossible to correlate commits to the branch. It looks like commits does expose the "parent ID" and I'm assuming this would be the ID number of the branch.

Alternative would be to add a branch search to the commits API call.

martin9700 avatar Jan 13 '18 03:01 martin9700

Good catch. Did you fix this in your PR?

lipkau avatar Jan 13 '18 14:01 lipkau

No, API doesn’t publish the number so nothing we can do downstream.

On Jan 13, 2018, at 9:31 AM, Oliver Lipkau [email protected] wrote:

Good catch. Did you fix this in your PR?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

martin9700 avatar Jan 13 '18 14:01 martin9700

I found this API that can list all commits of a specific branch: https://docs.atlassian.com/bitbucket-server/rest/5.6.2/bitbucket-rest.html#idm46036344406192

lipkau avatar Jan 13 '18 18:01 lipkau