Information about clouds and shadows from clouds

We need information about the area of the clouds and the area of the shadows of the clouds in a unit 512x512 pixels. How can I get this information through the api?
Information about clouds and shadows from clouds is contained in the scene lists of the unit image. How to get to values and parameters of unit layers via api?

Thank you for your help, Marat

Hi @marat.abubekerov,

if I understand correctly, you need just statistical information about the area of clouds/shadows?
I suggest you use process API’s “updateOutputMetadata” function as described in Top 6 here:

Use Sentinel-2 L2A data source and its SCL band (for clouds and shadows) and CLM (for clouds), see: