How to test pagination in Postman API?

Viewed 25

I am having API and testing in Postman. I can able test for one page, but not sure how to test other pages. Basically, wanted to do pagination in Postman.

Here is my response from the Postman API


{
    "patient_stats": [
        {
            "last_appointment_date": "2022-09-14T11:30:00.000+01:00",
            "last_exam_date": "2022-09-14T11:15:00.000+01:00",
            "last_scale_and_polish_date": "2022-09-14T11:30:00.000+01:00",
            "next_appointment_date": "2022-09-28T16:15:00.000+01:00",
            "next_exam_date": "2023-09-20T16:15:00.000+01:00",
            "next_scale_and_polish_date": "2023-09-20T16:30:00.000+01:00",
            "created_at": "2020-07-28T16:25:04.762+01:00",
            "updated_at": "2022-09-14T11:52:46.144+01:00",
            "total_paid": "157.5",
            "total_invoiced": "157.5",
            "last_cancelled_appointment_date": "2022-11-23T12:30:00.000+00:00"
        },
       
        {
            "last_appointment_date": "2006-11-02T12:30:00.000+00:00",
            "last_exam_date": null,
            "last_scale_and_polish_date": null,
            "next_appointment_date": null,
            "next_exam_date": null,
            "next_scale_and_polish_date": null,
            "created_at": "2020-07-31T01:10:10.733+01:00",
            "updated_at": "2020-07-31T01:46:42.329+01:00",
            "total_paid": "0.0",
            "total_invoiced": "0.0",
            "last_cancelled_appointment_date": null
        }
    ],
    "meta": {
        "total": 13616,
        "current_page": 1,
        "total_pages": 545
    }
}

It shows total 545 pages. Not sure how to loop second page in Postman.

I tried to give the current_page = 2 in the params. But it's not showing second page

enter image description here

Can anyone advise how to test in Postman?

0 Answers
Related