Trigger build when a new docker image is pushed to the registry

I would like to trigger a build whenever anybody pushes a new docker image into the registry of a specific project. Is it possible to achieve with current api? I have looked through the api here but could not find anything relevant. Please point me to it if I missed it.