I have been using the Bitbucket REST API to extract a list of deployments which have occurred for one of my repositories in a script which runs once per day. This script started failing on the 19th Feb 2024. On investigation, it appears that the "next" link I use to iterate over the paginated responses has started returning an invalid URL which can't be followed to get page 2-onwards of the results.
The endpoint I'm using is the List Deployments endpoint; for example:
GET https://api.bitbucket.org/2.0/repositories/myWorkspace/myRepository/deployments
The next link returns as follows:
"next": "https://api.bitbucket.org/2.0/repositories/%7B{workspace-guid}%7D/%7B{repository-guid}%7D/deployments/&page=2&pagelen=10"
Note that the query parameters on this link look malformed, starting with an & rather than a ?. If I hit this link as-is, I get a HTTP 400 response, but if I prepend the query string with a ? then the request works fine and I get a HTTP 200 with the next page of results.
Would it be possible for someone from the Bitbucket API team to have a look at this potential bug?
Apologies, I didn't realise there was a separate "Submit a bug" mechanism. I have since found an existing bug for this issue:
https://jira.atlassian.com/browse/BCLOUD-23130
Hi Michael,
Thank you for reaching out and reporting this.
The bug report you shared is for a different API endpoint. I went ahead and created another one for the deployments endpoint here:
You can select the link This affects my team in the bug report to indicate you are affected by this issue. You can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on any updates.
Our development team will post an update there when this is fixed. Please note that we don't provide ETAs and bug fixing is implemented as per our policy here.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.