How to fetch commits from a specific branch using Gitlab API?

Hi.

I need to fetch only commits made in a specific branch like I do via CLI:

git log origin/master..origin/specific_branch

Howerver, when I call Gitlab API “List repository commits” (GET /projects/:id/repository/commits) resource, it fetches commits made before the branch creation. Moreover, the parameters since and until accept only dates in ISO format, which prevents me to use refs like I do via CLI.

Is there a way to achieve this?