I am not able to pull all the branch details using git hub rest api

I am trying to pull all the branch details using git hub rest api. But I could see few branch details are missing in the fetched result. Please help me in resolving the issue. 

PFB the url I used for pulling the batch details:

GET github.com/api/v3/repos/:repo/branches?access_token=value

Hi @ravirajac,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now here in the How to use Git and GitHub board. No action is needed on your part; you can continue the conversation as normal here.

Cheers!

Hi @ravirajac,

Could you tell me a bit more about what information you’re trying to pull and what’s missing?

Thanks!

Hi ,

I want to pull all the branch details whose name starts with release using github rest api. But I am not able to pull all the release branch details. PFB the rest api url which I used to pull the release branch details:

https://github.com/api/v3/repos/:repos/branches?page=4&per_page=100&q=release+created.

Using this url I am able to pull the release branch details. But all the release branch details are not coming.

Please help me how I can pull all the release branch details.

Thanks,

Ravi

Hi @ravirajac,

It sounds like you’re saying that you can get some of the branch details, but not all of them, correct? Which details are you not getting which you expect to get?

Thanks!

This is really helpful
thank you

Hi Sir,

Now I am able to pull all the branch details using pagination option.

But I am not able to pull all the commit id details for all the branches using below url:

https://github.com/api/v3/repos/:repos/commits.

It is fetching only the recent commit id details with respect to one branch.

I am trying to pull  commit id details for one branch,it’s fetching all the commit id details but along with that I could see commit details for other branches also.PFB the url I used to pull the commit details:

https://github.com/api/v3/repos/:repos/commits?sha=branchname

Any suggestion to pull all the commit details for a particular branch would be helpful.

Thanks,

Ravi