I don’t know if you saw this tutorial: Télécharger un CSV des valeurs historiques d'un capteur?
You can follow it to understand the general idea, but call the request to fetch the scenes instead:
http://YOUR_LOCAL_GLADYS_URL/api/v1/scene
(Source: Documentation → Gladys Assistant REST API documentation )