How to get repository branch commit


I want to get all commit via API for specific branch how I can get please help me 

I try this way 

it gives the only repository response

if I change my repository then it will now allowed to me

this will not work

Thank you