fixes Api writings to API

Signed-off-by: Jochen Maes <jochen@sejo-it.be>