Curl api on for loop doesn't work

I can tell that English is not your first language. I don’t quite understand what you have written