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: https://k6.io/docs/javascript-api/k6-http/response/

In general, you can get the raw metrics that k6 measures for everything by configuring an output, see https://k6.io/docs/getting-started/results-output/#external-outputs