You just showed us to few code lines / details. So I’m just guessing.
First of all, can you do two iterations, one inside another one. Just fire another iteration on ‘apiCall’ to make you second level structure, just as you built first level structure (i.e. the one that holds ‘apiCall’).
Second thing. AFAIK, the fact that some property is read only does not stops you from using it in foreach. Foreach (as name says) is a simple iteration loop that reads value, not modify it. Therefore it should handle read only attributes just as it do with read-write ones. Are you 100% sure that here lies the problem?