# Get the build triggered by the latest push on master

**URL:** <https://drone.discourse.group/t/get-the-build-triggered-by-the-latest-push-on-master/5875>\
**Category:** Drone Support\
**Created:** [September 24, 2017, 9:32am UTC](https://drone.discourse.group/t/get-the-build-triggered-by-the-latest-push-on-master/5875 "2017-09-24T09:32:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![allanrenucci](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/allanrenucci/32/3878_2.png) [@allanrenucci](https://drone.discourse.group/u/allanrenucci)\
**Post date:** [September 24, 2017, 9:32am UTC](https://drone.discourse.group/t/get-the-build-triggered-by-the-latest-push-on-master/5875/1 "2017-09-24T09:32:11Z")

</div>

Running drone0.8

To get the latest build on master, I used to to do:  
`GET /api/repos/{owner}/{name}/builds/latest?branch=master`

But now when you restart a build, it has a new build number. So the latest build on master might not be the build triggered by the latest push on master. It may be an old build that was restarted.

Is there a workaround this?
