node-bitbucket icon indicating copy to clipboard operation
node-bitbucket copied to clipboard

"sort" parameter doesn't work in "bitbucket.repositories.listDeployments()"

Open wwang-noggin opened this issue 4 years ago • 2 comments

According to https://bitbucketjs.netlify.app/#api-repositories-repositories_listDeployments, there is a "sort" parameter. We have tested it with by calling listDeployments({ repo_slug:"repo..", workspace:"workspace", page:1, pagelen:10, sort:"last_update_time"}), the return error is: "Bad Request".

Removing the sort: "last_update_time", it works.

Node version: 14.16.0

wwang-noggin avatar Jul 05 '21 00:07 wwang-noggin

Bitbucket's API is not consistent. According to the docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/deployments/#get paginated response should support sort. But it's possible that they don't really support it.

Does it work if you directly call the API: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/deployments/#get ?

MunifTanjim avatar Aug 20 '21 12:08 MunifTanjim

The sort param (nor q) is not supported in List Deployments call, per https://api.bitbucket.org/swagger.json

parabolala avatar Feb 16 '22 19:02 parabolala