Change port VLAN via API

I have an application where I would like to be able to change the VLAN on a port via API.

Ideally on SD Switch as well as Balance router.

Could that be added to the API?