Gitlab Jobs API

Is there any API to fetch the build status of all jobs across different projects. I want something similar I want it to do some analysis e.g. which project has maximum failed build and if go above some threshold I will contact them if they are facing any issue regarding gitlab ci setup.