How could I get API request level metrices for k6 test results?

Hi I am new to k6. Looking for a way to get api level metrics at each iteration ,like ( response time, response code and status, request and response body of failure cases) .

In the script, you can get the metrics for every individual request through the timings property of the http.Response object: Response

In general, you can get the raw metrics that k6 measures for everything by configuring an output, see Results output