API and generating shapes

Hello,
I have a problem with shapes.
I’m creating a live plot with few lines at certain values. I have a JSON where it return me a y0 and y1 value, but I don’t know how to update layout at once with more than one line. Shapes doesn’t support using table on x0,y0,x1,y1 values.
Anyone have simillar problem and have solution?

Can you use a for loop for this?

How?
I’m using update function for dynamic graphs and I don’t know how to make a few shapes in one call.