The document asks to use the next page URL in the "next" property but it has the older v1.0 URL like the following which does not work:
I used the v2.0 URL to get the 1st page and I tried appending the URL page & pagelen parameters (as given below) to it which does not work, I get "resource not found" error.
What is the correct end-point URL to use to get the next page of variables?
https://api.bitbucket.org/2.0/repositories/<account>/<repo slug>/pipelines_config/variables?page=2&pagelen=10
Your url is correct
https://api.bitbucket.org/2.0/repositories/<account>/<repo slug>/pipelines_config/variables?page=2&pagelen=10
The reason you're getting 404 error is that you're not authenticated, have a look how to authenticate requests at:
https://developer.atlassian.com/bitbucket/api/2/reference/meta/authentication
Thanks,
Peter
I am not sure why should I get a 404 error when authentication fails or when the access token has expired. It should be only 401 error which I am not getting.
I am using grant_type as client_credentials and I am able to get the 1st page of variables without any error, so I don't think there is any scope issue.
First of all, why should the "next" field in the response having the older v1.0 end-point URL, when the request has v2.0 end-point URL?
Secondly, the API pagination docs says the following. So, ideally, I should be able to get the next page by just using the URL in the next field.
The link to the next page is included such that you don't have to hardcode or construct any links. Only values and next are guaranteed (except the last page, which lacks next). This is because the previous and size values can be expensive for some data sets.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are correct, the link in **next** section is incorrect and points to the wrong resource. I will mark it as a bug and get the team to triage, thanks for bringing it to our attention. In the meantime you should be able to construct next page url that is similar to the one you are using to fetch the first page of variables.
Thanks,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.