-
Bug
-
Resolution: Timed out
-
Medium
-
12
-
Severity 3 - Minor
-
578
-
Issue Summary
When querying for repository variables and deployments on a repository wit additional results, you will get a pagination with a next URL to query the remaining results.
However, for repository variables endpoint, it is providing an incorrect URL such as:
OR
Although the URL endpoint is clearly incorrect, using it throws the following error:
{
"error": {
"data": {
"arguments": {},
"key": "rest-service.rest-service.unauthorized"
},
"detail": "No authorization provider header specified.",
"message": "Unauthorized"
}
}
Steps to Reproduce
Repository variables:
- Create more than 10 repository variables on a repository
- Run the GET API for /pipelines_config/variables/
- Check the "Next" URL given by the above API
Deployments
- Create multiple deployments in a repository
- User the GET method on the /2.0/repositories/workspace/repos_slug/deployments/ endpoint
- Check the "Next" URL given by the above API
Expected Results
The next URL would be given for the /pipelines_config/variables/ or /deployments/ endpoints.
Actual Results
The next URL is given for /rest/1.0/accounts/ or /rest/2.0/accounts/ endpoints.
Workaround
The workaround is to add a larger pagelen to get the results without the use of the "Next" URL.
Example:
curl -X GET -u $USERNAME:$APP_PASSWORD "https://api.bitbucket.org/2.0/repositories/$WORKSPACE_ID/$REPO__SLUG/pipelines_config/variables/?pagelen=100"
- is related to
-
BCLOUD-20796 Consuming the Deployments Environments API 2.0 is giving an invalid next parameter URL
-
- Short Term Backlog
-