Add / update an alarm notes via code / API

Hello,

I need to add notes or update an existing one for alarm.

I know I get can notes via API / code but I did not find any way to overwrite the data from code or API.

 For example this code will get alarms notes:

alarmId = args['alarmId']
alarmService = server.get('AlarmService');
topSrv = server.get('TopologyService');
annos = alarmService.getAnnotations(alarmId);
alarmNotes = [];
for(anno in annos){
        note = topSrv.createAnonymousDataObject(topSrv.getType('AlarmNote'));
	note.set("id", anno.getID());
	note.set("text", anno.getText());
	note.set("alarmId", alarmId);
	note.set("username", anno.getUsername());
	note.set("createdTime", anno.getCreatedTime());
	alarmNotes.add(note);
}
return alarmNotes;

when I try to set the text of the notes it will not update in Foglight database, there is a way to use code to set the data that will save in the system?

Thanks.