yes, that's possible; you can use:
- scribus.getObjectType()
- scribus.sendToLayer()
- scribus.setLayerVisible()
please learn how to use the help in scribus (F1!) or the website with the API documentation, i previously linked: all three commands above are the literal translation in code of your question and are easy to discover!
(yes, i also had to look them up in the API documentation!)