See example request in TeamCity REST API documentation. The locator would have to be changed to something like this:
https://<server>/httpAuth/app/rest/buildTypes/id:<buildConfigId>/builds?locator=branch:(default:any,policy:active_history_and_active_vcs_branches),failedToStart:any,running:false,sinceDate:<sinceDate>