Know which build step is failed through api
<p>I am trying to find out the details of a build through API. I am using below to get the specific result.
<a href="http://localhost:8080/job/test/lastBuild/api/json?pretty=true" rel="nofollow">http://localhost:8080/job/test/lastBuild/api/json?pretty=true</a> </p>

<p>Now when the build is failed, I am just getting the status of the build. I want to determine which build step is causing the problem. Please let me know how can I get it through api</p>