API to control charging rate

This suggestion is for an API to allow commands to be sent directly to the charger, in particular the charging current. A user with a suitable smart home system they would be able to dynamically adjust the charging current based on real time data coming from the smart home system. Many customers installing solar will in any case also be installing storage batteries so together with energy being stored and variable loads in the house using an insolation forecast to estimate import/export current is a non-starter. A REST API would be ideal.