add api for do alarm