Rest api get direct pushes to branch master and commits related to push

Hi,
Is there an API to get all the code pushed to branch master without PRs?
and all the correlated commits to those pushes?

Welcome to the Atlassian developer community @DvirHacohen,

Not exactly. You can subscribe to webhooks for repo:push but I’m not aware of any way to pre-emptively filter those events to just 1 branch (master or otherwise). And if you missed the events (maybe before you were subscribed), I can’t see a way to retroactively ask about pushes.