Hi Mustafa Murat Sever ,
Welcome to Microsoft Q&A platform and thanks for posting your question here.
I understand that you're trying to configure pagination settings in Azure Data Factory (ADF) to copy data from a REST endpoint that provides pagination links in the response. However, it's not working as expected.
Could you please explain this statement : "But in the second call rel:next becomes the 3rd item in the list because of rel:prev
link"
You mentioned that the condition if(equals('$.metadata.number', 0)
is not evaluated as expected. This might be because the evaluation is done before the pagination rules are applied.
To handle this, you can use a set variable activity before your Copy Data activity . In the Set Variable activity, you can evaluate the condition and set a variable based on the condition. Then, use the variable in your Copy Data activity.
For example: Create a variable (e.g., NextLink) in your pipeline. In the Set Variable activity, set the value of NextLink based on the condition. Then, in your Copy Data activity, use @variables('NextLink').NextLink as the "Relative URL" or "Request URI" for the REST endpoint.
For better understanding on your scenario, kindly share your pipeline json if possible or attach the screenshot of the activity configuration so far. Thankyou