ADF pagination rule to get total row count from rest API and add as end condition.
As per you requirement in the rest API result set you are getting total: 14518
which is the total number of records. And you want to use this in the end condition.
To achieve this:
here I am using this sample Rest Api
- First you need to get the result set of api from web activity.
Result set: here you will get that total: 14518

- Now in copy activity set the pagination rule as below:
set Renge as
1::1000
so it will loop the url infinite time on the offset of 1000 and the set the end condition as MaxRequestNumber : @string(activity('Web1').output.total_pages)
so it will end the looping when it reaches the max request number.

UPDATE
updating answer for other community members. Agreed with @Sukanya by adding $.total
the value of total will be taken from the rest API's response in the end condition as below:
